You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
246 lines
13 KiB
SQL
246 lines
13 KiB
SQL
-- dev_poms.map_dept_user definition
|
|
|
|
CREATE TABLE `map_dept_user` (
|
|
`id` int unsigned NOT NULL AUTO_INCREMENT,
|
|
`dept_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
|
`account` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|
|
|
|
|
-- dev_poms.map_role_auth definition
|
|
|
|
CREATE TABLE `map_role_auth` (
|
|
`id` int unsigned NOT NULL AUTO_INCREMENT,
|
|
`role_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
|
`auth_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=79 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|
|
|
|
|
-- dev_poms.map_user_role definition
|
|
|
|
CREATE TABLE `map_user_role` (
|
|
`id` int unsigned NOT NULL AUTO_INCREMENT,
|
|
`account` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
|
`role_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|
|
|
|
|
-- dev_poms.sys_auth definition
|
|
|
|
CREATE TABLE `sys_auth` (
|
|
`id` int unsigned NOT NULL AUTO_INCREMENT,
|
|
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
|
`code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
|
`group` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
|
|
`is_deleted` int unsigned NOT NULL DEFAULT '0',
|
|
`version` int unsigned NOT NULL DEFAULT '1',
|
|
`create_user` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
|
`create_time` datetime NOT NULL,
|
|
`update_user` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
|
|
`update_time` datetime DEFAULT NULL,
|
|
PRIMARY KEY (`id`),
|
|
UNIQUE KEY `sys_auth_UN` (`code`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|
|
|
|
|
-- dev_poms.sys_dept definition
|
|
|
|
CREATE TABLE `sys_dept` (
|
|
`id` int unsigned NOT NULL AUTO_INCREMENT,
|
|
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '组织全称',
|
|
`abbreviation` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '组织简称',
|
|
`type` int unsigned NOT NULL DEFAULT '0' COMMENT '组织类别',
|
|
`account` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '组织书记',
|
|
`code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '组织代码',
|
|
`parent_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '父级组织代码',
|
|
`is_deleted` int unsigned NOT NULL DEFAULT '0' COMMENT '删除状态',
|
|
`version` int unsigned NOT NULL DEFAULT '1' COMMENT '乐观锁',
|
|
`create_user` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人账号',
|
|
`create_time` datetime NOT NULL COMMENT '创建时间',
|
|
`update_user` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '更新人账号',
|
|
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
|
PRIMARY KEY (`id`),
|
|
UNIQUE KEY `sys_dept_UN` (`code`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|
|
|
|
|
-- dev_poms.sys_file definition
|
|
|
|
CREATE TABLE `sys_file` (
|
|
`id` int unsigned NOT NULL AUTO_INCREMENT,
|
|
`uuid` varchar(32) COLLATE utf8mb4_general_ci NOT NULL,
|
|
`name` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
|
|
`mine_type` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
|
|
`prefix` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
|
`md5` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
|
`path` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
|
|
`is_deleted` int unsigned NOT NULL DEFAULT '0',
|
|
`version` int unsigned NOT NULL DEFAULT '1',
|
|
`create_user` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
|
|
`create_time` datetime NOT NULL,
|
|
`update_user` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
|
|
`update_time` datetime DEFAULT NULL,
|
|
PRIMARY KEY (`id`),
|
|
UNIQUE KEY `sys_file_UN` (`uuid`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|
|
|
|
|
-- dev_poms.sys_log definition
|
|
|
|
CREATE TABLE `sys_log` (
|
|
`id` int unsigned NOT NULL AUTO_INCREMENT,
|
|
`ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '操作人IP地址',
|
|
`connector` varchar(255) COLLATE utf8mb4_general_ci NOT NULL COMMENT '调用接口',
|
|
`method` varchar(255) COLLATE utf8mb4_general_ci NOT NULL COMMENT '调用方法',
|
|
`description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '操作描述',
|
|
`is_deleted` int unsigned NOT NULL DEFAULT '0' COMMENT '删除状态',
|
|
`version` int unsigned NOT NULL DEFAULT '1' COMMENT '乐观锁',
|
|
`create_user` varchar(255) COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人账号',
|
|
`create_time` datetime NOT NULL COMMENT '创建时间',
|
|
`update_user` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '更新人账号',
|
|
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=109 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|
|
|
|
|
-- dev_poms.sys_meeting definition
|
|
|
|
CREATE TABLE `sys_meeting` (
|
|
`id` int unsigned NOT NULL AUTO_INCREMENT,
|
|
`uuid` varchar(32) COLLATE utf8mb4_general_ci NOT NULL,
|
|
`type` int unsigned NOT NULL COMMENT '会议类型',
|
|
`title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '新建会议' COMMENT '会议标题',
|
|
`description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '-' COMMENT '会议描述',
|
|
`start_time` datetime NOT NULL COMMENT '开始时间',
|
|
`end_time` datetime NOT NULL COMMENT '结束时间',
|
|
`dept_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '所属组织',
|
|
`is_deleted` int unsigned NOT NULL DEFAULT '0' COMMENT '删除状态',
|
|
`version` int unsigned NOT NULL DEFAULT '1' COMMENT '乐观锁',
|
|
`create_user` varchar(255) COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人账号',
|
|
`create_time` datetime NOT NULL COMMENT '创建时间',
|
|
`update_user` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '更新人账号',
|
|
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
|
PRIMARY KEY (`id`),
|
|
UNIQUE KEY `sys_meeting_UN` (`uuid`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|
|
|
|
|
-- dev_poms.sys_message definition
|
|
|
|
CREATE TABLE `sys_message` (
|
|
`id` int unsigned NOT NULL AUTO_INCREMENT,
|
|
`account` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '接收人账号',
|
|
`title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '消息标题',
|
|
`content` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '消息内容',
|
|
`is_read` int unsigned NOT NULL DEFAULT '0' COMMENT '是否已读',
|
|
`is_deleted` int unsigned NOT NULL DEFAULT '0' COMMENT '删除状态',
|
|
`version` int unsigned NOT NULL DEFAULT '1' COMMENT '乐观锁',
|
|
`create_user` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人账号',
|
|
`create_time` datetime NOT NULL COMMENT '创建时间',
|
|
`update_user` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '更新人账号',
|
|
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|
|
|
|
|
-- dev_poms.sys_notice definition
|
|
|
|
CREATE TABLE `sys_notice` (
|
|
`id` int unsigned NOT NULL AUTO_INCREMENT,
|
|
`uuid` varchar(32) COLLATE utf8mb4_general_ci NOT NULL,
|
|
`dept_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '*' COMMENT '组织编码',
|
|
`type` int unsigned NOT NULL DEFAULT '1' COMMENT '公告类型',
|
|
`title` varchar(255) COLLATE utf8mb4_general_ci NOT NULL COMMENT '公告标题',
|
|
`content` varchar(255) COLLATE utf8mb4_general_ci NOT NULL COMMENT '公告内容',
|
|
`is_deleted` int unsigned NOT NULL DEFAULT '0' COMMENT '删除状态',
|
|
`version` int unsigned NOT NULL DEFAULT '1' COMMENT '乐观锁',
|
|
`create_user` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人账号',
|
|
`create_time` datetime NOT NULL COMMENT '创建时间',
|
|
`update_user` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '更新人账号',
|
|
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
|
PRIMARY KEY (`id`),
|
|
UNIQUE KEY `sys_notice_UN` (`uuid`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|
|
|
|
|
-- dev_poms.sys_point definition
|
|
|
|
CREATE TABLE `sys_point` (
|
|
`id` int unsigned NOT NULL AUTO_INCREMENT,
|
|
`uuid` varchar(32) COLLATE utf8mb4_general_ci NOT NULL,
|
|
`title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '积分标题',
|
|
`description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '积分描述',
|
|
`min_score` int NOT NULL DEFAULT '0' COMMENT '最低分值',
|
|
`max_score` int unsigned NOT NULL DEFAULT '0' COMMENT '最高分值',
|
|
`step_score` int unsigned NOT NULL DEFAULT '0' COMMENT '分步分值',
|
|
`is_deleted` int unsigned NOT NULL DEFAULT '0' COMMENT '删除状态',
|
|
`version` int unsigned NOT NULL DEFAULT '1' COMMENT '乐观锁',
|
|
`create_user` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人账号',
|
|
`create_time` datetime NOT NULL COMMENT '创建时间',
|
|
`update_user` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '更新人账号',
|
|
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
|
PRIMARY KEY (`id`),
|
|
UNIQUE KEY `sys_point_UN` (`uuid`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|
|
|
|
|
-- dev_poms.sys_point_record definition
|
|
|
|
CREATE TABLE `sys_point_record` (
|
|
`id` int unsigned NOT NULL AUTO_INCREMENT,
|
|
`point_uuid` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'NaN' COMMENT '积分项UUID',
|
|
`file_uuid` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'NaN' COMMENT '文件UUID',
|
|
`point` int NOT NULL DEFAULT '0' COMMENT '获得积分',
|
|
`audited` int unsigned NOT NULL DEFAULT '0' COMMENT '审核状态',
|
|
`is_deleted` int unsigned NOT NULL DEFAULT '0' COMMENT '删除状态',
|
|
`version` int unsigned NOT NULL DEFAULT '1' COMMENT '乐观锁',
|
|
`create_user` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人账号',
|
|
`create_time` datetime NOT NULL COMMENT '创建时间',
|
|
`update_user` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '更新人账号',
|
|
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=76051 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|
|
|
|
|
-- dev_poms.sys_role definition
|
|
|
|
CREATE TABLE `sys_role` (
|
|
`id` int unsigned NOT NULL AUTO_INCREMENT,
|
|
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
|
`code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
|
`weight` int unsigned NOT NULL DEFAULT '3',
|
|
`is_deleted` int unsigned NOT NULL DEFAULT '0',
|
|
`version` int unsigned NOT NULL DEFAULT '1',
|
|
`create_user` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
|
`create_time` datetime NOT NULL,
|
|
`update_user` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
|
|
`update_time` datetime DEFAULT NULL,
|
|
PRIMARY KEY (`id`),
|
|
UNIQUE KEY `sys_role_UN` (`code`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|
|
|
|
|
-- dev_poms.sys_user definition
|
|
|
|
CREATE TABLE `sys_user` (
|
|
`id` int unsigned NOT NULL AUTO_INCREMENT,
|
|
`account` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户账号',
|
|
`password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户密码',
|
|
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户姓名',
|
|
`gender` int unsigned NOT NULL DEFAULT '1' COMMENT '用户性别',
|
|
`email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'NaN' COMMENT '用户邮箱',
|
|
`is_locked` int unsigned NOT NULL DEFAULT '0' COMMENT '锁定状态',
|
|
`persona` int unsigned NOT NULL DEFAULT '0' COMMENT '用户画像标签',
|
|
`is_deleted` int unsigned NOT NULL DEFAULT '0' COMMENT '删除状态',
|
|
`version` int unsigned NOT NULL DEFAULT '1' COMMENT '乐观锁',
|
|
`create_user` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人账号',
|
|
`create_time` datetime NOT NULL COMMENT '创建时间',
|
|
`update_user` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '更新人账号',
|
|
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
|
PRIMARY KEY (`id`),
|
|
UNIQUE KEY `sys_user_UN` (`account`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|