1. 用户管理:新增启用(user/enable)/禁用(user/disable)/注销(user/admin_cancel)接口,
平台超管可操作全部用户,机构管理员限本机构;注销带分布式锁、禁自己/超管守卫
2. 禁用/注销立即踢下线:Redis黑名单(user:disabled:{uid}) + JWT过滤器拦截,
TTL与token有效期一致
3. 系统管理员查看各机构账号:GET user/page/org_account(机构/账号/手机号等筛选)
4. 按手机号查上传/发送/接收记录:GET user_file/record/page_by_phone,
发送/接收方向按部署侧 file.transfer.location 自动映射
5. 机构上传配置:新表 x_upload_config + upload_config/info|modify|check 接口,
上传总开关/后缀白名单/单文件大小限制,网盘落库时强制校验
6. 加固:UserInfoDTO.setPassword 缺省密码未配置时不再抛 rawPassword cannot be null
7. 新增 x_upload_config 建表脚本(upgrade-20260915-release.sql 为上线版)、
生产部署说明、前端接口文档×2、运维脚本 sfile-ctl.sh、AGENTS.md
1281 lines
90 KiB
SQL
1281 lines
90 KiB
SQL
|
||
SET NAMES utf8mb4;
|
||
SET FOREIGN_KEY_CHECKS = 0;
|
||
|
||
|
||
-- ----------------------------
|
||
-- Table structure for async_task_notice
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `async_task_notice`;
|
||
CREATE TABLE `async_task_notice` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||
`union_type` varchar(32) NOT NULL COMMENT '关联类型:common_import等',
|
||
`union_id` bigint(20) NOT NULL COMMENT '关联id',
|
||
`content` varchar(255) NOT NULL COMMENT '内容',
|
||
`biz_status_str` varchar(32) DEFAULT NULL COMMENT '业务状态',
|
||
`biz_param_data` varchar(512) DEFAULT NULL COMMENT '业务参数',
|
||
`flow_status` tinyint(4) DEFAULT '1' COMMENT '流程状态:1开启,2结束',
|
||
`notice_status` tinyint(4) DEFAULT '1' COMMENT '通知状态:1未读,2已读',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否逻辑删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`),
|
||
KEY `idx_create_by` (`create_by`),
|
||
KEY `idx_union` (`union_type`,`union_id`)
|
||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='异步任务通知';
|
||
|
||
|
||
-- ----------------------------
|
||
-- Table structure for notice_content_template
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `notice_content_template`;
|
||
CREATE TABLE `notice_content_template` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||
`template_id` bigint(20) DEFAULT NULL COMMENT '通知模版id',
|
||
`channel_type` tinyint(4) DEFAULT NULL COMMENT '消息通道类型:1站内信,2短信,3钉钉,4企业微信,5邮件(见notice_channel_type)',
|
||
`title` varchar(64) DEFAULT NULL COMMENT '标题',
|
||
`content_template` text COMMENT '内容模版',
|
||
`enabled` bit(1) DEFAULT b'1' COMMENT '是否启用',
|
||
`link` varchar(128) DEFAULT NULL COMMENT '链接',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否逻辑删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`)
|
||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='通知消息体模版';
|
||
|
||
-- ----------------------------
|
||
-- Table structure for notice_receiver_setting
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `notice_receiver_setting`;
|
||
CREATE TABLE `notice_receiver_setting` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||
`template_id` bigint(20) DEFAULT NULL COMMENT '通知模版id',
|
||
`org_id` bigint(20) DEFAULT NULL COMMENT '机构id',
|
||
`receiver_union_type` tinyint(4) DEFAULT NULL COMMENT '接收人关联类型:1用户id,2角色,3标准角色(见notice_receiver_type)',
|
||
`receiver_union_id` bigint(20) DEFAULT NULL COMMENT '接收人关联id:用户id,角色id,标准角色id',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否逻辑删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`)
|
||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='通知接收人设置';
|
||
|
||
-- ----------------------------
|
||
-- Table structure for notice_send_record
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `notice_send_record`;
|
||
CREATE TABLE `notice_send_record` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||
`template_id` bigint(20) DEFAULT NULL COMMENT '通知模版id',
|
||
`sender_org_id` bigint(20) DEFAULT NULL COMMENT '发送方机构id',
|
||
`receiver_org_id` bigint(20) DEFAULT NULL COMMENT '接收方机构id',
|
||
`content_template_id` bigint(20) DEFAULT NULL COMMENT '消息体模版id',
|
||
`content_param_data` varchar(512) DEFAULT NULL COMMENT '消息体参数',
|
||
`content` text COMMENT '消息体',
|
||
`appointed` bit(1) DEFAULT NULL COMMENT '是否指定接收方(非预先设定)',
|
||
`link` varchar(128) DEFAULT NULL COMMENT '链接',
|
||
`content_template` text COMMENT '内容模版',
|
||
`title` varchar(64) DEFAULT NULL COMMENT '标题',
|
||
`channel_type` tinyint(4) DEFAULT NULL COMMENT '消息通道类型:1站内信,2短信,3钉钉,4企业微信,5邮件(见notice_channel_type)',
|
||
`status` tinyint(4) DEFAULT NULL COMMENT '状态:1待处理,2已处理 等(见notice_send_status)',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否逻辑删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`)
|
||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='通知发送记录(内容模版级)';
|
||
|
||
-- ----------------------------
|
||
-- Table structure for notice_send_record_detail
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `notice_send_record_detail`;
|
||
CREATE TABLE `notice_send_record_detail` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||
`record_id` bigint(20) DEFAULT NULL COMMENT '发送记录id',
|
||
`user_id` bigint(20) DEFAULT NULL COMMENT '接收人id',
|
||
`receiver_account_no` varchar(32) DEFAULT NULL COMMENT '接收方帐号',
|
||
`receiver_status` tinyint(4) DEFAULT NULL COMMENT '接收状态:1待发送,2已发送,3发送失败,4接收已读(见notice_receiver_status)',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否逻辑删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`)
|
||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='通知发送记录明细(接收人)';
|
||
|
||
-- ----------------------------
|
||
-- Table structure for notice_template
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `notice_template`;
|
||
CREATE TABLE `notice_template` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||
`template_code` varchar(32) DEFAULT NULL COMMENT '通知模版code',
|
||
`template_name` varchar(64) DEFAULT NULL COMMENT '通知模版名称',
|
||
`module_type` tinyint(4) DEFAULT NULL COMMENT '模块分类:1业务,2监控/预警(见notice_module_type)',
|
||
`biz_type` tinyint(4) DEFAULT NULL COMMENT '业务分类:',
|
||
`level` tinyint(4) DEFAULT NULL COMMENT '级别:1平台,2机构(见notice_level)',
|
||
`enabled` bit(1) DEFAULT b'1' COMMENT '是否启用',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否逻辑删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`)
|
||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='通知模版';
|
||
|
||
|
||
|
||
-- ----------------------------
|
||
-- Table structure for uc_action
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `uc_action`;
|
||
CREATE TABLE `uc_action` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||
`union_type` varchar(32) DEFAULT NULL COMMENT '关联类型',
|
||
`union_id` bigint(20) DEFAULT NULL COMMENT '关联id',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否逻辑删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`)
|
||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='操作记录';
|
||
|
||
-- ----------------------------
|
||
-- Table structure for uc_action_detail
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `uc_action_detail`;
|
||
CREATE TABLE `uc_action_detail` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||
`action_id` bigint(20) DEFAULT NULL COMMENT '操作记录id',
|
||
`field` varchar(32) DEFAULT NULL COMMENT '属性',
|
||
`field_alias` varchar(32) DEFAULT NULL COMMENT '属性别名',
|
||
`field_dict_code` varchar(32) DEFAULT NULL COMMENT '属性字典',
|
||
`old_value` varchar(255) DEFAULT NULL COMMENT '旧值',
|
||
`new_value` varchar(255) DEFAULT NULL COMMENT '新值',
|
||
`diff` text COMMENT '差异',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否逻辑删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`)
|
||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='操作记录明细';
|
||
|
||
-- ----------------------------
|
||
-- Table structure for uc_auth_client
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `uc_auth_client`;
|
||
CREATE TABLE `uc_auth_client` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||
`auth_type_code` tinyint(4) DEFAULT NULL COMMENT '授权类型标识',
|
||
`client_name` varchar(32) DEFAULT NULL COMMENT '授权应用名称',
|
||
`param_data` varchar(256) DEFAULT NULL COMMENT '配置数据',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否逻辑删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`)
|
||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='授权客户端';
|
||
|
||
-- ----------------------------
|
||
-- Table structure for uc_auth_detail
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `uc_auth_detail`;
|
||
CREATE TABLE `uc_auth_detail` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||
`auth_client_id` bigint(20) DEFAULT NULL COMMENT '授权客户端id',
|
||
`auth_type_code` tinyint(4) DEFAULT NULL COMMENT '授权类型标识',
|
||
`nickname` varchar(32) DEFAULT NULL COMMENT '昵称',
|
||
`avatar` varchar(256) DEFAULT NULL COMMENT '头像',
|
||
`gender` varchar(2) DEFAULT NULL COMMENT '性别',
|
||
`country` varchar(32) DEFAULT NULL COMMENT '国家',
|
||
`province` varchar(32) DEFAULT NULL COMMENT '省份',
|
||
`city` varchar(32) DEFAULT NULL COMMENT '城市',
|
||
`open_id` varchar(32) DEFAULT NULL COMMENT 'open_id',
|
||
`unique_id` varchar(32) DEFAULT NULL COMMENT '授权唯一id',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否逻辑删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`)
|
||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='授权明细表';
|
||
|
||
-- ----------------------------
|
||
-- Table structure for uc_auth_detail_entrypoint
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `uc_auth_detail_entrypoint`;
|
||
CREATE TABLE `uc_auth_detail_entrypoint` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||
`auth_detail_id` bigint(20) DEFAULT NULL COMMENT '授权客户端id',
|
||
`union_id` bigint(20) DEFAULT NULL COMMENT '关联id(小程序码id)',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否逻辑删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`),
|
||
KEY `idx_union_id` (`union_id`)
|
||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='授权明细入口';
|
||
|
||
-- ----------------------------
|
||
-- Table structure for uc_auth_subscribe_detail
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `uc_auth_subscribe_detail`;
|
||
CREATE TABLE `uc_auth_subscribe_detail` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||
`auth_client_id` bigint(20) DEFAULT NULL COMMENT '授权客户端id',
|
||
`open_id` varchar(32) DEFAULT NULL COMMENT 'open_id',
|
||
`unique_id` varchar(32) DEFAULT NULL COMMENT '授权唯一id',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否逻辑删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`)
|
||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='授权订阅明细表';
|
||
|
||
-- ----------------------------
|
||
-- Table structure for uc_auth_type
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `uc_auth_type`;
|
||
CREATE TABLE `uc_auth_type` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||
`auth_main_type` tinyint(4) DEFAULT NULL COMMENT '授权大类:1微信,2支付宝',
|
||
`auth_type_code` tinyint(4) DEFAULT NULL COMMENT '授权类型标识',
|
||
`name` varchar(32) DEFAULT NULL COMMENT '名称',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否逻辑删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`)
|
||
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COMMENT='授权类型';
|
||
|
||
|
||
|
||
-- ----------------------------
|
||
-- Table structure for uc_domain
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `uc_domain`;
|
||
CREATE TABLE `uc_domain` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||
`platform_code` tinyint(4) DEFAULT NULL COMMENT '平台编码',
|
||
`domain_name` varchar(32) DEFAULT NULL COMMENT '域名',
|
||
`ip_port` varchar(32) DEFAULT NULL COMMENT 'ip:port',
|
||
`publiced` bit(1) DEFAULT NULL COMMENT '是否公共',
|
||
`org_id` bigint(20) DEFAULT NULL COMMENT '机构id',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否逻辑删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`)
|
||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='域名表';
|
||
|
||
-- ----------------------------
|
||
-- Table structure for uc_domain_auth
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `uc_domain_auth`;
|
||
CREATE TABLE `uc_domain_auth` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||
`domain_id` bigint(20) DEFAULT NULL COMMENT '域名id',
|
||
`auth_type_code` tinyint(4) DEFAULT NULL COMMENT '授权类型标识',
|
||
`auth_client_id` bigint(20) DEFAULT NULL COMMENT '授权客户端id',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否逻辑删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`)
|
||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='域名授权表';
|
||
|
||
-- ----------------------------
|
||
-- Table structure for uc_domain_setting
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `uc_domain_setting`;
|
||
CREATE TABLE `uc_domain_setting` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||
`domain_id` bigint(20) DEFAULT NULL COMMENT '域名id',
|
||
`type` tinyint(4) DEFAULT NULL COMMENT '类型',
|
||
`remark` varchar(32) DEFAULT '' COMMENT '配置备注',
|
||
`data` text COMMENT '配置数据',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否逻辑删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`)
|
||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='域名配置表';
|
||
|
||
-- ----------------------------
|
||
-- Table structure for uc_dynamic_table
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `uc_dynamic_table`;
|
||
CREATE TABLE `uc_dynamic_table` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||
`table_type` varchar(32) DEFAULT NULL,
|
||
`user_id` bigint(20) DEFAULT NULL,
|
||
`column_data` text,
|
||
`deleted` bit(1) DEFAULT b'0',
|
||
`create_by` bigint(20) DEFAULT NULL,
|
||
`create_time` datetime DEFAULT CURRENT_TIMESTAMP,
|
||
`update_by` bigint(20) DEFAULT NULL,
|
||
`update_time` datetime DEFAULT NULL,
|
||
`proxy_by` bigint(20) DEFAULT NULL,
|
||
PRIMARY KEY (`id`)
|
||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||
|
||
-- ----------------------------
|
||
-- Table structure for uc_faq
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `uc_faq`;
|
||
CREATE TABLE `uc_faq` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||
`faq_order` int(11) DEFAULT '0' COMMENT '排序',
|
||
`faq_type` varchar(2) DEFAULT NULL COMMENT '类型',
|
||
`question` varchar(512) DEFAULT NULL COMMENT '问题',
|
||
`answer` text COMMENT '回答',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否逻辑删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`)
|
||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='常见问题表';
|
||
|
||
-- ----------------------------
|
||
-- Table structure for uc_faq_file
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `uc_faq_file`;
|
||
CREATE TABLE `uc_faq_file` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||
`question_id` bigint(20) DEFAULT NULL COMMENT '常见问题ID',
|
||
`file_name` varchar(256) DEFAULT NULL COMMENT '文件名称',
|
||
`file_code` varchar(32) DEFAULT NULL COMMENT '文件编码',
|
||
`file_suffix` varchar(32) DEFAULT NULL COMMENT '文件后缀',
|
||
`sort` bigint(20) DEFAULT NULL COMMENT '排序',
|
||
`description` varchar(256) DEFAULT NULL COMMENT '文件描述',
|
||
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`)
|
||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='常见问题附件关系表';
|
||
|
||
-- ----------------------------
|
||
-- Table structure for uc_feedback
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `uc_feedback`;
|
||
CREATE TABLE `uc_feedback` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||
`type` varchar(2) DEFAULT NULL COMMENT '反馈类型',
|
||
`user_id` bigint(20) DEFAULT NULL COMMENT '用户id',
|
||
`phone` varchar(32) DEFAULT NULL COMMENT '手机号',
|
||
`content` varchar(255) DEFAULT NULL COMMENT '反馈内容',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否逻辑删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
`source_type` varchar(2) DEFAULT NULL COMMENT '来源',
|
||
PRIMARY KEY (`id`)
|
||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='反馈表';
|
||
|
||
-- ----------------------------
|
||
-- Table structure for uc_import_main
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `uc_import_main`;
|
||
CREATE TABLE `uc_import_main` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||
`import_no` varchar(64) DEFAULT NULL COMMENT '批次号',
|
||
`type` varchar(32) DEFAULT NULL COMMENT '导入类型',
|
||
`import_status` tinyint(4) DEFAULT NULL COMMENT '导入状态:1新建,2解析失败,3校验中,4校验失败,5校验成功,6执行导入',
|
||
`total_num` int(11) DEFAULT NULL COMMENT '总数',
|
||
`success_num` int(11) DEFAULT NULL COMMENT '成功数',
|
||
`fail_msg` varchar(255) DEFAULT NULL COMMENT '失败原因',
|
||
`finish_time` datetime DEFAULT NULL COMMENT '完成时间时间',
|
||
`execute_type` tinyint(4) DEFAULT NULL COMMENT '执行类型:1.普通,2.指定外部id',
|
||
`extra_id` bigint(20) DEFAULT NULL COMMENT '外部生成id',
|
||
`file_code` varchar(32) DEFAULT NULL COMMENT '文件CODE',
|
||
`file_name` varchar(128) DEFAULT NULL COMMENT '文件名称',
|
||
`org_id` bigint(20) DEFAULT NULL COMMENT '机构ID',
|
||
`remark` varchar(255) DEFAULT NULL COMMENT '备注',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '修改人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '修改时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`),
|
||
KEY `idx_import_no` (`import_no`)
|
||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='通用导入批次表';
|
||
|
||
-- ----------------------------
|
||
-- Table structure for uc_lite_code
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `uc_lite_code`;
|
||
CREATE TABLE `uc_lite_code` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||
`lite_code_config_id` bigint(20) DEFAULT NULL COMMENT '小程序码配置id',
|
||
`unique_code` varchar(32) DEFAULT NULL COMMENT '唯一码-uuid',
|
||
`param_value` varchar(255) DEFAULT NULL COMMENT '参数值(按参数键升序排列)(格式:**&**)',
|
||
`query_value` varchar(255) DEFAULT NULL COMMENT 'query参数值(格式:**=**&**=**)',
|
||
`file_code` varchar(32) DEFAULT NULL COMMENT '小程序码文件编码',
|
||
`url_scheme` varchar(64) DEFAULT NULL COMMENT '小程序scheme码',
|
||
`name` varchar(32) DEFAULT NULL COMMENT '名称',
|
||
`user_id` bigint(20) DEFAULT NULL COMMENT '用户id',
|
||
`org_id` bigint(20) DEFAULT NULL COMMENT '机构id',
|
||
`platform_code` tinyint(4) DEFAULT NULL COMMENT '平台编码',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否逻辑删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`)
|
||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='小程序码';
|
||
|
||
-- ----------------------------
|
||
-- Table structure for uc_lite_code_config
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `uc_lite_code_config`;
|
||
CREATE TABLE `uc_lite_code_config` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||
`auth_client_id` bigint(20) DEFAULT NULL COMMENT '授权客户端id',
|
||
`biz_type` tinyint(4) DEFAULT NULL COMMENT '小程序码业务类型',
|
||
`path` varchar(64) DEFAULT NULL COMMENT '路径',
|
||
`param_key` varchar(64) DEFAULT NULL COMMENT '参数键-逗号分隔',
|
||
`env_param_key` varchar(64) DEFAULT NULL COMMENT '内置环境参数键-逗号分隔',
|
||
`platform_code` tinyint(4) DEFAULT NULL COMMENT '平台编码',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否逻辑删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`)
|
||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='小程序码配置';
|
||
|
||
|
||
-- ----------------------------
|
||
-- Table structure for uc_org_relation
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `uc_org_relation`;
|
||
CREATE TABLE `uc_org_relation` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||
`org_id` bigint(20) DEFAULT NULL COMMENT '机构id',
|
||
`org_type` tinyint(4) DEFAULT NULL COMMENT '类型',
|
||
`parent_id` bigint(20) DEFAULT NULL COMMENT '上级id',
|
||
`path` varchar(255) DEFAULT NULL COMMENT '路径',
|
||
`platform_code` tinyint(4) DEFAULT NULL COMMENT '平台编码',
|
||
`platform_name` varchar(32) DEFAULT NULL COMMENT '平台名称',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否逻辑删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`),
|
||
KEY `idx_org_id` (`org_id`)
|
||
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COMMENT='机构关系表';
|
||
|
||
-- ----------------------------
|
||
-- Table structure for uc_org_user
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `uc_org_user`;
|
||
CREATE TABLE `uc_org_user` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||
`user_id` bigint(20) DEFAULT NULL COMMENT '用户id',
|
||
`org_id` bigint(20) DEFAULT NULL COMMENT '机构id',
|
||
`administrator` bit(1) DEFAULT NULL COMMENT '是否管理员',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否逻辑删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`),
|
||
KEY `INDEX12378548369700` (`user_id`),
|
||
KEY `INDEX12378670651400` (`org_id`)
|
||
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COMMENT='机构用户表';
|
||
|
||
-- ----------------------------
|
||
-- Table structure for uc_platform
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `uc_platform`;
|
||
CREATE TABLE `uc_platform` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||
`platform_code` tinyint(4) DEFAULT NULL COMMENT '平台编码',
|
||
`name` varchar(32) DEFAULT NULL COMMENT '名称',
|
||
`full_name` varchar(32) DEFAULT NULL COMMENT '全称',
|
||
`short_name` varchar(32) DEFAULT NULL COMMENT '简称',
|
||
`business` bit(1) DEFAULT NULL COMMENT '是否业务系统',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否逻辑删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`)
|
||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='系统应用表';
|
||
|
||
-- ----------------------------
|
||
-- Table structure for uc_slick_param
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `uc_slick_param`;
|
||
CREATE TABLE `uc_slick_param` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||
`unique_code` varchar(32) DEFAULT NULL COMMENT '唯一码-uuid',
|
||
`query_value` varchar(255) DEFAULT NULL COMMENT 'query升序值(格式:**=**&**=**)',
|
||
`param_data` varchar(255) DEFAULT NULL COMMENT 'json',
|
||
`hash_code` int(11) DEFAULT NULL COMMENT '哈希值',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否逻辑删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`),
|
||
KEY `idx_hash_code` (`hash_code`),
|
||
KEY `idx_unique_code` (`unique_code`)
|
||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='圆滑的参数';
|
||
|
||
-- ----------------------------
|
||
-- Table structure for uc_user
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `uc_user`;
|
||
CREATE TABLE `uc_user` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||
`username` varchar(32) DEFAULT NULL COMMENT '账号',
|
||
`password` varchar(128) DEFAULT NULL COMMENT '密码',
|
||
`type` tinyint(4) DEFAULT NULL COMMENT '用户类型:1企业用户,2个人用户',
|
||
`supeiror` bit(1) DEFAULT NULL COMMENT '是否超管',
|
||
`security_code` varchar(128) DEFAULT NULL COMMENT '安全码',
|
||
`nickname` varchar(32) DEFAULT NULL COMMENT '昵称',
|
||
`avatar` varchar(256) DEFAULT NULL COMMENT '头像',
|
||
`phone` varchar(32) DEFAULT NULL COMMENT '手机号码',
|
||
`phone_binding` bit(1) DEFAULT NULL COMMENT '手机号绑定状态',
|
||
`real_name` varchar(32) DEFAULT NULL COMMENT '真实姓名',
|
||
`card_no` varchar(18) DEFAULT NULL COMMENT '身份证号',
|
||
`authenticated` bit(1) DEFAULT NULL COMMENT '是否实名',
|
||
`status` tinyint(4) DEFAULT NULL COMMENT '状态:1.待激活,2已激活,3已注销',
|
||
`email` varchar(32) DEFAULT NULL COMMENT '邮箱',
|
||
`address` varchar(32) DEFAULT NULL COMMENT '用户所在地',
|
||
`education` tinyint(4) DEFAULT NULL COMMENT '1博士、2硕士、3本科、4大专、5高中、6中专/中技、7初中及以下、8不限',
|
||
`init_user_id` bigint(20) DEFAULT NULL COMMENT '初始(推荐)用户id',
|
||
`enabled` bit(1) DEFAULT NULL COMMENT '是否启用',
|
||
`account_non_expired` bit(1) DEFAULT NULL COMMENT '账号是否未过期',
|
||
`account_non_locked` bit(1) DEFAULT NULL COMMENT '是否未锁定',
|
||
`credentials_non_expired` bit(1) DEFAULT NULL COMMENT '凭据是否未过期',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否逻辑删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
`gender` tinyint(4) DEFAULT NULL COMMENT '性别:1男2女',
|
||
`birthday` date DEFAULT NULL COMMENT '生日',
|
||
PRIMARY KEY (`id`),
|
||
KEY `idx_card_no` (`card_no`),
|
||
KEY `idx_phone` (`phone`),
|
||
KEY `idx_real_name` (`real_name`)
|
||
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COMMENT='用户表';
|
||
|
||
|
||
|
||
-- ----------------------------
|
||
-- Table structure for uc_user_auth
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `uc_user_auth`;
|
||
CREATE TABLE `uc_user_auth` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||
`auth_main_type` tinyint(4) DEFAULT NULL COMMENT '授权大类',
|
||
`unique_id` varchar(32) DEFAULT NULL COMMENT '授权唯一id',
|
||
`user_id` bigint(20) DEFAULT NULL COMMENT '用户id',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否逻辑删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`),
|
||
KEY `idx_unique_id` (`unique_id`)
|
||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='用户授权中间表';
|
||
|
||
|
||
|
||
-- ----------------------------
|
||
-- Table structure for uc_user_cancel
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `uc_user_cancel`;
|
||
CREATE TABLE `uc_user_cancel` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||
`user_id` bigint(20) DEFAULT NULL COMMENT '用户表ID',
|
||
`status` tinyint(4) DEFAULT '1' COMMENT '申请状态 1:已申请 2:已注销',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否逻辑删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
`cancellation_type` varchar(2) DEFAULT NULL COMMENT '注销原因类型 数据字典',
|
||
`remark` varchar(255) DEFAULT NULL COMMENT '备注',
|
||
PRIMARY KEY (`id`)
|
||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户申请注销表';
|
||
|
||
|
||
-- ----------------------------
|
||
-- Table structure for uc_user_config
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `uc_user_config`;
|
||
CREATE TABLE `uc_user_config` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||
`user_id` bigint(20) DEFAULT NULL COMMENT '用户id',
|
||
`config_code` varchar(64) DEFAULT NULL COMMENT '编码',
|
||
`config_value` varchar(1024) DEFAULT NULL COMMENT '配置值',
|
||
`remark` varchar(128) DEFAULT NULL COMMENT '备注',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否逻辑删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`)
|
||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户配置表';
|
||
|
||
-- ----------------------------
|
||
-- Table structure for uc_user_extension
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `uc_user_extension`;
|
||
CREATE TABLE `uc_user_extension` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||
`user_id` bigint(20) DEFAULT NULL COMMENT '用户id',
|
||
`technique_tag` varchar(256) DEFAULT NULL COMMENT '技能标签',
|
||
`residence_address` varchar(128) DEFAULT NULL COMMENT '常住地区',
|
||
`file_code` varchar(255) DEFAULT NULL COMMENT '简历附件编码',
|
||
`file_name` varchar(255) DEFAULT NULL COMMENT '简历附件名称',
|
||
`covid_vaccine` tinyint(4) DEFAULT NULL COMMENT '新冠疫苗:1.未接种,2.1针,3.2针,4.3针',
|
||
`wechat_qr_code` varchar(32) DEFAULT NULL COMMENT '微信二维码',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否逻辑删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`)
|
||
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='用户扩展表';
|
||
|
||
-- ----------------------------
|
||
-- Table structure for uc_user_face
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `uc_user_face`;
|
||
CREATE TABLE `uc_user_face` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||
`user_id` bigint(20) DEFAULT NULL COMMENT '用户ID',
|
||
`type` tinyint(4) DEFAULT NULL COMMENT '类型 1:照片 2:视频',
|
||
`file_code` varchar(32) DEFAULT NULL COMMENT '文件编码',
|
||
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`),
|
||
KEY `INDEX12379510213700` (`user_id`)
|
||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户活体信息表';
|
||
|
||
-- ----------------------------
|
||
-- Table structure for uc_user_postal_info
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `uc_user_postal_info`;
|
||
CREATE TABLE `uc_user_postal_info` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||
`defaulted` bit(1) DEFAULT NULL COMMENT '是否默认',
|
||
`name` varchar(50) DEFAULT NULL COMMENT '收货人',
|
||
`phone` varchar(50) DEFAULT NULL COMMENT '手机号',
|
||
`address_code` varchar(50) DEFAULT NULL COMMENT '地区编码',
|
||
`address_name` varchar(50) DEFAULT NULL COMMENT '地址名称',
|
||
`address_detail` varchar(100) DEFAULT NULL COMMENT '详细地址',
|
||
`deleted` bit(1) DEFAULT NULL COMMENT '是否逻辑删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`)
|
||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户邮寄信息';
|
||
|
||
|
||
-- ----------------------------
|
||
-- Table structure for uc_user_register
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `uc_user_register`;
|
||
CREATE TABLE `uc_user_register` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||
`platform_code` tinyint(4) DEFAULT NULL COMMENT '平台编码',
|
||
`user_id` bigint(20) DEFAULT NULL COMMENT '用户id',
|
||
`inviter_id` bigint(20) DEFAULT NULL COMMENT '邀请人id',
|
||
`inviter_type` tinyint(4) DEFAULT NULL COMMENT '邀请人用户类型',
|
||
`inviter_org_id` bigint(20) DEFAULT NULL COMMENT '邀请人机构id',
|
||
`entrypoint` varchar(32) DEFAULT NULL COMMENT '入口点',
|
||
`union_id` bigint(20) DEFAULT NULL COMMENT '关联id(小程序码id)',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否逻辑删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`),
|
||
KEY `idx_user_id` (`user_id`)
|
||
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COMMENT='用户注册表';
|
||
|
||
|
||
|
||
-- ----------------------------
|
||
-- Table structure for xs_chat
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `xs_chat`;
|
||
CREATE TABLE `xs_chat` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||
`org_id` bigint(20) DEFAULT NULL COMMENT '机构id',
|
||
`org_user_id` bigint(20) DEFAULT NULL COMMENT '机构用户id',
|
||
`person_user_id` bigint(20) DEFAULT NULL COMMENT '个人用户id',
|
||
`type` varchar(32) DEFAULT NULL COMMENT '类型(chat_type)',
|
||
`status` tinyint(4) DEFAULT NULL COMMENT '状态:1有效,2关闭',
|
||
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否逻辑删除',
|
||
`create_by` bigint(20) NOT NULL COMMENT '创建人',
|
||
`create_time` datetime NOT NULL COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`)
|
||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='聊天表';
|
||
|
||
-- ----------------------------
|
||
-- Table structure for xs_chat_msg
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `xs_chat_msg`;
|
||
CREATE TABLE `xs_chat_msg` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||
`chat_id` bigint(20) DEFAULT NULL COMMENT '聊天id',
|
||
`sender_id` bigint(20) DEFAULT NULL COMMENT '发送用户id',
|
||
`msg_type` varchar(16) DEFAULT NULL COMMENT '消息类型(chat_msg_type):text等',
|
||
`content` varchar(1024) DEFAULT NULL COMMENT '个人用户id',
|
||
`msg_status` tinyint(4) DEFAULT NULL COMMENT '消息状态:1未读,2已读',
|
||
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否逻辑删除',
|
||
`create_by` bigint(20) NOT NULL COMMENT '创建人',
|
||
`create_time` datetime NOT NULL COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`)
|
||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='聊天消息表';
|
||
|
||
-- ----------------------------
|
||
-- Table structure for xs_code_setting
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `xs_code_setting`;
|
||
CREATE TABLE `xs_code_setting` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||
`code` varchar(64) DEFAULT NULL COMMENT '编码',
|
||
`name` varchar(128) DEFAULT NULL COMMENT '名称',
|
||
`remark` varchar(128) DEFAULT NULL COMMENT '备注',
|
||
`type` varchar(2) DEFAULT NULL COMMENT '类型 模板编码、配置编码',
|
||
`data_type` varchar(2) DEFAULT NULL COMMENT '数据类型',
|
||
`data_format` varchar(128) DEFAULT NULL COMMENT '数据格式编号',
|
||
`level` varchar(20) DEFAULT NULL COMMENT '级别 平台、渠道、定制机构、普通机构',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '修改人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '修改时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`)
|
||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='编码表';
|
||
|
||
-- ----------------------------
|
||
-- Table structure for xs_company_extend
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `xs_company_extend`;
|
||
CREATE TABLE `xs_company_extend` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||
`seller_id` bigint(20) DEFAULT NULL COMMENT '销售',
|
||
`org_id` bigint(20) DEFAULT NULL COMMENT '所属机构ID',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '修改人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '修改时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`),
|
||
KEY `INDEX173651263650200` (`org_id`)
|
||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='企业的扩展信息';
|
||
|
||
-- ----------------------------
|
||
-- Table structure for xs_component
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `xs_component`;
|
||
CREATE TABLE `xs_component` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||
`url_id` bigint(20) DEFAULT NULL COMMENT '菜单id',
|
||
`code` varchar(32) DEFAULT NULL COMMENT '组件编码',
|
||
`name` varchar(64) DEFAULT NULL COMMENT '组件名称',
|
||
`platform_code` tinyint(4) DEFAULT NULL COMMENT '平台编码',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '修改人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '修改时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`)
|
||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='组件';
|
||
|
||
-- ----------------------------
|
||
-- Table structure for xs_config
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `xs_config`;
|
||
CREATE TABLE `xs_config` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||
`config_code` varchar(64) DEFAULT NULL COMMENT '编码',
|
||
`config_value` text COMMENT '配置值',
|
||
`org_id` bigint(20) DEFAULT NULL COMMENT '机构',
|
||
`remark` varchar(128) DEFAULT NULL COMMENT '备注',
|
||
`enable` bit(1) DEFAULT NULL COMMENT '是否启用',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '修改人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '修改时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`)
|
||
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COMMENT='配置表';
|
||
|
||
-- ----------------------------
|
||
-- Table structure for xs_dict
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `xs_dict`;
|
||
CREATE TABLE `xs_dict` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||
`dict_code` varchar(32) DEFAULT NULL COMMENT '字典编码',
|
||
`dict_name` varchar(64) DEFAULT NULL COMMENT '字典名称',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '修改人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '修改时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`),
|
||
KEY `idx_dict_code` (`dict_code`)
|
||
) ENGINE=InnoDB AUTO_INCREMENT=206 DEFAULT CHARSET=utf8mb4 COMMENT='数据字典主信息';
|
||
|
||
-- ----------------------------
|
||
-- Table structure for xs_dict_detail
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `xs_dict_detail`;
|
||
CREATE TABLE `xs_dict_detail` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||
`dict_id` bigint(20) DEFAULT NULL COMMENT '字典ID',
|
||
`dict_detail_code` varchar(64) DEFAULT NULL COMMENT '子项编码',
|
||
`dict_detail_name` varchar(128) DEFAULT NULL COMMENT '子项名称',
|
||
`dict_order` int(11) DEFAULT NULL COMMENT '排序',
|
||
`parent_id` bigint(20) DEFAULT NULL COMMENT '父子项ID',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '修改人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '修改时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`),
|
||
KEY `idx_dict_id` (`dict_id`)
|
||
) ENGINE=InnoDB AUTO_INCREMENT=1583 DEFAULT CHARSET=utf8mb4 COMMENT='数据字典明细信息';
|
||
|
||
-- ----------------------------
|
||
-- Table structure for xs_district
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `xs_district`;
|
||
CREATE TABLE `xs_district` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||
`name` varchar(32) DEFAULT NULL COMMENT '城市名称',
|
||
`parent_id` bigint(20) DEFAULT NULL COMMENT '上级城市ID',
|
||
`initial` varchar(32) DEFAULT NULL COMMENT '首字母',
|
||
`initials` varchar(32) DEFAULT NULL COMMENT '简拼',
|
||
`pinyin` varchar(32) DEFAULT NULL COMMENT '全拼',
|
||
`extra` varchar(32) DEFAULT NULL COMMENT '特别行政区',
|
||
`suffix` varchar(32) DEFAULT NULL COMMENT '后缀',
|
||
`code` varchar(32) DEFAULT NULL COMMENT '城市编码',
|
||
`area_code` varchar(32) DEFAULT NULL COMMENT '区域编码',
|
||
`district_order` int(11) DEFAULT NULL COMMENT '排序',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '修改人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '修改时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
`level` int(11) DEFAULT NULL COMMENT '层级',
|
||
PRIMARY KEY (`id`)
|
||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='省份城市';
|
||
|
||
-- ----------------------------
|
||
-- Table structure for xs_file_record
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `xs_file_record`;
|
||
CREATE TABLE `xs_file_record` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||
`file_code` varchar(64) DEFAULT NULL COMMENT '文件编码',
|
||
`file_path` varchar(512) DEFAULT NULL COMMENT '文件路径',
|
||
`file_name` varchar(128) DEFAULT NULL COMMENT '文件名',
|
||
`file_size` int(11) DEFAULT NULL COMMENT '文件大小',
|
||
`md5_code` varchar(64) DEFAULT NULL COMMENT '文件MD5',
|
||
`file_suffix` varchar(32) DEFAULT NULL COMMENT '文件后缀',
|
||
`org_id` bigint(20) DEFAULT NULL COMMENT '所属机构',
|
||
`storage_type` varchar(32) DEFAULT NULL COMMENT '储存器类型',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '修改人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '修改时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`),
|
||
KEY `idx_file_code` (`file_code`)
|
||
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COMMENT='附件信息';
|
||
|
||
-- ----------------------------
|
||
-- Table structure for xs_org
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `xs_org`;
|
||
CREATE TABLE `xs_org` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||
`org_name` varchar(32) DEFAULT NULL COMMENT '机构名称',
|
||
`org_code` varchar(64) DEFAULT NULL COMMENT '机构编号',
|
||
`type` varchar(2) DEFAULT NULL COMMENT '机构类型(1.平台 2.渠道代理商 3.普通机构 4.定制机构 5.散户机构 6.产品机构)',
|
||
`address_code` varchar(16) DEFAULT NULL COMMENT '任务地点编码',
|
||
`address_name` varchar(128) DEFAULT NULL COMMENT '任务地点全称',
|
||
`description` varchar(1024) DEFAULT NULL COMMENT '机构描述',
|
||
`quality` bit(1) DEFAULT b'0' COMMENT '是否优质企业',
|
||
`enable` bit(1) DEFAULT NULL COMMENT '是否启用',
|
||
`activated` bit(1) DEFAULT b'0' COMMENT '是否激活',
|
||
`parent_id` bigint(20) DEFAULT NULL COMMENT '父机构ID',
|
||
`credit_code` varchar(64) DEFAULT NULL COMMENT '统一社会信用代码',
|
||
`trade` varchar(2) DEFAULT NULL COMMENT '所属行业',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '修改人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '修改时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
`activation_code` varchar(32) DEFAULT NULL COMMENT '机构账号激活码',
|
||
`phone` varchar(32) DEFAULT NULL COMMENT '手机号码',
|
||
`query_children` bit(1) DEFAULT NULL COMMENT '是否能查看下级数据',
|
||
`org_logo` varchar(64) DEFAULT NULL COMMENT '企业logo',
|
||
`registered_address` varchar(128) DEFAULT NULL COMMENT '注册地址',
|
||
`company_size` varchar(32) DEFAULT NULL COMMENT '规模 数据字典',
|
||
`business_license` varchar(64) DEFAULT NULL COMMENT '营业执照',
|
||
`recruit_position_type` varchar(2) NOT NULL DEFAULT '1' COMMENT '招聘岗位类型',
|
||
PRIMARY KEY (`id`)
|
||
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COMMENT='机构';
|
||
|
||
-- ----------------------------
|
||
-- Table structure for xs_org_user
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `xs_org_user`;
|
||
CREATE TABLE `xs_org_user` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||
`org_id` bigint(20) DEFAULT NULL COMMENT '机构id',
|
||
`user_id` bigint(20) DEFAULT NULL COMMENT '用户id',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '修改人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '修改时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`)
|
||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='机构用户';
|
||
|
||
-- ----------------------------
|
||
-- Table structure for xs_permission
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `xs_permission`;
|
||
CREATE TABLE `xs_permission` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||
`role_id` bigint(20) DEFAULT NULL COMMENT '角色id',
|
||
`resource_type` varchar(2) DEFAULT NULL COMMENT '资源类型:1菜单 2组件 3接口',
|
||
`resource_id` bigint(20) DEFAULT NULL COMMENT '资源id',
|
||
`attribute` varchar(32) DEFAULT NULL COMMENT '权限鉴别属性,默认格式:ROLE_{roleId},可以扩展',
|
||
`org_id` bigint(20) DEFAULT NULL COMMENT '机构id',
|
||
`platform_code` tinyint(4) DEFAULT NULL COMMENT '平台编码 1.业务系统 2.运营中台 3.用户中心 4.支付系统 5.在线培训 6.转发器 7.风控 8.网关 9.发号器 10.基础框架',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '修改人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '修改时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`)
|
||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='权限表';
|
||
|
||
-- ----------------------------
|
||
-- Table structure for xs_permission_organization
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `xs_permission_organization`;
|
||
CREATE TABLE `xs_permission_organization` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
|
||
`permission_package_id` bigint(20) DEFAULT NULL COMMENT '权限包id',
|
||
`allocation_org_id` bigint(20) DEFAULT NULL COMMENT '分配机构orgid',
|
||
`remark` varchar(100) DEFAULT NULL COMMENT '备注',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '修改人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '修改时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`),
|
||
KEY `idx_allocation_org_id` (`allocation_org_id`),
|
||
KEY `idx_permission_package_id` (`permission_package_id`)
|
||
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='权限包-机构关系表';
|
||
|
||
-- ----------------------------
|
||
-- Table structure for xs_permission_package
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `xs_permission_package`;
|
||
CREATE TABLE `xs_permission_package` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
|
||
`permission_package_name` varchar(64) DEFAULT NULL COMMENT '权限包名称',
|
||
`permission_package_type` tinyint(4) DEFAULT '1' COMMENT '类型 1.基础包 2.其他类型',
|
||
`platform_code` tinyint(4) DEFAULT NULL COMMENT '平台编码 1.业务系统 2.运营中台 3.用户中心 4.支付系统 5.在线培训 6.转发器 7.风控 8.网关 9.发号器 10.基础框架',
|
||
`status` tinyint(4) DEFAULT '1' COMMENT '状态 1.有效 2.失效',
|
||
`remark` varchar(100) DEFAULT NULL COMMENT '备注',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '修改人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '修改时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`)
|
||
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COMMENT='标准权限包';
|
||
|
||
-- ----------------------------
|
||
-- Table structure for xs_permission_resources
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `xs_permission_resources`;
|
||
CREATE TABLE `xs_permission_resources` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
|
||
`permission_package_id` bigint(20) DEFAULT NULL COMMENT '权限包id',
|
||
`resource_id` bigint(20) DEFAULT NULL COMMENT '资源id',
|
||
`resource_type` tinyint(4) DEFAULT '1' COMMENT '类型 1.菜单 2.组件 3.接口',
|
||
`remark` varchar(100) DEFAULT NULL COMMENT '备注',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '修改人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '修改时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`),
|
||
KEY `idx_resource_id` (`resource_id`),
|
||
KEY `INDEX12372582404500` (`permission_package_id`)
|
||
) ENGINE=InnoDB AUTO_INCREMENT=43 DEFAULT CHARSET=utf8mb4 COMMENT='权限包-资源关系表';
|
||
|
||
|
||
-- ----------------------------
|
||
-- Table structure for xs_role
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `xs_role`;
|
||
CREATE TABLE `xs_role` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||
`org_id` bigint(20) DEFAULT NULL COMMENT '机构id',
|
||
`name` varchar(128) DEFAULT NULL COMMENT '名称',
|
||
`type` varchar(2) DEFAULT '0' COMMENT '类型:0业务角色、1系统角色-渠道代理商、2系统角色-普通机构',
|
||
`enabled` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否启用',
|
||
`description` varchar(128) DEFAULT NULL COMMENT '描述',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '修改人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '修改时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
`standard_type` varchar(2) DEFAULT '1' COMMENT '标准角色类型:见role_standard_type',
|
||
`platform_code` tinyint(4) DEFAULT NULL COMMENT '平台编码',
|
||
PRIMARY KEY (`id`)
|
||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='角色';
|
||
|
||
-- ----------------------------
|
||
-- Table structure for xs_role_allocation
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `xs_role_allocation`;
|
||
CREATE TABLE `xs_role_allocation` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||
`role_id` bigint(20) DEFAULT NULL COMMENT '角色id',
|
||
`allocation_type` varchar(2) DEFAULT NULL COMMENT '角色分配类型:1个人2部门3组',
|
||
`allocation_id` bigint(20) DEFAULT NULL COMMENT '角色具体分配类型对应的id',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '修改人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '修改时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`),
|
||
KEY `idx_allocation_id` (`allocation_id`)
|
||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='角色分配表';
|
||
|
||
-- ----------------------------
|
||
-- Table structure for xs_role_standard_type
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `xs_role_standard_type`;
|
||
CREATE TABLE `xs_role_standard_type` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||
`role_code` varchar(32) DEFAULT NULL COMMENT '编码',
|
||
`name` varchar(64) DEFAULT NULL COMMENT '名称',
|
||
`platform_code` varchar(32) DEFAULT NULL COMMENT '平台编码',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否逻辑删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
`type_order` int(11) DEFAULT NULL COMMENT '排序',
|
||
PRIMARY KEY (`id`)
|
||
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COMMENT='标准角色类型';
|
||
|
||
-- ----------------------------
|
||
-- Table structure for xs_url
|
||
-- ----------------------------
|
||
DROP TABLE IF EXISTS `xs_url`;
|
||
CREATE TABLE `xs_url` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||
`name` varchar(128) DEFAULT NULL COMMENT '名称',
|
||
`link` varchar(256) DEFAULT NULL COMMENT '链接',
|
||
`icon` varchar(32) DEFAULT NULL COMMENT 'icon',
|
||
`parent_id` bigint(20) DEFAULT NULL COMMENT '父级',
|
||
`resource_order` int(11) DEFAULT NULL COMMENT '排序',
|
||
`type` tinyint(4) DEFAULT NULL COMMENT '资源类型 1:菜单 2:接口',
|
||
`visible` bit(1) DEFAULT NULL COMMENT '是否可见',
|
||
`description` varchar(128) DEFAULT NULL COMMENT '描述',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '修改人',
|
||
`update_time` datetime DEFAULT NULL COMMENT '修改时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
`platform_code` tinyint(4) DEFAULT NULL COMMENT '平台编码',
|
||
PRIMARY KEY (`id`)
|
||
) ENGINE=InnoDB AUTO_INCREMENT=36 DEFAULT CHARSET=utf8mb4 COMMENT='菜单地址';
|
||
|
||
|
||
|
||
|
||
|
||
|
||
CREATE TABLE `x_file_category` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||
`file_category` varchar(32) DEFAULT NULL COMMENT '文件种类',
|
||
`file_suffix` varchar(32) DEFAULT NULL COMMENT '文件后缀',
|
||
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '修改人',
|
||
`update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`) USING BTREE
|
||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='文件种类';
|
||
|
||
CREATE TABLE `x_user_space` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||
`user_id` bigint(20) DEFAULT NULL COMMENT '用户id',
|
||
`total_size` bigint DEFAULT NULL COMMENT '总容量',
|
||
`used_size` bigint DEFAULT NULL COMMENT '已使用容量',
|
||
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '修改人',
|
||
`update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`) USING BTREE
|
||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户空间';
|
||
|
||
CREATE TABLE `x_user_file` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||
`user_id` bigint(20) DEFAULT NULL COMMENT '用户id',
|
||
`root_type` varchar(2) DEFAULT NULL COMMENT '根类型:1普通/2内穿外/3外传内/4我的分享',
|
||
`file_type` varchar(32) DEFAULT NULL COMMENT '文件大类:1文件/2文件夹',
|
||
`file_name` varchar(256) DEFAULT NULL COMMENT '文件名',
|
||
`parent_id` bigint(20) DEFAULT NULL COMMENT '父id',
|
||
`file_code` varchar(32) DEFAULT NULL COMMENT '文件编码',
|
||
`file_status` varchar(2) DEFAULT NULL COMMENT '文件状态:1正常2失效11解析中12待审核13传输中',
|
||
`path` varchar(255) DEFAULT NULL COMMENT '路径',
|
||
`end_time` datetime DEFAULT NULL COMMENT '有效期',
|
||
`access_code` varchar(6) DEFAULT NULL COMMENT '访问码',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '修改人',
|
||
`update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`) USING BTREE
|
||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户文件';
|
||
|
||
CREATE TABLE `x_file_risk` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||
`file_code` varchar(32) DEFAULT NULL COMMENT '文件编码',
|
||
`max_risk_level` varchar(2) DEFAULT NULL COMMENT '最高风险等级:1重度/2中度/3轻度',
|
||
`risk_json` text DEFAULT NULL COMMENT '风险详情JSON',
|
||
`dify_file_json` text DEFAULT NULL COMMENT 'Dify文件上传响应JSON',
|
||
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '修改人',
|
||
`update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`) USING BTREE,
|
||
UNIQUE KEY `uk_file_code` (`file_code`) USING BTREE COMMENT '文件编码唯一索引'
|
||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='文件风险';
|
||
|
||
|
||
|
||
CREATE TABLE `x_upload_config` (
|
||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||
`org_id` bigint(20) DEFAULT NULL COMMENT '机构id',
|
||
`upload_enabled` bit(1) DEFAULT b'1' COMMENT '是否允许上传',
|
||
`allow_all_type` bit(1) DEFAULT b'1' COMMENT '是否允许全部类型(false时按allowed_suffixes白名单校验)',
|
||
`allowed_suffixes` varchar(1024) DEFAULT NULL COMMENT '允许的文件后缀(逗号分隔,小写),allow_all_type=false时生效',
|
||
`max_file_size` bigint(20) DEFAULT NULL COMMENT '单文件大小上限(MB),空或0不限制',
|
||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否删除',
|
||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||
`update_by` bigint(20) DEFAULT NULL COMMENT '修改人',
|
||
`update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||
PRIMARY KEY (`id`) USING BTREE,
|
||
UNIQUE KEY `uk_org_id` (`org_id`)
|
||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='机构上传配置';
|
||
|
||
SET FOREIGN_KEY_CHECKS = 1; |