6 changed files with 687 additions and 3 deletions
@ -0,0 +1,86 @@ |
|||
|
|||
-- 20210115--交付物重新设计 |
|||
|
|||
-- 交付物表 任务关联交付物插件后,只是有插件,并没有需要上传的交付物的信息,需要添加交付物信息 |
|||
DROP TABLE IF EXISTS `t_plu_deliver`; |
|||
CREATE TABLE `t_plu_deliver` ( |
|||
`id` bigint(20) NOT NULL, |
|||
`task_sub_id` bigint(20) DEFAULT 0 COMMENT '任务分解id', |
|||
`name` varchar(64) DEFAULT '' COMMENT '交付物名称', |
|||
`description` varchar(255) DEFAULT '' COMMENT '详情介绍', |
|||
|
|||
`operator` bigint(20) DEFAULT 0 COMMENT '操作人id', |
|||
`created_at` timestamp NOT NULL DEFAULT current_timestamp(), |
|||
`updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), |
|||
`rec_status` tinyint(1) unsigned DEFAULT 0, |
|||
PRIMARY KEY (`id`) USING BTREE, |
|||
KEY `task_sub_id_index` (`task_sub_id`) USING BTREE |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='交付物表'; |
|||
|
|||
|
|||
-- 交付物提交记录表 任务的负责人提交的记录 |
|||
DROP TABLE IF EXISTS `t_plu_deliver_record`; |
|||
CREATE TABLE `t_plu_deliver_record` ( |
|||
`id` bigint(20) NOT NULL, |
|||
`deliver_id` bigint(20) DEFAULT 0 COMMENT '交付物id', |
|||
`submit_time` bigint(20) DEFAULT 0 COMMENT '提交的时间', |
|||
`member_id` bigint(20) DEFAULT 0 COMMENT '提交者(成员id)', |
|||
|
|||
`operator` bigint(20) DEFAULT 0 COMMENT '操作人id', |
|||
`created_at` timestamp NOT NULL DEFAULT current_timestamp(), |
|||
`updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), |
|||
`rec_status` tinyint(1) unsigned DEFAULT 0, |
|||
PRIMARY KEY (`id`) USING BTREE, |
|||
KEY `deliver_index` (`deliver_id`) USING BTREE, |
|||
KEY `member_index` (`member_id`) USING BTREE |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='交付物提交记录表'; |
|||
|
|||
-- 交付物上传文件表 |
|||
DROP TABLE IF EXISTS `t_plu_deliver_record_file`; |
|||
CREATE TABLE `t_plu_deliver_record_file` ( |
|||
`id` bigint(20) NOT NULL, |
|||
`deliver_record_id` bigint(20) DEFAULT 0 COMMENT '交付物提交记录id', |
|||
`file_id` bigint(20) DEFAULT 0 COMMENT '文件id', |
|||
`file_name` varchar(10) DEFAULT '' COMMENT '文件名', |
|||
`file_path` varchar(256) DEFAULT '' COMMENT '文件路径', |
|||
|
|||
`operator` bigint(20) DEFAULT 0 COMMENT '操作人id', |
|||
`created_at` timestamp NOT NULL DEFAULT current_timestamp(), |
|||
`updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), |
|||
`rec_status` tinyint(1) unsigned DEFAULT 0, |
|||
PRIMARY KEY (`id`) USING BTREE, |
|||
KEY `deliver_record_index` (`deliver_record_id`) USING BTREE |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='交付物上传文件表'; |
|||
|
|||
-- 交付物检查人表 |
|||
DROP TABLE IF EXISTS `t_plu_deliver_record_check`; |
|||
CREATE TABLE `t_plu_deliver_record_check` ( |
|||
`id` bigint(20) NOT NULL, |
|||
`deliver_record_id` bigint(20) DEFAULT 0 COMMENT '交付物提交记录id', |
|||
`checker_id` bigint(20) DEFAULT 0 COMMENT '检查人id(成员id)', |
|||
|
|||
`operator` bigint(20) DEFAULT 0 COMMENT '操作人id', |
|||
`created_at` timestamp NOT NULL DEFAULT current_timestamp(), |
|||
`updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), |
|||
`rec_status` tinyint(1) unsigned DEFAULT 0, |
|||
PRIMARY KEY (`id`) USING BTREE, |
|||
KEY `deliver_record_index` (`deliver_record_id`) USING BTREE |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='交付物检查人表'; |
|||
|
|||
-- 交付物检查记录表 |
|||
DROP TABLE IF EXISTS `t_plu_deliver_record_check_log`; |
|||
CREATE TABLE `t_plu_deliver_record_check_log` ( |
|||
`id` bigint(20) NOT NULL, |
|||
`record_check_id` bigint(20) DEFAULT 0 COMMENT '交付物检查人id', |
|||
`score` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '分数', |
|||
`remark` varchar(255) DEFAULT '' COMMENT '备注', |
|||
`check_status` tinyint(1) DEFAULT 0 COMMENT '检查状态(0-未审核,1-合格,2-驳回)', |
|||
`time` bigint(20) DEFAULT 0 COMMENT '审核时间', |
|||
|
|||
`operator` bigint(20) DEFAULT 0 COMMENT '操作人id', |
|||
`created_at` timestamp NOT NULL DEFAULT current_timestamp(), |
|||
`updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), |
|||
`rec_status` tinyint(1) unsigned DEFAULT 0, |
|||
PRIMARY KEY (`id`) USING BTREE, |
|||
KEY `record_check_index` (`record_check_id`) USING BTREE |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='交付物检查记录表'; |
@ -0,0 +1,134 @@ |
|||
|
|||
-- 财务费用分类表 |
|||
DROP TABLE IF EXISTS `t_plu_finance_type`; |
|||
CREATE TABLE `t_plu_finance_type` ( |
|||
`id` bigint(20) NOT NULL, |
|||
`name` varchar(64) DEFAULT '' COMMENT '分类名', |
|||
`parent_id` bigint(20) DEFAULT 0 COMMENT '上级id', |
|||
`level` tinyint(1) unsigned DEFAULT 0 COMMENT '分类登记 0类型 1类目 2名目', |
|||
|
|||
`operator` bigint(20) DEFAULT 0 COMMENT '操作人id', |
|||
`created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '创建日期', |
|||
`updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT '修改日期', |
|||
`rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', |
|||
PRIMARY KEY (`id`) USING BTREE |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='财务费用分类表'; |
|||
|
|||
-- 财务信息 |
|||
DROP TABLE IF EXISTS `t_plu_finance`; |
|||
CREATE TABLE `t_plu_finance` ( |
|||
`id` bigint(20) NOT NULL, |
|||
`type` tinyint(1) unsigned DEFAULT 0 COMMENT '财务类型 0项目财务条 1任务财务条', |
|||
`budget` bigint(20) DEFAULT 0 COMMENT '预算', |
|||
`bonus` bigint(20) DEFAULT 0 COMMENT '奖金', |
|||
`task_id` bigint(20) DEFAULT 0 COMMENT '关联的任务或项目id', |
|||
|
|||
`operator` bigint(20) DEFAULT 0 COMMENT '操作人id', |
|||
`created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '创建日期', |
|||
`updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT '修改日期', |
|||
`rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', |
|||
PRIMARY KEY (`id`) USING BTREE |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='财务信息'; |
|||
|
|||
|
|||
-- 财务预算追加信息 |
|||
DROP TABLE IF EXISTS `t_plu_finance_append_budget`; |
|||
CREATE TABLE `t_plu_finance_append_budget` ( |
|||
`id` bigint(20) NOT NULL, |
|||
`finance_id` bigint(20) DEFAULT 0 COMMENT '财务id', |
|||
`add_budget` bigint(20) DEFAULT 0 COMMENT '追加的预算', |
|||
`member_id` bigint(20) DEFAULT 0 COMMENT '操作人id', |
|||
|
|||
`operator` bigint(20) DEFAULT 0 COMMENT '操作人id', |
|||
`created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '创建日期', |
|||
`updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT '修改日期', |
|||
`rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', |
|||
PRIMARY KEY (`id`) USING BTREE, |
|||
INDEX `budget_finance_index`(`finance_id`) USING BTREE |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='财务预算追加信息'; |
|||
|
|||
-- 财务费用申请表 |
|||
DROP TABLE IF EXISTS `t_plu_finance_apply`; |
|||
CREATE TABLE `t_plu_finance_apply` ( |
|||
`id` bigint(20) NOT NULL, |
|||
`finance_id` bigint(20) DEFAULT 0 COMMENT '财务id', |
|||
`member_id` bigint(20) DEFAULT 0 COMMENT '申请人id', |
|||
`type_id` bigint(20) DEFAULT 0 COMMENT '类型id', |
|||
`category_id` bigint(20) DEFAULT 0 COMMENT '类目id', |
|||
`row_id` bigint(20) DEFAULT 0 COMMENT '名目id', |
|||
`remark` varchar(128) DEFAULT '' COMMENT '备注', |
|||
`project_id` bigint(20) DEFAULT 0 COMMENT '项目id', |
|||
`task_id` bigint(20) DEFAULT 0 COMMENT '任务id', |
|||
`submit_name` varchar(64) DEFAULT '' COMMENT '提交人姓名', |
|||
`department` varchar(64) DEFAULT '' COMMENT '所属部门 暂时存储汉字,不关联', |
|||
`money` bigint(20) DEFAULT 0 COMMENT '申请总金额', |
|||
`apply_time` bigint(20) DEFAULT 0 COMMENT '申请时间', |
|||
`apply_type` tinyint(1) unsigned DEFAULT 0 COMMENT '当前放款状态 0待审批 1已驳回 2已放款 3已领取', |
|||
`invoice` tinyint(1) unsigned DEFAULT 0 COMMENT '是否上传了发票 0未上传 1已上传', |
|||
|
|||
`operator` bigint(20) DEFAULT 0 COMMENT '操作人id', |
|||
`created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '创建日期', |
|||
`updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT '修改日期', |
|||
`rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', |
|||
PRIMARY KEY (`id`) USING BTREE, |
|||
INDEX `apply_finance_index`(`finance_id`) USING BTREE, |
|||
INDEX `apply_type_index`(`type_id`) USING BTREE, |
|||
INDEX `apply_category_index`(`category_id`) USING BTREE, |
|||
INDEX `apply_row_index`(`row_id`) USING BTREE |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='财务费用申请表'; |
|||
|
|||
|
|||
-- 费用申请发票表 |
|||
DROP TABLE IF EXISTS `t_plu_finance_invoice`; |
|||
CREATE TABLE `t_plu_finance_invoice` ( |
|||
`id` bigint(20) NOT NULL, |
|||
`finance_apply_id` bigint(20) DEFAULT 0 COMMENT '财务支出申请表id', |
|||
`url` varchar(256) DEFAULT '' COMMENT '发票浏览地址', |
|||
`invoice_code` varchar(64) DEFAULT '' COMMENT '发票代码', |
|||
`invoice_number` varchar(64) DEFAULT '' COMMENT '发票号码', |
|||
`money` bigint(20) DEFAULT 0 COMMENT '金额', |
|||
`tax_money` bigint(20) DEFAULT 0 COMMENT '税额', |
|||
`invoice_time` bigint(20) DEFAULT 0 COMMENT '开票时间', |
|||
`remark` varchar(128) DEFAULT '' COMMENT '备注', |
|||
|
|||
`operator` bigint(20) DEFAULT 0 COMMENT '操作人id', |
|||
`created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '创建日期', |
|||
`updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT '修改日期', |
|||
`rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', |
|||
PRIMARY KEY (`id`) USING BTREE, |
|||
INDEX `invoice_finance_apply_index`(`finance_apply_id`) USING BTREE |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='费用申请发票表'; |
|||
|
|||
|
|||
-- 费用申请审核表 |
|||
DROP TABLE IF EXISTS `t_plu_finance_check`; |
|||
CREATE TABLE `t_plu_finance_check` ( |
|||
`id` bigint(20) NOT NULL, |
|||
`finance_apply_id` bigint(20) DEFAULT 0 COMMENT '财务费用申请表id', |
|||
`checker_id` bigint(20) DEFAULT 0 COMMENT '审核人id', |
|||
|
|||
`operator` bigint(20) DEFAULT 0 COMMENT '操作人id', |
|||
`created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '创建日期', |
|||
`updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT '修改日期', |
|||
`rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', |
|||
PRIMARY KEY (`id`) USING BTREE, |
|||
INDEX `check_finance_apply_index`(`finance_apply_id`) USING BTREE |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='费用申请审核表'; |
|||
|
|||
|
|||
-- 审核记录表 |
|||
DROP TABLE IF EXISTS `t_plu_finance_check_log`; |
|||
CREATE TABLE `t_plu_finance_check_log` ( |
|||
`id` bigint(20) NOT NULL, |
|||
`check_id` bigint(20) DEFAULT 0 COMMENT '审核表id', |
|||
`check_status` tinyint(1) unsigned DEFAULT 0 COMMENT '审核状态 0未审核 1已通过 2驳回', |
|||
`check_time` bigint(20) DEFAULT 0 COMMENT '审核时间', |
|||
`remark` varchar(64) DEFAULT '' COMMENT '备注信息', |
|||
|
|||
`operator` bigint(20) DEFAULT 0 COMMENT '操作人id', |
|||
`created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '创建日期', |
|||
`updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT '修改日期', |
|||
`rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', |
|||
PRIMARY KEY (`id`) USING BTREE, |
|||
INDEX `check_finance_apply_index`(`finance_apply_id`) USING BTREE |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='审核记录表'; |
@ -0,0 +1,173 @@ |
|||
|
|||
-- -- 运维账号表 |
|||
-- DROP TABLE IF EXISTS `t_idc_admin_account`; |
|||
-- CREATE TABLE `t_idc_admin_account` ( |
|||
-- `id` bigint(20) NOT NULL, |
|||
-- `userName` varchar(32) DEFAULT '' COMMENT '账号', |
|||
-- `password` varchar(32) DEFAULT '' COMMENT '密码', |
|||
|
|||
-- `operator` bigint(20) DEFAULT 0 COMMENT '操作人id', |
|||
-- `created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '创建日期', |
|||
-- `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT '修改日期', |
|||
-- `rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', |
|||
-- PRIMARY KEY (`id`) USING BTREE |
|||
-- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='运维账号表'; |
|||
|
|||
|
|||
-- -- 域基本信息表 |
|||
-- DROP TABLE IF EXISTS `t_idc_domain`; |
|||
-- CREATE TABLE `t_idc_domain` ( |
|||
-- `id` bigint(20) NOT NULL, |
|||
-- `name` varchar(32) DEFAULT '' COMMENT '名称', |
|||
-- `code` varchar(32) DEFAULT '' COMMENT 'code', |
|||
-- `intro` VARCHAR(512) DEFAULT '' COMMENT '简介', |
|||
-- `domain_name` VARCHAR(255) DEFAULT '' COMMENT '域名(网址)', |
|||
-- `company` VARCHAR(64) DEFAULT '' COMMENT '所属公司', |
|||
-- `time` bigint(20) DEFAULT 0 COMMENT '创建时间', |
|||
-- `public_domain` tinyint(1) unsigned DEFAULT 0 COMMENT '是否是当前域的公域 0否 1是', |
|||
-- `last_rcv_time` bigint(20) DEFAULT 0 COMMENT '最后通讯时间', |
|||
|
|||
-- `operator` bigint(20) DEFAULT 0 COMMENT '操作人id', |
|||
-- `created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '创建日期', |
|||
-- `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT '修改日期', |
|||
-- `rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', |
|||
-- PRIMARY KEY (`id`) USING BTREE |
|||
-- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='域基本信息表'; |
|||
|
|||
-- -- 业务基本信息表 |
|||
-- DROP TABLE IF EXISTS `t_idc_business`; |
|||
-- CREATE TABLE `t_idc_business` ( |
|||
-- `id` bigint(20) NOT NULL, |
|||
-- `name` varchar(32) DEFAULT '' COMMENT '名称', |
|||
-- `code` varchar(32) DEFAULT '' COMMENT 'code', |
|||
-- `description` VARCHAR(512) DEFAULT '' COMMENT '业务描述', |
|||
-- `creator_id` bigint(20) DEFAULT 0 COMMENT '创建者id(数据中心内的用户id))', |
|||
|
|||
-- `operator` bigint(20) DEFAULT 0 COMMENT '操作人id', |
|||
-- `created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '创建日期', |
|||
-- `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT '修改日期', |
|||
-- `rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', |
|||
-- PRIMARY KEY (`id`) USING BTREE, |
|||
-- INDEX `business_creator_index`(`creator_id`) USING BTREE |
|||
-- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='业务基本信息表'; |
|||
|
|||
-- -- 用户基本信息表 |
|||
-- DROP TABLE IF EXISTS `t_idc_user`; |
|||
-- CREATE TABLE `t_idc_user` ( |
|||
-- `id` bigint(20) NOT NULL, |
|||
-- `id_card` varchar(32) DEFAULT '' COMMENT '身份证号', |
|||
-- `phone` varchar(32) DEFAULT '' COMMENT '手机号', |
|||
|
|||
-- `operator` bigint(20) DEFAULT 0 COMMENT '操作人id', |
|||
-- `created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '创建日期', |
|||
-- `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT '修改日期', |
|||
-- `rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', |
|||
-- PRIMARY KEY (`id`) USING BTREE |
|||
-- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='用户唯一身份表'; |
|||
|
|||
|
|||
-- -- 域和业务关系表 |
|||
-- DROP TABLE IF EXISTS `t_idc_domain_business`; |
|||
-- CREATE TABLE `t_idc_domain_business` ( |
|||
-- `id` bigint(20) NOT NULL, |
|||
-- `domain_id` bigint(20) DEFAULT 0 COMMENT '域id', |
|||
-- `business_id` bigint(20) DEFAULT 0 COMMENT '业务id', |
|||
-- `url` varchar(512) DEFAULT '' COMMENT '请求路径', |
|||
-- `app_id` varchar(64) DEFAULT '' COMMENT '业务appId', |
|||
-- `secret` varchar(64) DEFAULT '' COMMENT 'secret', |
|||
|
|||
-- `operator` bigint(20) DEFAULT 0 COMMENT '操作人id', |
|||
-- `created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '创建日期', |
|||
-- `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT '修改日期', |
|||
-- `rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', |
|||
-- PRIMARY KEY (`id`) USING BTREE, |
|||
-- INDEX `domain_index`(`domain_id`) USING BTREE, |
|||
-- INDEX `business_index`(`business_id`) USING BTREE |
|||
-- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='域和业务关系表'; |
|||
|
|||
|
|||
-- -- 用户和域关系表 |
|||
-- DROP TABLE IF EXISTS `t_idc_user_domain`; |
|||
-- CREATE TABLE `t_idc_user_domain` ( |
|||
-- `id` bigint(20) NOT NULL, |
|||
-- `user_id` bigint(20) DEFAULT 0 COMMENT '数据中心的用户id', |
|||
-- `domain_id` bigint(20) DEFAULT 0 COMMENT '域id', |
|||
-- `domain_user_id` bigint(20) DEFAULT 0 COMMENT '域内的用户id', |
|||
-- `name` varchar(32) DEFAULT '' COMMENT '用户名称', |
|||
-- `gender`tinyint(1) unsigned DEFAULT 0 COMMENT '性别 0女 1男', |
|||
-- `avatar_url` varchar(255) DEFAULT '' COMMENT '头像', |
|||
-- `country` varchar(32) DEFAULT '' COMMENT '国家', |
|||
-- `province` varchar(32) DEFAULT '' COMMENT '省份', |
|||
-- `city` varchar(32) DEFAULT '' COMMENT '城市', |
|||
|
|||
-- `operator` bigint(20) DEFAULT 0 COMMENT '操作人id', |
|||
-- `created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '创建日期', |
|||
-- `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT '修改日期', |
|||
-- `rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', |
|||
-- PRIMARY KEY (`id`) USING BTREE, |
|||
-- INDEX `domain_index`(`domain_id`) USING BTREE, |
|||
-- INDEX `user_index`(`user_id`) USING BTREE, |
|||
-- INDEX `domain_user_index`(`domain_user_id`) USING BTREE |
|||
-- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='用户和域关系表'; |
|||
|
|||
|
|||
-- -- 常量表 |
|||
-- DROP TABLE IF EXISTS `t_constant`; |
|||
-- CREATE TABLE `t_constant` ( |
|||
-- `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, |
|||
-- `name` varchar(128) DEFAULT '' COMMENT '描述', |
|||
-- `t_key` varchar(128) DEFAULT '' COMMENT '唯一标识', |
|||
-- `t_value` varchar(256) DEFAULT '' COMMENT '参数', |
|||
-- `version` varchar(32) DEFAULT '' COMMENT '版本号', |
|||
|
|||
-- `operator` bigint(20) DEFAULT 0 COMMENT '操作人id', |
|||
-- `created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '创建日期', |
|||
-- `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT '修改日期', |
|||
-- `rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', |
|||
-- PRIMARY KEY (`id`) USING BTREE |
|||
-- ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='常量表'; |
|||
|
|||
|
|||
|
|||
|
|||
-- 域基本信息表 |
|||
DROP TABLE IF EXISTS `t_idc_domain`; |
|||
CREATE TABLE `t_idc_domain` ( |
|||
`id` bigint(20) NOT NULL, |
|||
`name` varchar(32) DEFAULT '' COMMENT '名称', |
|||
`code` varchar(32) DEFAULT '' COMMENT 'code', |
|||
`intro` VARCHAR(512) DEFAULT '' COMMENT '简介', |
|||
`url` VARCHAR(128) DEFAULT '' COMMENT '访问前缀', |
|||
`host` VARCHAR(64) DEFAULT '' COMMENT 'ip/域名', |
|||
`self` tinyint(1) unsigned DEFAULT 0 COMMENT '是否是自身 0否 1是', |
|||
`pub` tinyint(1) unsigned DEFAULT 0 COMMENT '是否是当前域的公域 0否 1是', |
|||
`polling` tinyint(1) unsigned DEFAULT 1 COMMENT '是否轮询 0否 1是', |
|||
`answer` tinyint(1) unsigned DEFAULT 1 COMMENT '是否接受该域的请求 0否 1是', |
|||
`last_update_time` bigint(20) DEFAULT 0 COMMENT '最后更新时间', |
|||
`last_ask_time` bigint(20) DEFAULT 0 COMMENT '最后请求时间', |
|||
`last_answer_time` bigint(20) DEFAULT 0 COMMENT '最后应答时间', |
|||
`pubkey` VARCHAR(1024) DEFAULT '' COMMENT '公钥', |
|||
`private_key` VARCHAR(1024) DEFAULT '' COMMENT '私钥', |
|||
|
|||
`operator` bigint(20) DEFAULT 0 COMMENT '操作人id', |
|||
`created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '创建日期', |
|||
`updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT '修改日期', |
|||
`rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', |
|||
PRIMARY KEY (`id`) USING BTREE, |
|||
INDEX `code_index`(`code`) USING BTREE |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='域基本信息表'; |
|||
|
|||
INSERT INTO `t_idc_domain` |
|||
(`id`, `name`, `code`, `intro`, `url`, `host`, `last_update_time`, `last_ask_time`, `last_answer_time`) |
|||
VALUES |
|||
(1, '数字管理', 'domain_dm', '数字管理,法力无边', 'https://www.tall.wiki/gateway/dataCentre','www.tall.wiki', 1641475360723, 1641475360723, 1641475360723); |
|||
|
|||
INSERT INTO `t_idc_domain` |
|||
(`id`, `name`, `code`, `intro`, `url`, `host`, `last_update_time`, `last_ask_time`, `last_answer_time`) |
|||
VALUES |
|||
(2, '数字医疗', 'domain_dh', '数字医疗,破尽天下疑难杂症', 'http://101.201.226.163/gateway/dataCentre','101.201.226.163', 1641475360723, 1641475360723, 1641475360723); |
|||
|
|||
INSERT INTO `t_idc_domain` |
|||
(`id`, `name`, `code`, `intro`, `url`, `host`, `last_update_time`, `last_ask_time`, `last_answer_time`) |
|||
VALUES |
|||
(3, '数字工厂', 'domain_df', '数字工厂,专早坦克', 'http://121.36.106.168/gateway/dataCentre','121.36.106.168', 1641475360723, 1641475360723, 1641475360723); |
@ -0,0 +1,205 @@ |
|||
-- -- 用户基本信息表 |
|||
-- DROP TABLE IF EXISTS `t_sys_user`; |
|||
-- CREATE TABLE `t_sys_user` ( |
|||
-- `id` bigint(20) NOT NULL, |
|||
-- `name` varchar(32) DEFAULT '' COMMENT '用户名称', |
|||
-- `gender`tinyint(1) unsigned DEFAULT 0 COMMENT '性别 0女 1男', |
|||
-- `avatar_url` varchar(255) DEFAULT '' COMMENT '头像', |
|||
-- `country` varchar(32) DEFAULT '' COMMENT '国家', |
|||
-- `province` varchar(32) DEFAULT '' COMMENT '省份', |
|||
-- `city` varchar(32) DEFAULT '' COMMENT '城市', |
|||
-- `phone` varchar(32) DEFAULT '' COMMENT '手机号', |
|||
-- `id_card` varchar(32) DEFAULT '' COMMENT '身份证号', |
|||
-- `power` tinyint(1) unsigned DEFAULT 0 COMMENT '访问权限 0客户端 1开放平台 3全部', |
|||
|
|||
-- `operator` bigint(20) DEFAULT 0 COMMENT '操作人id', |
|||
-- `created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '创建日期', |
|||
-- `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT '修改日期', |
|||
-- `rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', |
|||
-- PRIMARY KEY (`id`) USING BTREE |
|||
-- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='用户基本信息表'; |
|||
|
|||
-- -- 用户认证信息表 |
|||
-- DROP TABLE IF EXISTS `t_sys_auth`; |
|||
-- CREATE TABLE `t_sys_auth` ( |
|||
-- `id` bigint(20) NOT NULL, |
|||
-- `user_id` bigint(20) DEFAULT 0 COMMENT '用户id', |
|||
-- `identify_type` tinyint(2) unsigned DEFAULT 0 COMMENT '认证的类型 0微信小程序,1电话,2邮箱,3账号,4微信公众号,5微信网页登陆,6微博,7企业微信', |
|||
-- `identifier`varchar(32) DEFAULT '' COMMENT '用户标识()手机号等', |
|||
-- `credential` varchar(32) DEFAULT '' COMMENT '用户凭证/密码', |
|||
-- `salt` varchar(64) DEFAULT '' COMMENT '盐,加密时所需', |
|||
|
|||
-- `operator` bigint(20) DEFAULT 0 COMMENT '操作人id', |
|||
-- `created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '创建日期', |
|||
-- `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT '修改日期', |
|||
-- `rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', |
|||
-- PRIMARY KEY (`id`) USING BTREE, |
|||
-- INDEX `auth_user_index`(`user_id`) USING BTREE, |
|||
-- INDEX `auth_identify_type_index`(`identify_type`) USING BTREE, |
|||
-- INDEX `auth_identifier_index`(`identifier`) USING BTREE |
|||
-- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='用户认证信息表'; |
|||
|
|||
-- -- 用户登录记录表 |
|||
-- DROP TABLE IF EXISTS `t_sys_signin_log`; |
|||
-- CREATE TABLE `t_sys_signin_log` ( |
|||
-- `id` bigint(20) NOT NULL, |
|||
-- `user_id` bigint(20) DEFAULT 0 COMMENT '用户id', |
|||
-- `time`bigint(20) DEFAULT 0 COMMENT '登录时间', |
|||
-- `client_type` tinyint(1) unsigned DEFAULT 0 COMMENT '客户端类型 0H5 1App', |
|||
-- `sidentify_type` tinyint(1) unsigned DEFAULT 0 COMMENT '登录类型 0微信小程序,1电话,2邮箱,3账号,4微信公众号,5微信网页登陆,6微博,7企业微信', |
|||
-- `ip_address` varchar(64) DEFAULT '' COMMENT 'ip地址', |
|||
|
|||
-- `operator` bigint(20) DEFAULT 0 COMMENT '操作人id', |
|||
-- `created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '创建日期', |
|||
-- `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT '修改日期', |
|||
-- `rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', |
|||
-- PRIMARY KEY (`id`) USING BTREE, |
|||
-- INDEX `signin_user_index`(`user_id`) USING BTREE, |
|||
-- INDEX `signin_client_type_index`(`client_type`) USING BTREE, |
|||
-- INDEX `signin_sidentify_type_index`(`sidentify_type`) USING BTREE |
|||
-- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='用户登录记录表'; |
|||
|
|||
|
|||
|
|||
-- -- 业务信息表 |
|||
-- DROP TABLE IF EXISTS `t_sys_business`; |
|||
-- CREATE TABLE `t_sys_business` ( |
|||
-- `id` bigint(20) NOT NULL, |
|||
-- `name` varchar(64) DEFAULT '' COMMENT '名称', |
|||
-- `code` varchar(64) DEFAULT '' COMMENT 'code', |
|||
-- `description` VARCHAR(512) DEFAULT '' COMMENT '业务描述', |
|||
-- `url` varchar(512) DEFAULT '' COMMENT '请求路径', |
|||
-- `app_id` varchar(64) DEFAULT '' COMMENT '业务appId', |
|||
-- `secret` varchar(64) DEFAULT '' COMMENT 'secret', |
|||
-- `creator_id` bigint(20) DEFAULT 0 COMMENT '创建者id', |
|||
|
|||
-- `operator` bigint(20) DEFAULT 0 COMMENT '操作人id', |
|||
-- `created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '创建日期', |
|||
-- `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT '修改日期', |
|||
-- `rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', |
|||
-- PRIMARY KEY (`id`) USING BTREE, |
|||
-- INDEX `business_creator_index`(`creator_id`) USING BTREE |
|||
-- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='业务信息表'; |
|||
|
|||
-- -- 用户业务关联表 |
|||
-- DROP TABLE IF EXISTS `t_sys_user_business`; |
|||
-- CREATE TABLE `t_sys_user_business` ( |
|||
-- `id` bigint(20) NOT NULL, |
|||
-- `user_id` bigint(20) DEFAULT 0 COMMENT '用户id', |
|||
-- `business_id` bigint(20) DEFAULT 0 COMMENT '业务id', |
|||
|
|||
-- `operator` bigint(20) DEFAULT 0 COMMENT '操作人id', |
|||
-- `created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '创建日期', |
|||
-- `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT '修改日期', |
|||
-- `rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', |
|||
-- PRIMARY KEY (`id`) USING BTREE, |
|||
-- INDEX `user_idndex`(`user_id`) USING BTREE, |
|||
-- INDEX `business_idndex`(`business_id`) USING BTREE |
|||
-- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='用户业务关联表'; |
|||
|
|||
|
|||
|
|||
-- 用户基本信息表 |
|||
DROP TABLE IF EXISTS `t_sys_user`; |
|||
CREATE TABLE `t_sys_user` ( |
|||
`id` bigint(20) NOT NULL, |
|||
`name` varchar(32) DEFAULT '' COMMENT '用户名称', |
|||
`gender`tinyint(1) unsigned DEFAULT 0 COMMENT '性别 0女 1男', |
|||
`avatar_url` varchar(255) DEFAULT '' COMMENT '头像', |
|||
`country` varchar(32) DEFAULT '' COMMENT '国家', |
|||
`province` varchar(32) DEFAULT '' COMMENT '省份', |
|||
`city` varchar(32) DEFAULT '' COMMENT '城市', |
|||
`phone` varchar(32) DEFAULT '' COMMENT '手机号', |
|||
`id_card` varchar(32) DEFAULT '' COMMENT '身份证号', |
|||
`power` tinyint(1) unsigned DEFAULT 0 COMMENT '访问权限 0客户端 1开放平台 3全部', |
|||
`device_id` varchar(64) DEFAULT '' COMMENT '主设备id', |
|||
`auth_type` tinyint(1) unsigned DEFAULT 0 COMMENT '用户认证类型 0未认证 1认证', |
|||
|
|||
`operator` bigint(20) DEFAULT 0 COMMENT '操作人id', |
|||
`created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '创建日期', |
|||
`updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT '修改日期', |
|||
`rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', |
|||
PRIMARY KEY (`id`) USING BTREE |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='用户基本信息表'; |
|||
|
|||
-- 用户认证信息表 |
|||
DROP TABLE IF EXISTS `t_sys_auth`; |
|||
CREATE TABLE `t_sys_auth` ( |
|||
`id` bigint(20) NOT NULL, |
|||
`user_id` bigint(20) DEFAULT 0 COMMENT '用户id', |
|||
`identify_type` tinyint(2) unsigned DEFAULT 0 COMMENT '认证的类型 0微信小程序,1电话,2邮箱,3账号,4微信公众号,5微信网页登陆,6微博,7企业微信', |
|||
`identifier`varchar(32) DEFAULT '' COMMENT '用户标识()手机号等', |
|||
`credential` varchar(32) DEFAULT '' COMMENT '用户凭证/密码', |
|||
`salt` varchar(64) DEFAULT '' COMMENT '盐,加密时所需', |
|||
|
|||
`operator` bigint(20) DEFAULT 0 COMMENT '操作人id', |
|||
`created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '创建日期', |
|||
`updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT '修改日期', |
|||
`rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', |
|||
PRIMARY KEY (`id`) USING BTREE, |
|||
INDEX `auth_user_index`(`user_id`) USING BTREE, |
|||
INDEX `auth_identify_type_index`(`identify_type`) USING BTREE, |
|||
INDEX `auth_identifier_index`(`identifier`) USING BTREE |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='用户认证信息表'; |
|||
|
|||
-- 用户登录记录表 |
|||
DROP TABLE IF EXISTS `t_sys_signin_log`; |
|||
CREATE TABLE `t_sys_signin_log` ( |
|||
`id` bigint(20) NOT NULL, |
|||
`user_id` bigint(20) DEFAULT 0 COMMENT '用户id', |
|||
`auth_id` bigint(20) DEFAULT 0 COMMENT '认证id,临时用户null', |
|||
`time`bigint(20) DEFAULT 0 COMMENT '登录时间', |
|||
`device_id` varchar(64) DEFAULT '' COMMENT '设备id', |
|||
`client_type` tinyint(1) unsigned DEFAULT 0 COMMENT '客户端类型 0H5 1App', |
|||
`ip_address` varchar(64) DEFAULT '' COMMENT 'ip地址', |
|||
|
|||
`operator` bigint(20) DEFAULT 0 COMMENT '操作人id', |
|||
`created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '创建日期', |
|||
`updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT '修改日期', |
|||
`rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', |
|||
PRIMARY KEY (`id`) USING BTREE, |
|||
INDEX `signin_user_index`(`user_id`) USING BTREE, |
|||
INDEX `signin_auth_index`(`auth_id`) USING BTREE |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='用户登录记录表'; |
|||
|
|||
-- 用户设备关联表 |
|||
DROP TABLE IF EXISTS `t_sys_user_device`; |
|||
CREATE TABLE `t_sys_user_device` ( |
|||
`id` bigint(20) NOT NULL, |
|||
`user_id` bigint(20) DEFAULT 0 COMMENT '用户id', |
|||
`device_id` varchar(64) DEFAULT '' COMMENT '设备id', |
|||
`client_type` tinyint(1) unsigned DEFAULT 0 COMMENT '客户端类型 0H5 1App', |
|||
`refresh_token` varchar(256) DEFAULT '' COMMENT '关联refresh_token', |
|||
|
|||
`operator` bigint(20) DEFAULT 0 COMMENT '操作人id', |
|||
`created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '创建日期', |
|||
`updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT '修改日期', |
|||
`rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', |
|||
PRIMARY KEY (`id`) USING BTREE, |
|||
INDEX `user_index`(`user_id`) USING BTREE, |
|||
INDEX `device_index`(`device_id`) USING BTREE |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='用户设备关联表'; |
|||
|
|||
|
|||
-- 业务信息表 |
|||
DROP TABLE IF EXISTS `t_sys_business`; |
|||
CREATE TABLE `t_sys_business` ( |
|||
`id` bigint(20) NOT NULL, |
|||
`name` varchar(64) DEFAULT '' COMMENT '名称', |
|||
`code` varchar(64) DEFAULT '' COMMENT 'code', |
|||
`description` VARCHAR(512) DEFAULT '' COMMENT '业务描述', |
|||
`url` varchar(512) DEFAULT '' COMMENT '请求路径', |
|||
`app_id` varchar(64) DEFAULT '' COMMENT '业务appId', |
|||
`secret` varchar(64) DEFAULT '' COMMENT 'secret', |
|||
`creator_id` bigint(20) DEFAULT 0 COMMENT '创建者id', |
|||
`last_ask_time` bigint(20) DEFAULT 0 COMMENT '最后请求时间', |
|||
`last_answer_time` bigint(20) DEFAULT 0 COMMENT '最后应答时间', |
|||
`type` tinyint(1) unsigned DEFAULT 0 COMMENT '业务类型 0业务 1传达室', |
|||
|
|||
`operator` bigint(20) DEFAULT 0 COMMENT '操作人id', |
|||
`created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '创建日期', |
|||
`updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT '修改日期', |
|||
`rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', |
|||
PRIMARY KEY (`id`) USING BTREE, |
|||
INDEX `business_creator_index`(`creator_id`) USING BTREE |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='业务信息表'; |
@ -0,0 +1,89 @@ |
|||
|
|||
-- 插件基本信息表 |
|||
DROP TABLE IF EXISTS `t_open_plugin`; |
|||
CREATE TABLE `t_open_plugin` ( |
|||
`id` bigint(20) NOT NULL, |
|||
`name` varchar(64) DEFAULT '' COMMENT '名称', |
|||
`versions` varchar(64) DEFAULT '' COMMENT '版本', |
|||
`intro` varchar(128) DEFAULT '' COMMENT '简介', |
|||
`description` text DEFAULT '' COMMENT '详细介绍', |
|||
`html` text DEFAULT '' COMMENT 'html', |
|||
`js` text DEFAULT '' COMMENT 'js', |
|||
`css` text DEFAULT '' COMMENT 'css', |
|||
`config` varchar(512) DEFAULT '' COMMENT '配置信息', |
|||
`publish` tinyint(1) unsigned DEFAULT 0 COMMENT '是否发布 0不发布 1已发布', |
|||
`creator_id` bigint(20) DEFAULT 0 COMMENT '创建者id(userId)', |
|||
|
|||
`operator` bigint(20) DEFAULT 0 COMMENT '操作人id', |
|||
`created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '创建日期', |
|||
`updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT '修改日期', |
|||
`rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', |
|||
PRIMARY KEY (`id`) USING BTREE, |
|||
INDEX `plugin_creator_index`(`creator_id`) USING BTREE |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='插件基本信息表'; |
|||
|
|||
|
|||
-- 插件图片表 |
|||
DROP TABLE IF EXISTS `t_open_plugin_img`; |
|||
CREATE TABLE `t_open_plugin_img` ( |
|||
`id` bigint(20) NOT NULL, |
|||
`plugin_id` bigint(20) DEFAULT 0 COMMENT '插件id', |
|||
`file_id` bigint(20) DEFAULT 0 COMMENT '图片id', |
|||
`file_path` varchar(512) DEFAULT '' COMMENT '图片地址', |
|||
`type` tinyint(1) unsigned DEFAULT 0 COMMENT '类型 0预览图 1轮播图', |
|||
|
|||
`operator` bigint(20) DEFAULT 0 COMMENT '操作人id', |
|||
`created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '创建日期', |
|||
`updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT '修改日期', |
|||
`rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', |
|||
PRIMARY KEY (`id`) USING BTREE, |
|||
INDEX `plugin_img_plugin_index`(`plugin_id`) USING BTREE |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='插件图片表'; |
|||
|
|||
|
|||
-- 业务信息表 |
|||
DROP TABLE IF EXISTS `t_open_business`; |
|||
CREATE TABLE `t_open_business` ( |
|||
`id` bigint(20) NOT NULL, |
|||
`name` varchar(64) DEFAULT '' COMMENT '名称', |
|||
`code` varchar(64) DEFAULT '' COMMENT 'code', |
|||
`description` varchar(512) DEFAULT '' COMMENT '业务描述', |
|||
`url` varchar(512) DEFAULT '' COMMENT '请求路径', |
|||
`app_id` varchar(64) DEFAULT '' COMMENT '业务appId', |
|||
`secret` varchar(64) DEFAULT '' COMMENT 'secret', |
|||
`creator_id` bigint(20) DEFAULT 0 COMMENT '创建者id(userId)', |
|||
`last_ask_time` bigint(20) DEFAULT 0 COMMENT '最后请求时间', |
|||
`last_answer_time` bigint(20) DEFAULT 0 COMMENT '最后应答时间', |
|||
`type` tinyint(1) unsigned DEFAULT 0 COMMENT '业务类型 0业务 1传达室', |
|||
`pub` tinyint(1) unsigned DEFAULT 0 COMMENT '是否公开 0不公开 1公开', |
|||
`start_using` tinyint(1) unsigned DEFAULT 0 COMMENT '是否启用 0不启用 1启用', |
|||
`debug` tinyint(1) unsigned DEFAULT 0 COMMENT '是否开启debug模式 0不开启 1开启', |
|||
|
|||
`operator` bigint(20) DEFAULT 0 COMMENT '操作人id', |
|||
`created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '创建日期', |
|||
`updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT '修改日期', |
|||
`rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', |
|||
PRIMARY KEY (`id`) USING BTREE, |
|||
INDEX `business_creator_index`(`creator_id`) USING BTREE |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='业务信息表'; |
|||
|
|||
|
|||
|
|||
-- 插件业务关联表 |
|||
DROP TABLE IF EXISTS `t_open_business_plugin`; |
|||
CREATE TABLE `t_open_business_plugin` ( |
|||
`id` bigint(20) NOT NULL, |
|||
`plugin_id` bigint(20) DEFAULT 0 COMMENT '插件id', |
|||
`business_id` bigint(20) DEFAULT 0 COMMENT '业务id', |
|||
`config` varchar(512) DEFAULT '' COMMENT '配置信息', |
|||
`code` varchar(32) DEFAULT '' COMMENT '业务内唯一code', |
|||
`debug` tinyint(1) unsigned DEFAULT 0 COMMENT '是否开启debug模式 0不开启 1开启', |
|||
|
|||
`operator` bigint(20) DEFAULT 0 COMMENT '操作人id', |
|||
`created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT '创建日期', |
|||
`updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT '修改日期', |
|||
`rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', |
|||
PRIMARY KEY (`id`) USING BTREE, |
|||
INDEX `plugin_index`(`plugin_id`) USING BTREE, |
|||
INDEX `business_index`(`business_id`) USING BTREE |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='插件业务关联表'; |
Loading…
Reference in new issue