archives_sys.sql 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358
  1. /*
  2. Navicat MariaDB Data Transfer
  3. Source Server : archives
  4. Source Server Version : 100032
  5. Source Host : 192.168.1.124:3307
  6. Source Database : archives_sys
  7. Target Server Type : MariaDB
  8. Target Server Version : 100032
  9. File Encoding : 65001
  10. Date: 2018-04-03 16:07:25
  11. */
  12. SET FOREIGN_KEY_CHECKS=0;
  13. -- ----------------------------
  14. -- Table structure for sys_dept
  15. -- ----------------------------
  16. DROP TABLE IF EXISTS `sys_dept`;
  17. CREATE TABLE `sys_dept` (
  18. `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '部门主键ID',
  19. `parent_id` bigint(20) DEFAULT NULL COMMENT '父节点ID',
  20. `name` varchar(50) DEFAULT NULL COMMENT '部门名称',
  21. `principal` varchar(32) DEFAULT NULL COMMENT '负责人',
  22. `sort` int(2) DEFAULT NULL COMMENT '排序号',
  23. `enable` tinyint(1) NOT NULL DEFAULT '1' COMMENT '启用状态',
  24. `remark` varchar(1024) DEFAULT NULL,
  25. `create_time` datetime DEFAULT NULL,
  26. `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  27. `update_time` datetime DEFAULT NULL,
  28. `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  29. PRIMARY KEY (`id`)
  30. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='部门管理';
  31. -- ----------------------------
  32. -- Records of sys_dept
  33. -- ----------------------------
  34. -- ----------------------------
  35. -- Table structure for sys_dept_user
  36. -- ----------------------------
  37. DROP TABLE IF EXISTS `sys_dept_user`;
  38. CREATE TABLE `sys_dept_user` (
  39. `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '部门用户主键ID',
  40. `dept_id` bigint(20) DEFAULT NULL COMMENT '部门ID',
  41. `user_id` bigint(20) DEFAULT NULL COMMENT '用户ID',
  42. `enable` tinyint(1) NOT NULL DEFAULT '1' COMMENT '启用状态',
  43. `remark` varchar(1024) DEFAULT NULL,
  44. `create_time` datetime DEFAULT NULL,
  45. `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  46. `update_time` datetime DEFAULT NULL,
  47. `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  48. PRIMARY KEY (`id`),
  49. KEY `idx_dept_id` (`dept_id`),
  50. KEY `idx_user_id` (`user_id`)
  51. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='部门用户表';
  52. -- ----------------------------
  53. -- Records of sys_dept_user
  54. -- ----------------------------
  55. -- ----------------------------
  56. -- Table structure for sys_dic
  57. -- ----------------------------
  58. DROP TABLE IF EXISTS `sys_dic`;
  59. CREATE TABLE `sys_dic` (
  60. `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  61. `key` varchar(50) DEFAULT NULL COMMENT '字典代码',
  62. `value` varchar(100) DEFAULT NULL COMMENT '字典值',
  63. `label` varchar(255) DEFAULT NULL COMMENT '标签',
  64. `sort` int(2) DEFAULT NULL COMMENT '排序号',
  65. `enable` bit(1) NOT NULL DEFAULT b'1' COMMENT '启用状态',
  66. `remark` varchar(1024) DEFAULT NULL COMMENT '字典描述',
  67. `create_time` datetime DEFAULT NULL,
  68. `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  69. `update_time` datetime DEFAULT NULL,
  70. `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  71. PRIMARY KEY (`id`)
  72. ) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COMMENT='字典表';
  73. -- ----------------------------
  74. -- Records of sys_dic
  75. -- ----------------------------
  76. INSERT INTO `sys_dic` VALUES ('1', 'gender', '1', '男', '1', '', '性别', null, null, '2018-03-20 02:48:01', null);
  77. INSERT INTO `sys_dic` VALUES ('2', 'gender', '0', '女', '2', '', '', null, null, '2018-03-20 02:48:01', null);
  78. INSERT INTO `sys_dic` VALUES ('3', 'gender', '-1', '保密', '3', '\0', null, null, null, null, null);
  79. INSERT INTO `sys_dic` VALUES ('4', 'enable', '1', '启用', '1', '', '启用状态(逻辑删标志)', null, null, '2018-03-20 02:48:01', null);
  80. INSERT INTO `sys_dic` VALUES ('5', 'enable', '0', '禁用', '2', '', '禁用状态(逻辑删标志)', null, null, '2018-03-20 02:48:01', null);
  81. INSERT INTO `sys_dic` VALUES ('6', '4_is_check', '0', '未审批', '1', '', '管理_开放鉴定审批', '2018-03-24 09:37:31', 'admin', null, null);
  82. INSERT INTO `sys_dic` VALUES ('7', '4_is_check', '1', '审批通过', '2', '', '管理_开放鉴定审批通过', '2018-03-24 09:38:23', 'admin', null, null);
  83. INSERT INTO `sys_dic` VALUES ('8', '4_is_check', '2', '审批不通过', '3', '', '管理_开放鉴定审批', '2018-03-24 09:39:24', 'admin', null, null);
  84. INSERT INTO `sys_dic` VALUES ('9', '4_appraisal_result', '0', '未鉴定', '1', '', '管理_开放鉴定登记', '2018-03-26 09:59:03', 'admin', null, null);
  85. INSERT INTO `sys_dic` VALUES ('10', '4_appraisal_result', '1', '允许开放', '2', '', '管理_开放鉴定登记', '2018-03-26 10:00:28', 'admin', null, null);
  86. INSERT INTO `sys_dic` VALUES ('11', '4_appraisal_result', '2', '不允许开放', '3', '', '管理_开放鉴定登记', '2018-03-26 10:01:15', 'admin', null, null);
  87. -- ----------------------------
  88. -- Table structure for sys_event_login
  89. -- ----------------------------
  90. DROP TABLE IF EXISTS `sys_event_login`;
  91. CREATE TABLE `sys_event_login` (
  92. `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  93. `title` varchar(50) DEFAULT NULL COMMENT '日志标题',
  94. `request_uri` varchar(100) DEFAULT NULL COMMENT '请求地址',
  95. `sort` int(2) DEFAULT NULL COMMENT '排序号',
  96. `account` varchar(50) NOT NULL COMMENT '账户名',
  97. `client_host` varchar(50) DEFAULT NULL COMMENT '登录IP地址',
  98. `user_agent` varchar(200) DEFAULT NULL COMMENT '用户代理',
  99. `status` int(2) NOT NULL DEFAULT '1' COMMENT '请求状态',
  100. `enable` tinyint(1) NOT NULL DEFAULT '1' COMMENT '启用状态',
  101. `remark` varchar(1024) DEFAULT NULL COMMENT '字典描述',
  102. `create_time` datetime DEFAULT NULL,
  103. `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  104. `update_time` datetime DEFAULT NULL,
  105. `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  106. PRIMARY KEY (`id`),
  107. KEY `idx_account` (`account`)
  108. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='登录日志表';
  109. -- ----------------------------
  110. -- Records of sys_event_login
  111. -- ----------------------------
  112. -- ----------------------------
  113. -- Table structure for sys_event_oper
  114. -- ----------------------------
  115. DROP TABLE IF EXISTS `sys_event_oper`;
  116. CREATE TABLE `sys_event_oper` (
  117. `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  118. `title` varchar(50) DEFAULT NULL COMMENT '日志标题',
  119. `request_uri` varchar(100) DEFAULT NULL COMMENT '请求地址',
  120. `sort` int(2) DEFAULT NULL COMMENT '排序号',
  121. `account` varchar(50) NOT NULL COMMENT '账户名',
  122. `client_host` varchar(50) DEFAULT NULL COMMENT '登录IP地址',
  123. `parameter` varchar(1024) DEFAULT NULL COMMENT '请求参数',
  124. `method` varchar(50) DEFAULT NULL COMMENT '请求方法',
  125. `enable` tinyint(1) NOT NULL DEFAULT '1' COMMENT '启用状态',
  126. `remark` varchar(1024) DEFAULT NULL COMMENT '字典描述',
  127. `create_time` datetime DEFAULT NULL,
  128. `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  129. `update_time` datetime DEFAULT NULL,
  130. `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  131. PRIMARY KEY (`id`),
  132. KEY `idx_account` (`account`)
  133. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='操作日志表';
  134. -- ----------------------------
  135. -- Records of sys_event_oper
  136. -- ----------------------------
  137. -- ----------------------------
  138. -- Table structure for sys_menu
  139. -- ----------------------------
  140. DROP TABLE IF EXISTS `sys_menu`;
  141. CREATE TABLE `sys_menu` (
  142. `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '菜单ID',
  143. `platform_id` tinyint(1) NOT NULL DEFAULT '0' COMMENT '平台ID(0:通用,1:系统,2:接收,3:保存,4:管理,5:利用)',
  144. `parent_id` bigint(20) NOT NULL COMMENT '上级菜单ID(root:0)',
  145. `name` varchar(100) DEFAULT NULL COMMENT '菜单名称',
  146. `permission` varchar(500) DEFAULT NULL COMMENT '授权,如(user:list,user:create)',
  147. `type` smallint(2) DEFAULT NULL COMMENT '菜单类型(0:目录;1:菜单;2:按钮)',
  148. `url` varchar(100) DEFAULT NULL COMMENT '请求地址',
  149. `expand` tinyint(1) NOT NULL DEFAULT '0' COMMENT '展开状态(1:展开;0:收缩)',
  150. `sort` int(2) DEFAULT NULL COMMENT '排序号',
  151. `is_leaf` tinyint(1) NOT NULL DEFAULT '1' COMMENT '叶子节点(0:树枝节点;1:叶子节点)',
  152. `enable` tinyint(1) NOT NULL DEFAULT '1' COMMENT '启用状态',
  153. `remark` varchar(1024) DEFAULT NULL,
  154. `create_time` datetime DEFAULT NULL,
  155. `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  156. `update_time` datetime DEFAULT NULL,
  157. `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  158. PRIMARY KEY (`id`)
  159. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='菜单表';
  160. -- ----------------------------
  161. -- Records of sys_menu
  162. -- ----------------------------
  163. -- ----------------------------
  164. -- Table structure for sys_menu_role
  165. -- ----------------------------
  166. DROP TABLE IF EXISTS `sys_menu_role`;
  167. CREATE TABLE `sys_menu_role` (
  168. `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '用户角色表主键ID',
  169. `menu_id` bigint(20) DEFAULT NULL COMMENT '菜单ID',
  170. `role_id` bigint(20) DEFAULT NULL COMMENT '角色ID',
  171. `enable` tinyint(1) NOT NULL DEFAULT '1' COMMENT '启用状态',
  172. `remark` varchar(1024) DEFAULT NULL COMMENT '备注',
  173. `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  174. `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  175. `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  176. `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  177. PRIMARY KEY (`id`)
  178. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户菜单表';
  179. -- ----------------------------
  180. -- Records of sys_menu_role
  181. -- ----------------------------
  182. -- ----------------------------
  183. -- Table structure for sys_notice
  184. -- ----------------------------
  185. DROP TABLE IF EXISTS `sys_notice`;
  186. CREATE TABLE `sys_notice` (
  187. `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '公告编号',
  188. `notice_title` varchar(128) NOT NULL COMMENT '公告标题',
  189. `notice_type` varchar(8) NOT NULL COMMENT '公告类型',
  190. `send_time` datetime DEFAULT NULL COMMENT '发布时间',
  191. `sources_url` varchar(2048) DEFAULT NULL COMMENT '来源地址',
  192. `content` text COMMENT '内容',
  193. `status` varchar(2) NOT NULL DEFAULT '1' COMMENT '发布状态',
  194. `enable` tinyint(1) NOT NULL DEFAULT '1' COMMENT '启用状态',
  195. `remark` varchar(1024) DEFAULT NULL,
  196. `create_time` datetime DEFAULT NULL,
  197. `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  198. `update_time` datetime DEFAULT NULL,
  199. `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  200. PRIMARY KEY (`id`)
  201. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='通知公告表';
  202. -- ----------------------------
  203. -- Records of sys_notice
  204. -- ----------------------------
  205. -- ----------------------------
  206. -- Table structure for sys_param
  207. -- ----------------------------
  208. DROP TABLE IF EXISTS `sys_param`;
  209. CREATE TABLE `sys_param` (
  210. `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  211. `key` varchar(50) DEFAULT NULL COMMENT '参数key',
  212. `value` varchar(100) DEFAULT NULL COMMENT '参数值',
  213. `label` varchar(255) DEFAULT NULL COMMENT '标签',
  214. `sort` int(2) DEFAULT NULL COMMENT '排序号',
  215. `enable` tinyint(1) NOT NULL DEFAULT '1' COMMENT '启用状态',
  216. `remark` varchar(1024) DEFAULT NULL,
  217. `create_time` datetime DEFAULT NULL,
  218. `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  219. `update_time` datetime DEFAULT NULL,
  220. `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  221. PRIMARY KEY (`id`)
  222. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='系统参数表';
  223. -- ----------------------------
  224. -- Records of sys_param
  225. -- ----------------------------
  226. -- ----------------------------
  227. -- Table structure for sys_permission
  228. -- ----------------------------
  229. DROP TABLE IF EXISTS `sys_permission`;
  230. CREATE TABLE `sys_permission` (
  231. `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '权限ID',
  232. `platform_id` tinyint(2) NOT NULL DEFAULT '0' COMMENT '平台ID(0:通用,1:系统,2:接收,3:保存,4:管理,5:利用)',
  233. `name` varchar(100) DEFAULT NULL COMMENT '权限名称',
  234. `perm` varchar(100) DEFAULT NULL COMMENT '权限代码',
  235. `description` varchar(100) DEFAULT NULL COMMENT '权限描述',
  236. `enable` tinyint(1) NOT NULL DEFAULT '1' COMMENT '启用状态',
  237. `remark` varchar(1024) DEFAULT NULL,
  238. `create_time` datetime DEFAULT NULL,
  239. `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  240. `update_time` datetime DEFAULT NULL,
  241. `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  242. PRIMARY KEY (`id`)
  243. ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='权限表';
  244. -- ----------------------------
  245. -- Records of sys_permission
  246. -- ----------------------------
  247. INSERT INTO `sys_permission` VALUES ('1', '1', '角色相关权限', 'sys.role', null, '1', null, null, null, null, null);
  248. INSERT INTO `sys_permission` VALUES ('2', '1', '用户相关权限', 'sys.user', null, '1', null, null, null, null, null);
  249. -- ----------------------------
  250. -- Table structure for sys_role
  251. -- ----------------------------
  252. DROP TABLE IF EXISTS `sys_role`;
  253. CREATE TABLE `sys_role` (
  254. `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '角色ID',
  255. `name` varchar(50) DEFAULT NULL COMMENT '角色名称',
  256. `code` varchar(255) NOT NULL DEFAULT '' COMMENT '角色代码',
  257. `perms` varchar(500) DEFAULT NULL COMMENT '权限列表',
  258. `enable` tinyint(1) NOT NULL DEFAULT '1' COMMENT '启用状态',
  259. `remark` varchar(1024) DEFAULT NULL,
  260. `create_time` datetime DEFAULT NULL,
  261. `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  262. `update_time` datetime DEFAULT NULL,
  263. `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  264. PRIMARY KEY (`id`)
  265. ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='角色表';
  266. -- ----------------------------
  267. -- Records of sys_role
  268. -- ----------------------------
  269. INSERT INTO `sys_role` VALUES ('1', '超级管理员', 'ROLE_ADMIN', '0:user:crud,0:role:crud', '1', null, null, null, null, null);
  270. INSERT INTO `sys_role` VALUES ('2', '系统管理员', 'ROLE_SYSTEM', '0:user:crud,0:role:crud,0:test:cru', '1', null, null, null, '2018-03-30 08:53:19', 'admin');
  271. INSERT INTO `sys_role` VALUES ('3', 'TEST', 'ROLE_TEST', '2:test:crud,1:test:c,1:testa:c', '0', '', '2018-03-30 02:27:31', 'admin', '2018-04-02 02:35:29', 'admin');
  272. INSERT INTO `sys_role` VALUES ('4', 'Test2', 'ROLE_TEST2', '1:test:c,2:test:r', '1', '123123', '2018-04-02 08:12:04', 'admin', null, null);
  273. -- ----------------------------
  274. -- Table structure for sys_user
  275. -- ----------------------------
  276. DROP TABLE IF EXISTS `sys_user`;
  277. CREATE TABLE `sys_user` (
  278. `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '用户主键ID',
  279. `account` varchar(20) DEFAULT NULL COMMENT '登陆帐户',
  280. `username` varchar(30) DEFAULT NULL COMMENT '姓名',
  281. `password` varchar(50) DEFAULT NULL COMMENT '密码',
  282. `salt` varchar(20) DEFAULT NULL COMMENT '密码盐值',
  283. `phone` varchar(50) DEFAULT NULL COMMENT '电话',
  284. `email` varchar(64) DEFAULT NULL COMMENT '邮箱',
  285. `position` varchar(64) DEFAULT NULL COMMENT '职位',
  286. `address` varchar(256) DEFAULT NULL COMMENT '详细地址',
  287. `staff_no` varchar(32) DEFAULT NULL COMMENT '工号',
  288. `ext1` varchar(100) DEFAULT NULL COMMENT '备用字段',
  289. `ext2` varchar(100) DEFAULT NULL COMMENT '备用字段',
  290. `ext3` varchar(100) DEFAULT NULL COMMENT '备用字段',
  291. `ext4` varchar(100) DEFAULT NULL COMMENT '备用字段',
  292. `enable` bit(1) NOT NULL DEFAULT b'1',
  293. `gender` tinyint(4) DEFAULT '-1' COMMENT '性别,定义 1:男 0:女 -1:保密',
  294. `remark` varchar(1024) DEFAULT NULL,
  295. `create_time` datetime DEFAULT NULL,
  296. `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  297. `update_time` datetime DEFAULT NULL,
  298. `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  299. PRIMARY KEY (`id`),
  300. UNIQUE KEY `account` (`account`)
  301. ) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8 COMMENT='用户管理';
  302. -- ----------------------------
  303. -- Records of sys_user
  304. -- ----------------------------
  305. INSERT INTO `sys_user` VALUES ('1', 'admin', 'admin', '13df2464fbdaea9269bb1419fec136da', 'kidntkdij', '13333333333', '123@123.com', '欸之', '地球上某个奇怪的小山村', '213822', null, null, null, null, '', '-1', '1', null, null, '2018-04-02 09:00:10', 'admin');
  306. INSERT INTO `sys_user` VALUES ('15', 'root', 'root', 'root', null, '', '', '', '', '', null, null, null, null, '', '-1', '', '2018-03-26 07:46:44', 'admin', '2018-04-03 03:18:49', 'admin');
  307. -- ----------------------------
  308. -- Table structure for sys_user_role
  309. -- ----------------------------
  310. DROP TABLE IF EXISTS `sys_user_role`;
  311. CREATE TABLE `sys_user_role` (
  312. `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '用户角色表主键ID',
  313. `role_id` bigint(20) DEFAULT NULL COMMENT '角色ID',
  314. `user_id` bigint(20) DEFAULT NULL COMMENT '用户ID',
  315. `enable` tinyint(1) NOT NULL DEFAULT '1' COMMENT '启用状态',
  316. `remark` varchar(1024) DEFAULT NULL,
  317. `create_time` datetime DEFAULT NULL,
  318. `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
  319. `update_time` datetime DEFAULT NULL,
  320. `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  321. PRIMARY KEY (`id`)
  322. ) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 COMMENT='用户角色表';
  323. -- ----------------------------
  324. -- Records of sys_user_role
  325. -- ----------------------------
  326. INSERT INTO `sys_user_role` VALUES ('1', '1', '1', '1', null, null, null, null, null);
  327. INSERT INTO `sys_user_role` VALUES ('2', '2', '1', '1', null, null, null, null, null);
  328. INSERT INTO `sys_user_role` VALUES ('5', '2', '15', '1', null, '2018-04-02 08:59:12', 'admin', null, null);