buildadmin.sql 48 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589
  1. /*
  2. BuildAdmin Install SQL
  3. Date: 2022-05-13
  4. */
  5. SET FOREIGN_KEY_CHECKS = 0;
  6. -- ----------------------------
  7. -- Table structure for `__PREFIX__admin`
  8. -- ----------------------------
  9. DROP TABLE IF EXISTS `__PREFIX__admin`;
  10. CREATE TABLE `__PREFIX__admin` (
  11. `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  12. `username` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '用户名',
  13. `nickname` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '昵称',
  14. `avatar` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '头像',
  15. `email` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '邮箱',
  16. `mobile` varchar(11) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '手机',
  17. `loginfailure` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '登录失败次数',
  18. `lastlogintime` int(10) DEFAULT NULL COMMENT '登录时间',
  19. `lastloginip` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '登录IP',
  20. `password` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '密码',
  21. `salt` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '密码盐',
  22. `motto` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '签名',
  23. `createtime` int(10) DEFAULT NULL COMMENT '创建时间',
  24. `updatetime` int(10) DEFAULT NULL COMMENT '更新时间',
  25. `status` enum('1','0') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '1' COMMENT '状态:0=禁用,1=启用',
  26. PRIMARY KEY (`id`),
  27. UNIQUE KEY `username` (`username`) USING BTREE
  28. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='管理员表';
  29. -- ----------------------------
  30. -- Records of __PREFIX__admin
  31. -- ----------------------------
  32. BEGIN;
  33. INSERT INTO `__PREFIX__admin` VALUES ('1', 'admin', 'Admin', '', 'admin@buildadmin.com', '18888888888', '0', '1652166427', '127.0.0.1', 'dc82034ba4108148cbefd980b6b63371', 'kWlGDm9qAVB8MjbX', '', '1645876529', '1652166427', '1');
  34. COMMIT;
  35. -- ----------------------------
  36. -- Table structure for `__PREFIX__admin_group`
  37. -- ----------------------------
  38. DROP TABLE IF EXISTS `__PREFIX__admin_group`;
  39. CREATE TABLE `__PREFIX__admin_group` (
  40. `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  41. `pid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '上级分组',
  42. `name` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '组名',
  43. `rules` text COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '权限规则ID',
  44. `createtime` int(10) DEFAULT NULL COMMENT '创建时间',
  45. `updatetime` int(10) DEFAULT NULL COMMENT '更新时间',
  46. `status` enum('1','0') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '1' COMMENT '状态:0=禁用,1=启用',
  47. PRIMARY KEY (`id`)
  48. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='管理分组表';
  49. -- ----------------------------
  50. -- Records of __PREFIX__admin_group
  51. -- ----------------------------
  52. BEGIN;
  53. INSERT INTO `__PREFIX__admin_group` VALUES ('1', '0', '超级管理组', '*', '1645876529', '1647805864', '1');
  54. INSERT INTO `__PREFIX__admin_group` VALUES ('2', '1', '一级管理员', '1,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,77,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76', '1645876529', '1658197123', '1');
  55. INSERT INTO `__PREFIX__admin_group` VALUES ('3', '2', '二级管理员', '21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43', '1645876529', '1658197143', '1');
  56. INSERT INTO `__PREFIX__admin_group` VALUES ('4', '3', '三级管理员', '55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75', '1645876529', '1658197162', '1');
  57. COMMIT;
  58. -- ----------------------------
  59. -- Table structure for `__PREFIX__admin_group_access`
  60. -- ----------------------------
  61. DROP TABLE IF EXISTS `__PREFIX__admin_group_access`;
  62. CREATE TABLE `__PREFIX__admin_group_access` (
  63. `uid` int(10) unsigned NOT NULL COMMENT '管理员ID',
  64. `group_id` int(10) unsigned NOT NULL COMMENT '分组ID',
  65. UNIQUE KEY `uid_group_id` (`uid`,`group_id`),
  66. KEY `uid` (`uid`),
  67. KEY `group_id` (`group_id`)
  68. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='管理权限分组表';
  69. -- ----------------------------
  70. -- Records of __PREFIX__admin_group_access
  71. -- ----------------------------
  72. BEGIN;
  73. INSERT INTO `__PREFIX__admin_group_access` VALUES ('1', '1');
  74. COMMIT;
  75. -- ----------------------------
  76. -- Table structure for `__PREFIX__admin_log`
  77. -- ----------------------------
  78. DROP TABLE IF EXISTS `__PREFIX__admin_log`;
  79. CREATE TABLE `__PREFIX__admin_log` (
  80. `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  81. `admin_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '管理员ID',
  82. `username` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '管理员用户名',
  83. `url` varchar(1500) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '操作Url',
  84. `title` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '日志标题',
  85. `data` longtext COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '请求数据',
  86. `ip` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT 'IP',
  87. `useragent` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT 'User-Agent',
  88. `createtime` int(10) DEFAULT NULL COMMENT '操作时间',
  89. PRIMARY KEY (`id`),
  90. KEY `name` (`username`)
  91. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='管理员日志表';
  92. -- ----------------------------
  93. -- Table structure for `__PREFIX__area`
  94. -- ----------------------------
  95. DROP TABLE IF EXISTS `__PREFIX__area`;
  96. CREATE TABLE `__PREFIX__area` (
  97. `id` int(10) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  98. `pid` int(10) DEFAULT NULL COMMENT '父id',
  99. `shortname` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '简称',
  100. `name` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '名称',
  101. `mergename` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '全称',
  102. `level` tinyint(4) DEFAULT NULL COMMENT '层级:1=省,2=市,3=区/县',
  103. `pinyin` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '拼音',
  104. `code` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '长途区号',
  105. `zip` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '邮编',
  106. `first` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '首字母',
  107. `lng` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '经度',
  108. `lat` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '纬度',
  109. PRIMARY KEY (`id`),
  110. KEY `pid` (`pid`)
  111. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='地区表';
  112. -- ----------------------------
  113. -- Table structure for `__PREFIX__attachment`
  114. -- ----------------------------
  115. DROP TABLE IF EXISTS `__PREFIX__attachment`;
  116. CREATE TABLE `__PREFIX__attachment` (
  117. `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  118. `topic` varchar(20) NOT NULL DEFAULT '' COMMENT '细目',
  119. `admin_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '上传管理员ID',
  120. `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '上传用户ID',
  121. `url` varchar(255) NOT NULL DEFAULT '' COMMENT '物理路径',
  122. `width` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '宽度',
  123. `height` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '高度',
  124. `name` varchar(100) NOT NULL DEFAULT '' COMMENT '原始名称',
  125. `size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '大小',
  126. `mimetype` varchar(100) NOT NULL DEFAULT '' COMMENT 'mime类型',
  127. `quote` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '上传(引用)次数',
  128. `storage` varchar(50) NOT NULL DEFAULT '' COMMENT '存储方式',
  129. `sha1` varchar(40) NOT NULL DEFAULT '' COMMENT 'sha1编码',
  130. `createtime` int(10) unsigned DEFAULT NULL COMMENT '上传时间',
  131. `lastuploadtime` int(10) unsigned DEFAULT NULL COMMENT '最后上传时间',
  132. PRIMARY KEY (`id`)
  133. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='附件表';
  134. -- ----------------------------
  135. -- Table structure for `__PREFIX__captcha`
  136. -- ----------------------------
  137. DROP TABLE IF EXISTS `__PREFIX__captcha`;
  138. CREATE TABLE `__PREFIX__captcha` (
  139. `key` varchar(32) NOT NULL DEFAULT '' COMMENT '验证码Key',
  140. `code` varchar(32) NOT NULL DEFAULT '' COMMENT '验证码(加密后)',
  141. `captcha` text NULL COMMENT '验证码数据',
  142. `createtime` int(10) unsigned DEFAULT NULL COMMENT '创建时间',
  143. `expiretime` int(10) unsigned DEFAULT NULL COMMENT '过期时间',
  144. PRIMARY KEY (`key`) USING BTREE
  145. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='验证码表';
  146. -- ----------------------------
  147. -- Table structure for `__PREFIX__config`
  148. -- ----------------------------
  149. DROP TABLE IF EXISTS `__PREFIX__config`;
  150. CREATE TABLE `__PREFIX__config` (
  151. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  152. `name` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '变量名',
  153. `group` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '分组',
  154. `title` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '变量标题',
  155. `tip` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '变量描述',
  156. `type` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '类型:string,number,radio,checkbox,switch,textarea,array,datetime,date,select,selects',
  157. `value` text COLLATE utf8mb4_unicode_ci COMMENT '变量值',
  158. `content` text COLLATE utf8mb4_unicode_ci COMMENT '字典数据',
  159. `rule` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '验证规则',
  160. `extend` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '扩展属性',
  161. `allow_del` tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许删除:0=否,1=是',
  162. `weigh` int(10) NOT NULL DEFAULT '0' COMMENT '权重',
  163. PRIMARY KEY (`id`),
  164. UNIQUE KEY `name` (`name`)
  165. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='系统配置';
  166. -- ----------------------------
  167. -- Records of __PREFIX__config
  168. -- ----------------------------
  169. BEGIN;
  170. INSERT INTO `__PREFIX__config` VALUES ('1', 'config_group', 'basics', 'Config group', '', 'array', '[{\"key\":\"basics\",\"value\":\"Basics\"},{\"key\":\"mail\",\"value\":\"Mail\"},{\"key\":\"config_quick_entrance\",\"value\":\"Config Quick entrance\"}]', null, 'required', '', '0', '-1');
  171. INSERT INTO `__PREFIX__config` VALUES ('2', 'site_name', 'basics', 'Site Name', '站点名称', 'string', '站点名称', null, 'required', '', '0', '99');
  172. INSERT INTO `__PREFIX__config` VALUES ('3', 'record_number', 'basics', 'Record number', '域名备案号', 'string', '渝ICP备8888888号-1', null, '', '', '0', '0');
  173. INSERT INTO `__PREFIX__config` VALUES ('4', 'version', 'basics', 'Version number', '系统版本号', 'string', 'v1.0.0', null, 'required', '', '0', '0');
  174. INSERT INTO `__PREFIX__config` VALUES ('5', 'time_zone', 'basics', 'time zone', '', 'string', 'Asia/Shanghai', null, 'required', '', '0', '0');
  175. INSERT INTO `__PREFIX__config` VALUES ('6', 'no_access_ip', 'basics', 'No access ip', '禁止访问站点的ip列表,一行一个', 'textarea', '', null, '', '', '0', '0');
  176. INSERT INTO `__PREFIX__config` VALUES ('7', 'smtp_server', 'mail', 'smtp server', '', 'string', 'smtp.qq.com', null, '', '', '0', '99');
  177. INSERT INTO `__PREFIX__config` VALUES ('8', 'smtp_port', 'mail', 'smtp port', '', 'string', '465', null, '', '', '0', '0');
  178. INSERT INTO `__PREFIX__config` VALUES ('9', 'smtp_user', 'mail', 'smtp user', '', 'string', '', null, '', '', '0', '0');
  179. INSERT INTO `__PREFIX__config` VALUES ('10', 'smtp_pass', 'mail', 'smtp pass', '', 'string', '', null, '', '', '0', '0');
  180. INSERT INTO `__PREFIX__config` VALUES ('11', 'smtp_verification', 'mail', 'smtp verification', '', 'select', 'SSL', '{\"SSL\":\"SSL\",\"TLS\":\"TLS\"}', '', '', '0', '0');
  181. INSERT INTO `__PREFIX__config` VALUES ('12', 'smtp_sender_mail', 'mail', 'smtp sender mail', '', 'string', '', null, 'email', '', '0', '0');
  182. INSERT INTO `__PREFIX__config` VALUES ('13', 'config_quick_entrance', 'config_quick_entrance', 'Config Quick entrance', '', 'array', '[{\"key\":\"\\u6570\\u636e\\u56de\\u6536\\u89c4\\u5219\\u914d\\u7f6e\",\"value\":\"\\/admin\\/security\\/dataRecycle\"},{\"key\":\"\\u654f\\u611f\\u6570\\u636e\\u89c4\\u5219\\u914d\\u7f6e\",\"value\":\"\\/admin\\/security\\/sensitiveData\"}]', null, '', '', '0', '0');
  183. COMMIT;
  184. -- ----------------------------
  185. -- Table structure for `__PREFIX__menu_rule`
  186. -- ----------------------------
  187. DROP TABLE IF EXISTS `__PREFIX__menu_rule`;
  188. CREATE TABLE `__PREFIX__menu_rule` (
  189. `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  190. `pid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '上级菜单',
  191. `type` enum('menu_dir','menu','button') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'menu' COMMENT '类型:menu_dir=菜单目录,menu=菜单项,button=页面按钮',
  192. `title` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '标题',
  193. `name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '规则名称',
  194. `path` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '路由路径',
  195. `icon` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '图标',
  196. `menu_type` enum('tab','link','iframe') COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '菜单类型:tab=选项卡,link=链接,iframe=Iframe',
  197. `url` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'Url',
  198. `component` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '组件路径',
  199. `keepalive` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '缓存:0=关闭,1=开启',
  200. `extend` enum('none','add_rules_only','add_menu_only') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'none' COMMENT '扩展属性:none=无,add_rules_only=只添加为路由,add_menu_only=只添加为菜单',
  201. `remark` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '备注',
  202. `weigh` int(10) NOT NULL DEFAULT '0' COMMENT '权重(排序)',
  203. `status` enum('1','0') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '1' COMMENT '状态:0=禁用,1=启用',
  204. `updatetime` int(10) DEFAULT NULL COMMENT '更新时间',
  205. `createtime` int(10) DEFAULT NULL COMMENT '创建时间',
  206. PRIMARY KEY (`id`),
  207. KEY `pid` (`pid`),
  208. KEY `weigh` (`weigh`)
  209. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='菜单和权限规则表';
  210. -- ----------------------------
  211. -- Records of __PREFIX__menu_rule
  212. -- ----------------------------
  213. BEGIN;
  214. INSERT INTO `__PREFIX__menu_rule` VALUES ('1', '0', 'menu', '控制台', 'dashboard/dashboard', 'dashboard', 'fa fa-dashboard', 'tab', '', '/src/views/backend/dashboard.vue', '1', 'none', 'remark_text', '999', '1', '1651926966', '1646889188');
  215. INSERT INTO `__PREFIX__menu_rule` VALUES ('2', '0', 'menu_dir', '权限管理', 'auth', 'auth', 'fa fa-group', null, '', '', '0', 'none', '', '100', '1', '1648948034', '1645876529');
  216. INSERT INTO `__PREFIX__menu_rule` VALUES ('3', '2', 'menu', '角色组管理', 'auth/group', 'auth/group', 'fa fa-group', 'tab', '', '/src/views/backend/auth/group/index.vue', '1', 'none', '', '99', '1', '1648162157', '1646927597');
  217. INSERT INTO `__PREFIX__menu_rule` VALUES ('4', '3', 'button', '查看', 'auth/group/index', '', '', null, '', '', '0', 'none', '', '99', '1', '1648065864', '1647806112');
  218. INSERT INTO `__PREFIX__menu_rule` VALUES ('5', '3', 'button', '添加', 'auth/group/add', '', '', null, '', '', '0', 'none', '', '99', '1', '1648065864', '1647806112');
  219. INSERT INTO `__PREFIX__menu_rule` VALUES ('6', '3', 'button', '编辑', 'auth/group/edit', '', '', null, '', '', '0', 'none', '', '99', '1', '1648065864', '1647806129');
  220. INSERT INTO `__PREFIX__menu_rule` VALUES ('7', '3', 'button', '删除', 'auth/group/del', '', '', null, '', '', '0', 'none', '', '99', '1', '1648065864', '1647806112');
  221. INSERT INTO `__PREFIX__menu_rule` VALUES ('8', '2', 'menu', '管理员管理', 'auth/admin', 'auth/admin', 'el-icon-UserFilled', 'tab', '', '/src/views/backend/auth/admin/index.vue', '1', 'none', '', '98', '1', '1648067239', '1647549566');
  222. INSERT INTO `__PREFIX__menu_rule` VALUES ('9', '8', 'button', '查看', 'auth/admin/index', '', '', null, '', '', '0', 'none', '', '98', '1', '1648065864', '1647806112');
  223. INSERT INTO `__PREFIX__menu_rule` VALUES ('10', '8', 'button', '添加', 'auth/admin/add', '', '', null, '', '', '0', 'none', '', '98', '1', '1648065864', '1647806112');
  224. INSERT INTO `__PREFIX__menu_rule` VALUES ('11', '8', 'button', '编辑', 'auth/admin/edit', '', '', null, '', '', '0', 'none', '', '98', '1', '1648065864', '1647806129');
  225. INSERT INTO `__PREFIX__menu_rule` VALUES ('12', '8', 'button', '删除', 'auth/admin/del', '', '', null, '', '', '0', 'none', '', '98', '1', '1648065864', '1647806112');
  226. INSERT INTO `__PREFIX__menu_rule` VALUES ('13', '2', 'menu', '菜单规则管理', 'auth/menu', 'auth/menu', 'el-icon-Grid', 'tab', '', '/src/views/backend/auth/menu/index.vue', '1', 'none', '', '97', '1', '1648133759', '1645876529');
  227. INSERT INTO `__PREFIX__menu_rule` VALUES ('14', '13', 'button', '查看', 'auth/menu/index', '', '', null, '', '', '0', 'none', '', '97', '1', '1648065864', '1647806112');
  228. INSERT INTO `__PREFIX__menu_rule` VALUES ('15', '13', 'button', '添加', 'auth/menu/add', '', '', null, '', '', '0', 'none', '', '97', '1', '1648065864', '1647806112');
  229. INSERT INTO `__PREFIX__menu_rule` VALUES ('16', '13', 'button', '编辑', 'auth/menu/edit', '', '', null, '', '', '0', 'none', '', '97', '1', '1648065864', '1647806129');
  230. INSERT INTO `__PREFIX__menu_rule` VALUES ('17', '13', 'button', '删除', 'auth/menu/del', '', '', null, '', '', '0', 'none', '', '97', '1', '1648065864', '1647806112');
  231. INSERT INTO `__PREFIX__menu_rule` VALUES ('18', '13', 'button', '快速排序', 'auth/menu/sortable', '', '', null, '', '', '0', 'none', '', '97', '1', '1648065864', '1647806112');
  232. INSERT INTO `__PREFIX__menu_rule` VALUES ('19', '2', 'menu', '管理员日志管理', 'auth/adminLog', 'auth/adminLog', 'el-icon-List', 'tab', '', '/src/views/backend/auth/adminLog/index.vue', '1', 'none', '', '96', '1', '1648067241', '1647963918');
  233. INSERT INTO `__PREFIX__menu_rule` VALUES ('20', '19', 'button', '查看', 'auth/adminLog/index', '', '', null, '', '', '0', 'none', '', '96', '1', '1648065864', '1647806112');
  234. INSERT INTO `__PREFIX__menu_rule` VALUES ('21', '0', 'menu_dir', '会员管理', 'user', 'user', 'fa fa-drivers-license', null, '', '', '0', 'none', '', '95', '1', '1648947448', '1648049553');
  235. INSERT INTO `__PREFIX__menu_rule` VALUES ('22', '21', 'menu', '会员管理', 'user/user', 'user/user', 'fa fa-user', 'tab', '', '/src/views/backend/user/user/index.vue', '1', 'none', '', '94', '1', '1648255019', '1648049712');
  236. INSERT INTO `__PREFIX__menu_rule` VALUES ('23', '22', 'button', '查看', 'user/user/index', '', '', null, '', '', '0', 'none', '', '94', '1', '1648065864', '1647806112');
  237. INSERT INTO `__PREFIX__menu_rule` VALUES ('24', '22', 'button', '添加', 'user/user/add', '', '', null, '', '', '0', 'none', '', '94', '1', '1648065864', '1647806112');
  238. INSERT INTO `__PREFIX__menu_rule` VALUES ('25', '22', 'button', '编辑', 'user/user/edit', '', '', null, '', '', '0', 'none', '', '94', '1', '1648065864', '1647806129');
  239. INSERT INTO `__PREFIX__menu_rule` VALUES ('26', '22', 'button', '删除', 'user/user/del', '', '', null, '', '', '0', 'none', '', '94', '1', '1648065864', '1647806112');
  240. INSERT INTO `__PREFIX__menu_rule` VALUES ('27', '21', 'menu', '会员分组管理', 'user/group', 'user/group', 'fa fa-group', 'tab', '', '/src/views/backend/user/group/index.vue', '1', 'none', '', '93', '1', '1648067248', '1648051141');
  241. INSERT INTO `__PREFIX__menu_rule` VALUES ('28', '27', 'button', '查看', 'user/group/index', '', '', null, '', '', '0', 'none', '', '93', '1', '1648065864', '1647806112');
  242. INSERT INTO `__PREFIX__menu_rule` VALUES ('29', '27', 'button', '添加', 'user/group/add', '', '', null, '', '', '0', 'none', '', '93', '1', '1648065864', '1647806112');
  243. INSERT INTO `__PREFIX__menu_rule` VALUES ('30', '27', 'button', '编辑', 'user/group/edit', '', '', null, '', '', '0', 'none', '', '93', '1', '1648065864', '1647806129');
  244. INSERT INTO `__PREFIX__menu_rule` VALUES ('31', '27', 'button', '删除', 'user/group/del', '', '', null, '', '', '0', 'none', '', '93', '1', '1648065864', '1647806112');
  245. INSERT INTO `__PREFIX__menu_rule` VALUES ('32', '21', 'menu', '会员规则管理', 'user/rule', 'user/rule', 'fa fa-th-list', 'tab', '', '/src/views/backend/user/rule/index.vue', '1', 'none', '', '92', '1', '1648067247', '1648051207');
  246. INSERT INTO `__PREFIX__menu_rule` VALUES ('33', '32', 'button', '查看', 'user/rule/index', '', '', null, '', '', '0', 'none', '', '92', '1', '1648065864', '1647806112');
  247. INSERT INTO `__PREFIX__menu_rule` VALUES ('34', '32', 'button', '添加', 'user/rule/add', '', '', null, '', '', '0', 'none', '', '92', '1', '1648065864', '1647806112');
  248. INSERT INTO `__PREFIX__menu_rule` VALUES ('35', '32', 'button', '编辑', 'user/rule/edit', '', '', null, '', '', '0', 'none', '', '92', '1', '1648065864', '1647806129');
  249. INSERT INTO `__PREFIX__menu_rule` VALUES ('36', '32', 'button', '删除', 'user/rule/del', '', '', null, '', '', '0', 'none', '', '92', '1', '1648065864', '1647806112');
  250. INSERT INTO `__PREFIX__menu_rule` VALUES ('37', '32', 'button', '快速排序', 'user/rule/sortable', '', '', null, '', '', '0', 'none', '', '92', '1', '1648065864', '1647806112');
  251. INSERT INTO `__PREFIX__menu_rule` VALUES ('38', '21', 'menu', '会员余额管理', 'user/moneyLog', 'user/moneyLog', 'el-icon-Money', 'tab', '', '/src/views/backend/user/moneyLog/index.vue', '0', 'none', '', '91', '1', '1648437356', '1648052587');
  252. INSERT INTO `__PREFIX__menu_rule` VALUES ('39', '38', 'button', '查看', 'user/moneyLog/index', '', '', null, '', '', '0', 'none', '', '91', '1', '1648065864', '1647806112');
  253. INSERT INTO `__PREFIX__menu_rule` VALUES ('40', '38', 'button', '添加', 'user/moneyLog/add', '', '', null, '', '', '0', 'none', '', '91', '1', '1648065864', '1647806112');
  254. INSERT INTO `__PREFIX__menu_rule` VALUES ('41', '21', 'menu', '会员积分管理', 'user/scoreLog', 'user/scoreLog', 'el-icon-Discount', 'tab', '', '/src/views/backend/user/scoreLog/index.vue', '1', 'none', '', '90', '1', '1648067246', '1648052689');
  255. INSERT INTO `__PREFIX__menu_rule` VALUES ('42', '41', 'button', '查看', 'user/scoreLog/index', '', '', null, '', '', '0', 'none', '', '90', '1', '1648065864', '1647806112');
  256. INSERT INTO `__PREFIX__menu_rule` VALUES ('43', '41', 'button', '添加', 'user/scoreLog/add', '', '', null, '', '', '0', 'none', '', '90', '1', '1648065864', '1647806112');
  257. INSERT INTO `__PREFIX__menu_rule` VALUES ('44', '0', 'menu_dir', '常规管理', 'routine', 'routine', 'fa fa-cogs', null, '', '', '0', 'none', '', '89', '1', '1648133739', '1645876529');
  258. INSERT INTO `__PREFIX__menu_rule` VALUES ('45', '44', 'menu', '系统配置', 'routine/config', 'routine/config', 'el-icon-Tools', 'tab', '', '/src/views/backend/routine/config/index.vue', '1', 'none', '', '88', '1', '1648781089', '1648053389');
  259. INSERT INTO `__PREFIX__menu_rule` VALUES ('46', '45', 'button', '查看', 'routine/config/index', '', '', null, '', '', '0', 'none', '', '88', '1', '1648065864', '1647806112');
  260. INSERT INTO `__PREFIX__menu_rule` VALUES ('47', '45', 'button', '编辑', 'routine/config/edit', '', '', null, '', '', '0', 'none', '', '88', '1', '1648065864', '1647806112');
  261. INSERT INTO `__PREFIX__menu_rule` VALUES ('48', '44', 'menu', '附件管理', 'routine/attachment', 'routine/attachment', 'fa fa-folder', 'tab', '', '/src/views/backend/routine/attachment/index.vue', '1', 'none', 'remark_text', '87', '1', '1648067228', '1647105410');
  262. INSERT INTO `__PREFIX__menu_rule` VALUES ('49', '48', 'button', '查看', 'routine/attachment/index', '', '', null, '', '', '0', 'none', '', '87', '1', '1648065864', '1647806112');
  263. INSERT INTO `__PREFIX__menu_rule` VALUES ('50', '48', 'button', '编辑', 'routine/attachment/edit', '', '', null, '', '', '0', 'none', '', '87', '1', '1648065864', '1647806129');
  264. INSERT INTO `__PREFIX__menu_rule` VALUES ('51', '48', 'button', '删除', 'routine/attachment/del', '', '', null, '', '', '0', 'none', '', '87', '1', '1648065864', '1647806112');
  265. INSERT INTO `__PREFIX__menu_rule` VALUES ('52', '44', 'menu', '个人资料', 'routine/adminInfo', 'routine/adminInfo', 'fa fa-user', 'tab', '', '/src/views/backend/routine/adminInfo.vue', '1', 'none', '', '86', '1', '1648067229', '1645876529');
  266. INSERT INTO `__PREFIX__menu_rule` VALUES ('53', '52', 'button', '查看', 'routine/adminInfo/index', '', '', null, '', '', '0', 'none', '', '86', '1', '1648065864', '1647806112');
  267. INSERT INTO `__PREFIX__menu_rule` VALUES ('54', '52', 'button', '编辑', 'routine/adminInfo/edit', '', '', null, '', '', '0', 'none', '', '86', '1', '1648065864', '1647806129');
  268. INSERT INTO `__PREFIX__menu_rule` VALUES ('55', '0', 'menu_dir', '数据安全管理', 'security', 'security', 'fa fa-shield', null, '', '', '0', 'none', '', '85', '1', '1649853629', '1648948025');
  269. INSERT INTO `__PREFIX__menu_rule` VALUES ('56', '55', 'menu', '数据回收站', 'security/dataRecycleLog', 'security/dataRecycleLog', 'fa fa-database', 'tab', '', '/src/views/backend/security/dataRecycleLog/index.vue', '1', 'none', '', '84', '1', '1651603319', '1648948283');
  270. INSERT INTO `__PREFIX__menu_rule` VALUES ('57', '56', 'button', '查看', 'security/dataRecycleLog/index', '', '', null, '', '', '0', 'none', '', '84', '1', '1648065864', '1647806112');
  271. INSERT INTO `__PREFIX__menu_rule` VALUES ('58', '56', 'button', '删除', 'security/dataRecycleLog/del', '', '', null, '', '', '0', 'none', '', '84', '1', '1648065864', '1647806112');
  272. INSERT INTO `__PREFIX__menu_rule` VALUES ('59', '56', 'button', '还原', 'security/dataRecycleLog/restore', '', '', null, '', '', '0', 'none', '', '84', '1', '1648065864', '1647806112');
  273. INSERT INTO `__PREFIX__menu_rule` VALUES ('60', '56', 'button', '查看详情', 'security/dataRecycleLog/info', '', '', null, '', '', '0', 'none', '', '84', '1', '1648065864', '1647806112');
  274. INSERT INTO `__PREFIX__menu_rule` VALUES ('61', '55', 'menu', '敏感数据修改记录', 'security/sensitiveDataLog', 'security/sensitiveDataLog', 'fa fa-expeditedssl', 'tab', '', '/src/views/backend/security/sensitiveDataLog/index.vue', '1', 'none', '', '83', '1', '1649112262', '1649059604');
  275. INSERT INTO `__PREFIX__menu_rule` VALUES ('62', '61', 'button', '查看', 'security/sensitiveDataLog/index', '', '', null, '', '', '0', 'none', '', '83', '1', '1648065864', '1647806112');
  276. INSERT INTO `__PREFIX__menu_rule` VALUES ('63', '61', 'button', '删除', 'security/sensitiveDataLog/del', '', '', null, '', '', '0', 'none', '', '83', '1', '1648065864', '1647806112');
  277. INSERT INTO `__PREFIX__menu_rule` VALUES ('64', '61', 'button', '回滚', 'security/sensitiveDataLog/rollback', '', '', null, '', '', '0', 'none', '', '83', '1', '1648065864', '1647806112');
  278. INSERT INTO `__PREFIX__menu_rule` VALUES ('65', '61', 'button', '查看详情', 'security/sensitiveDataLog/info', '', '', null, '', '', '0', 'none', '', '83', '1', '1648065864', '1647806112');
  279. INSERT INTO `__PREFIX__menu_rule` VALUES ('66', '55', 'menu', '数据回收规则管理', 'security/dataRecycle', 'security/dataRecycle', 'fa fa-database', 'tab', '', '/src/views/backend/security/dataRecycle/index.vue', '1', 'none', '在此定义需要回收的数据,实现数据自动统一回收', '82', '1', '1651603319', '1648948215');
  280. INSERT INTO `__PREFIX__menu_rule` VALUES ('67', '66', 'button', '查看', 'security/dataRecycle/index', '', '', null, '', '', '0', 'none', '', '82', '1', '1648065864', '1647806112');
  281. INSERT INTO `__PREFIX__menu_rule` VALUES ('68', '66', 'button', '添加', 'security/dataRecycle/add', '', '', null, '', '', '0', 'none', '', '82', '1', '1648065864', '1647806112');
  282. INSERT INTO `__PREFIX__menu_rule` VALUES ('69', '66', 'button', '编辑', 'security/dataRecycle/edit', '', '', null, '', '', '0', 'none', '', '82', '1', '1648065864', '1647806129');
  283. INSERT INTO `__PREFIX__menu_rule` VALUES ('70', '66', 'button', '删除', 'security/dataRecycle/del', '', '', null, '', '', '0', 'none', '', '82', '1', '1648065864', '1647806112');
  284. INSERT INTO `__PREFIX__menu_rule` VALUES ('71', '55', 'menu', '敏感字段规则管理', 'security/sensitiveData', 'security/sensitiveData', 'fa fa-expeditedssl', 'tab', '', '/src/views/backend/security/sensitiveData/index.vue', '1', 'none', '在此定义需要保护的敏感字段,随后系统将自动监听该字段的修改操作,并提供了敏感字段的修改回滚功能', '81', '1', '1649112263', '1649005119');
  285. INSERT INTO `__PREFIX__menu_rule` VALUES ('72', '71', 'button', '查看', 'security/sensitiveData/index', '', '', null, '', '', '0', 'none', '', '81', '1', '1648065864', '1647806112');
  286. INSERT INTO `__PREFIX__menu_rule` VALUES ('73', '71', 'button', '添加', 'security/sensitiveData/add', '', '', null, '', '', '0', 'none', '', '81', '1', '1648065864', '1647806112');
  287. INSERT INTO `__PREFIX__menu_rule` VALUES ('74', '71', 'button', '编辑', 'security/sensitiveData/edit', '', '', null, '', '', '0', 'none', '', '81', '1', '1648065864', '1647806129');
  288. INSERT INTO `__PREFIX__menu_rule` VALUES ('75', '71', 'button', '删除', 'security/sensitiveData/del', '', '', null, '', '', '0', 'none', '', '81', '1', '1648065864', '1647806112');
  289. INSERT INTO `__PREFIX__menu_rule` VALUES ('76', '0', 'menu', 'BuildAdmin', 'buildadmin/buildadmin', 'buildadmin', 'local-logo', 'link', 'https://doc.buildadmin.com', '', '0', 'none', '', '0', '0', '1651926977', '1648947396');
  290. INSERT INTO `__PREFIX__menu_rule` VALUES ('77', '45', 'button', '添加', 'routine/config/add', '', '', null, '', '', '0', 'none', '', '88', '1', '1655375826', '1655375812');
  291. INSERT INTO `__PREFIX__menu_rule` VALUES ('78', '0', 'menu', '模块市场', 'moduleStore/moduleStore', 'moduleStore', 'el-icon-GoodsFilled', 'tab', '', '/src/views/backend/module/index.vue', '1', 'none', '', '86', '1', '1661317584', '1661317424');
  292. INSERT INTO `__PREFIX__menu_rule` VALUES ('79', '78', 'button', '查看', 'moduleStore/moduleStore/index', '', '', null, '', '', '0', 'none', '', '1', '1', '1648065864', '1647806112');
  293. INSERT INTO `__PREFIX__menu_rule` VALUES ('80', '78', 'button', '安装', 'moduleStore/moduleStore/install', '', '', null, '', '', '0', 'none', '', '2', '1', '1648065864', '1647806112');
  294. INSERT INTO `__PREFIX__menu_rule` VALUES ('81', '78', 'button', '调整状态', 'moduleStore/moduleStore/changeState', '', '', null, '', '', '0', 'none', '', '3', '1', '1648065864', '1647806112');
  295. INSERT INTO `__PREFIX__menu_rule` VALUES ('82', '78', 'button', '卸载', 'moduleStore/moduleStore/uninstall', '', '', null, '', '', '0', 'none', '', '4', '1', '1648065864', '1647806112');
  296. INSERT INTO `__PREFIX__menu_rule` VALUES ('83', '78', 'button', '更新', 'moduleStore/moduleStore/update', '', '', null, '', '', '0', 'none', '', '5', '1', '1648065864', '1647806112');
  297. INSERT INTO `__PREFIX__menu_rule` VALUES ('84', '0', 'menu', 'CRUD代码生成', 'crud/crud', 'crud/crud', 'fa fa-code', 'tab', '', '/src/views/backend/crud/index.vue', '1', 'none', '', '80', '1', '1668848266', '1668848266');
  298. INSERT INTO `__PREFIX__menu_rule` VALUES ('85', '84', 'button', '查看', 'crud/crud/index', '', '', null, '', '', '0', 'none', '', '3', '1', '1668848809', '1668848770');
  299. INSERT INTO `__PREFIX__menu_rule` VALUES ('86', '84', 'button', '生成', 'crud/crud/generate', '', '', null, '', '', '0', 'none', '', '2', '1', '1668848809', '1668848770');
  300. INSERT INTO `__PREFIX__menu_rule` VALUES ('87', '84', 'button', '删除', 'crud/crud/delete', '', '', null, '', '', '0', 'none', '', '1', '1', '1668848921', '1668848921');
  301. COMMIT;
  302. -- ----------------------------
  303. -- Table structure for `__PREFIX__security_data_recycle`
  304. -- ----------------------------
  305. DROP TABLE IF EXISTS `__PREFIX__security_data_recycle`;
  306. CREATE TABLE `__PREFIX__security_data_recycle` (
  307. `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  308. `name` varchar(50) NOT NULL DEFAULT '' COMMENT '规则名称',
  309. `controller` varchar(100) NOT NULL DEFAULT '' COMMENT '控制器',
  310. `controller_as` varchar(100) NOT NULL DEFAULT '' COMMENT '控制器别名',
  311. `data_table` varchar(100) NOT NULL DEFAULT '' COMMENT '对应数据表',
  312. `primary_key` varchar(50) NOT NULL DEFAULT '' COMMENT '数据表主键',
  313. `status` enum('1','0') NOT NULL DEFAULT '0' COMMENT '状态:0=禁用,1=启用',
  314. `updatetime` int(10) unsigned DEFAULT NULL COMMENT '修改时间',
  315. `createtime` int(10) unsigned DEFAULT NULL COMMENT '创建时间',
  316. PRIMARY KEY (`id`)
  317. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='回收规则表';
  318. -- ----------------------------
  319. -- Records of __PREFIX__security_data_recycle
  320. -- ----------------------------
  321. BEGIN;
  322. INSERT INTO `__PREFIX__security_data_recycle` VALUES ('1', '管理员', 'auth/Admin.php', 'auth/admin', 'admin', 'id', '1', '1648958789', '1648958789');
  323. INSERT INTO `__PREFIX__security_data_recycle` VALUES ('2', '管理员日志', 'auth/AdminLog.php', 'auth/adminlog', 'admin_log', 'id', '1', '1648967082', '1648958964');
  324. INSERT INTO `__PREFIX__security_data_recycle` VALUES ('3', '菜单规则', 'auth/Menu.php', 'auth/menu', 'menu_rule', 'id', '1', '1648959494', '1648959494');
  325. INSERT INTO `__PREFIX__security_data_recycle` VALUES ('4', '系统配置项', 'routine/Config.php', 'routine/config', 'config', 'id', '1', '1648959518', '1648959510');
  326. INSERT INTO `__PREFIX__security_data_recycle` VALUES ('5', '会员', 'user/User.php', 'user/user', 'user', 'id', '1', '1649097966', '1648959540');
  327. INSERT INTO `__PREFIX__security_data_recycle` VALUES ('6', '数据回收规则', 'security/DataRecycle.php', 'security/datarecycle', 'security_data_recycle', 'id', '1', '1648965759', '1648959655');
  328. COMMIT;
  329. -- ----------------------------
  330. -- Table structure for `__PREFIX__security_data_recycle_log`
  331. -- ----------------------------
  332. DROP TABLE IF EXISTS `__PREFIX__security_data_recycle_log`;
  333. CREATE TABLE `__PREFIX__security_data_recycle_log` (
  334. `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  335. `admin_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '操作管理员',
  336. `recycle_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '回收规则ID',
  337. `data` text COMMENT '回收的数据',
  338. `data_table` varchar(100) NOT NULL DEFAULT '' COMMENT '数据表',
  339. `primary_key` varchar(50) NOT NULL DEFAULT '' COMMENT '数据表主键',
  340. `is_restore` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否已还原:0=否,1=是',
  341. `ip` varchar(50) NOT NULL DEFAULT '' COMMENT '操作者IP',
  342. `useragent` varchar(255) NOT NULL DEFAULT '' COMMENT 'User Agent',
  343. `createtime` int(10) unsigned DEFAULT NULL COMMENT '删除时间',
  344. PRIMARY KEY (`id`)
  345. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='数据回收记录表';
  346. -- ----------------------------
  347. -- Table structure for `__PREFIX__security_sensitive_data`
  348. -- ----------------------------
  349. DROP TABLE IF EXISTS `__PREFIX__security_sensitive_data`;
  350. CREATE TABLE `__PREFIX__security_sensitive_data` (
  351. `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  352. `name` varchar(50) NOT NULL DEFAULT '' COMMENT '规则名称',
  353. `controller` varchar(100) NOT NULL DEFAULT '' COMMENT '控制器',
  354. `controller_as` varchar(100) NOT NULL DEFAULT '' COMMENT '处理后的控制器名',
  355. `data_table` varchar(100) NOT NULL DEFAULT '' COMMENT '对应数据表',
  356. `primary_key` varchar(50) NOT NULL DEFAULT '' COMMENT '数据表主键字段',
  357. `data_fields` text NOT NULL COMMENT '敏感数据字段',
  358. `status` enum('1','0') NOT NULL DEFAULT '0' COMMENT '状态:0=关闭,1=启用',
  359. `updatetime` int(10) unsigned DEFAULT NULL COMMENT '修改时间',
  360. `createtime` int(10) unsigned DEFAULT NULL COMMENT '创建时间',
  361. PRIMARY KEY (`id`)
  362. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='敏感数据表';
  363. -- ----------------------------
  364. -- Records of __PREFIX__security_sensitive_data
  365. -- ----------------------------
  366. BEGIN;
  367. INSERT INTO `__PREFIX__security_sensitive_data` VALUES ('1', '管理员数据', 'auth/Admin.php', 'auth/admin', 'admin', 'id', '{\"username\":\"用户名\",\"mobile\":\"手机\",\"password\":\"密码\",\"status\":\"状态\"}', '1', '1649047890', '1649045180');
  368. INSERT INTO `__PREFIX__security_sensitive_data` VALUES ('2', '会员数据', 'user/User.php', 'user/user', 'user', 'id', '{\"username\":\"用户名\",\"mobile\":\"手机号\",\"password\":\"密码\",\"status\":\"状态\",\"email\":\"邮箱地址\"}', '1', '1649058989', '1649045243');
  369. INSERT INTO `__PREFIX__security_sensitive_data` VALUES ('3', '管理员权限', 'auth/Group.php', 'auth/group', 'admin_group', 'id', '{\"rules\":\"权限规则ID\"}', '1', '1649047866', '1649047271');
  370. COMMIT;
  371. -- ----------------------------
  372. -- Table structure for `__PREFIX__security_sensitive_data_log`
  373. -- ----------------------------
  374. DROP TABLE IF EXISTS `__PREFIX__security_sensitive_data_log`;
  375. CREATE TABLE `__PREFIX__security_sensitive_data_log` (
  376. `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  377. `admin_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '管理员',
  378. `sensitive_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '敏感数据规则ID',
  379. `data_table` varchar(100) NOT NULL DEFAULT '' COMMENT '所在数据表',
  380. `primary_key` varchar(50) NOT NULL DEFAULT '' COMMENT '数据表主键',
  381. `data_field` varchar(50) NOT NULL DEFAULT '' COMMENT '被修改字段',
  382. `data_comment` varchar(50) NOT NULL DEFAULT '' COMMENT '被修改项',
  383. `id_value` varchar(11) NOT NULL DEFAULT '' COMMENT '被修改项主键值',
  384. `before` text COMMENT '修改前',
  385. `after` text COMMENT '修改后',
  386. `ip` varchar(50) NOT NULL DEFAULT '' COMMENT '操作者IP',
  387. `useragent` varchar(255) NOT NULL DEFAULT '' COMMENT 'User Agent',
  388. `is_rollback` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否已回滚:0=否,1=是',
  389. `createtime` int(10) unsigned DEFAULT NULL COMMENT '修改时间',
  390. PRIMARY KEY (`id`)
  391. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='敏感数据修改记录';
  392. -- ----------------------------
  393. -- Table structure for `__PREFIX__test_build`
  394. -- ----------------------------
  395. DROP TABLE IF EXISTS `__PREFIX__test_build`;
  396. CREATE TABLE `__PREFIX__test_build` (
  397. `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  398. `title` varchar(100) DEFAULT NULL COMMENT '标题',
  399. `keyword_rows` varchar(100) DEFAULT NULL COMMENT '关键词',
  400. `content` text NOT NULL COMMENT '内容',
  401. `views` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '浏览量',
  402. `likes` mediumint(9) unsigned NOT NULL DEFAULT '0' COMMENT '有帮助数',
  403. `dislikes` mediumint(9) unsigned NOT NULL DEFAULT '0' COMMENT '无帮助数',
  404. `note_textarea` varchar(100) DEFAULT NULL COMMENT '备注',
  405. `status` enum('1','0') NOT NULL DEFAULT '1' COMMENT '状态:0=隐藏,1=正常',
  406. `weigh` int(10) NOT NULL DEFAULT '0' COMMENT '权重',
  407. `updatetime` int(10) unsigned DEFAULT NULL COMMENT '更新时间',
  408. `createtime` int(10) unsigned DEFAULT NULL COMMENT '创建时间',
  409. PRIMARY KEY (`id`)
  410. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='知识库表';
  411. -- ----------------------------
  412. -- Table structure for `__PREFIX__token`
  413. -- ----------------------------
  414. DROP TABLE IF EXISTS `__PREFIX__token`;
  415. CREATE TABLE `__PREFIX__token` (
  416. `token` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Token',
  417. `type` varchar(15) NOT NULL COMMENT '类型',
  418. `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
  419. `createtime` int(10) DEFAULT NULL COMMENT '创建时间',
  420. `expiretime` int(10) DEFAULT NULL COMMENT '过期时间',
  421. PRIMARY KEY (`token`)
  422. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='用户Token表';
  423. -- ----------------------------
  424. -- Table structure for `__PREFIX__user`
  425. -- ----------------------------
  426. DROP TABLE IF EXISTS `__PREFIX__user`;
  427. CREATE TABLE `__PREFIX__user` (
  428. `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  429. `group_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '分组ID',
  430. `username` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '用户名',
  431. `nickname` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '昵称',
  432. `email` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '邮箱地址',
  433. `mobile` varchar(11) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '手机号',
  434. `avatar` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '头像',
  435. `gender` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '性别:0=未知,1=男,2=女',
  436. `birthday` date DEFAULT NULL COMMENT '生日',
  437. `money` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '余额',
  438. `score` int(10) NOT NULL DEFAULT '0' COMMENT '积分',
  439. `lastlogintime` int(10) DEFAULT NULL COMMENT '上次登录时间',
  440. `lastloginip` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '登录IP',
  441. `loginfailure` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '失败次数',
  442. `joinip` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '加入IP',
  443. `jointime` int(10) DEFAULT NULL COMMENT '加入时间',
  444. `motto` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '签名',
  445. `password` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '密码',
  446. `salt` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '密码盐',
  447. `status` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '状态',
  448. `updatetime` int(10) DEFAULT NULL COMMENT '更新时间',
  449. `createtime` int(10) DEFAULT NULL COMMENT '创建时间',
  450. PRIMARY KEY (`id`),
  451. KEY `username` (`username`),
  452. KEY `email` (`email`),
  453. KEY `mobile` (`mobile`)
  454. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='会员表';
  455. -- ----------------------------
  456. -- Records of __PREFIX__user
  457. -- ----------------------------
  458. BEGIN;
  459. INSERT INTO `__PREFIX__user` VALUES ('1', '1', 'user', 'User', 'user@buildadmin.com', '18888888888', '', '2', '2022-05-13', '0', '0', '1648156017', '127.0.0.1', '0', '', '1648156017', '', '', '', 'enable', '1650731874', '1648156017');
  460. COMMIT;
  461. -- ----------------------------
  462. -- Table structure for `__PREFIX__user_group`
  463. -- ----------------------------
  464. DROP TABLE IF EXISTS `__PREFIX__user_group`;
  465. CREATE TABLE `__PREFIX__user_group` (
  466. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  467. `name` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '组名',
  468. `rules` text COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '权限节点',
  469. `status` enum('1','0') COLLATE utf8mb4_unicode_ci DEFAULT '1' COMMENT '状态:0=禁用,1=启用',
  470. `updatetime` int(10) DEFAULT NULL COMMENT '更新时间',
  471. `createtime` int(10) DEFAULT NULL COMMENT '添加时间',
  472. PRIMARY KEY (`id`)
  473. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='会员组表';
  474. -- ----------------------------
  475. -- Records of __PREFIX__user_group
  476. -- ----------------------------
  477. BEGIN;
  478. INSERT INTO `__PREFIX__user_group` VALUES ('1', '默认分组', '*', '1', '1648167137', '1648167095');
  479. COMMIT;
  480. -- ----------------------------
  481. -- Table structure for `__PREFIX__user_money_log`
  482. -- ----------------------------
  483. DROP TABLE IF EXISTS `__PREFIX__user_money_log`;
  484. CREATE TABLE `__PREFIX__user_money_log` (
  485. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  486. `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '会员ID',
  487. `money` int(10) NOT NULL DEFAULT '0' COMMENT '变更余额',
  488. `before` int(10) NOT NULL DEFAULT '0' COMMENT '变更前余额',
  489. `after` int(10) NOT NULL DEFAULT '0' COMMENT '变更后余额',
  490. `memo` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '备注',
  491. `createtime` int(10) unsigned DEFAULT NULL COMMENT '创建时间',
  492. PRIMARY KEY (`id`)
  493. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='会员余额变动表';
  494. -- ----------------------------
  495. -- Table structure for `__PREFIX__user_rule`
  496. -- ----------------------------
  497. DROP TABLE IF EXISTS `__PREFIX__user_rule`;
  498. CREATE TABLE `__PREFIX__user_rule` (
  499. `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  500. `pid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '上级菜单',
  501. `type` enum('route','menu_dir','menu','nav_user_menu','nav','button') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'menu' COMMENT '类型:route=路由,menu_dir=菜单目录,menu=菜单项,nav_user_menu=顶栏会员菜单下拉项,nav=顶栏菜单项,button=页面按钮',
  502. `title` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '标题',
  503. `name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '规则名称',
  504. `path` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '路由路径',
  505. `icon` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '图标',
  506. `menu_type` enum('tab','link','iframe') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'tab' COMMENT '菜单类型:tab=选项卡,link=链接,iframe=Iframe',
  507. `url` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'Url',
  508. `component` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '组件路径',
  509. `no_login_valid` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '未登录有效:0=否,1=是',
  510. `extend` enum('none','add_rules_only','add_menu_only') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'none' COMMENT '扩展属性:none=无,add_rules_only=只添加为路由,add_menu_only=只添加为菜单',
  511. `remark` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '备注',
  512. `weigh` int(10) NOT NULL DEFAULT '0' COMMENT '权重(排序)',
  513. `status` enum('1','0') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '1' COMMENT '状态:0=禁用,1=启用',
  514. `updatetime` int(10) DEFAULT NULL COMMENT '更新时间',
  515. `createtime` int(10) DEFAULT NULL COMMENT '创建时间',
  516. PRIMARY KEY (`id`),
  517. KEY `pid` (`pid`),
  518. KEY `weigh` (`weigh`)
  519. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='会员权限规则表';
  520. -- ----------------------------
  521. -- Records of __PREFIX__user_rule
  522. -- ----------------------------
  523. BEGIN;
  524. INSERT INTO `__PREFIX__user_rule` VALUES ('1', '0', 'menu_dir', '我的账户', 'account', 'account', 'fa fa-user-circle', 'tab', '', '', '0', 'none', '', '98', '1', '1655970295', '1648156017');
  525. INSERT INTO `__PREFIX__user_rule` VALUES ('2', '1', 'menu', '账户概览', 'account/overview', 'account/overview', 'fa fa-home', 'tab', '', '/src/views/frontend/user/account/overview.vue', '0', 'none', '', '99', '1', '1655879438', '1655820267');
  526. INSERT INTO `__PREFIX__user_rule` VALUES ('3', '1', 'menu', '个人资料', 'account/profile', 'account/profile', 'fa fa-user-circle-o', 'tab', '', '/src/views/frontend/user/account/profile.vue', '0', 'none', '', '98', '1', '1655972096', '1655820365');
  527. INSERT INTO `__PREFIX__user_rule` VALUES ('4', '1', 'menu', '修改密码', 'account/changePassword', 'account/changePassword', 'fa fa-shield', 'tab', '', '/src/views/frontend/user/account/changePassword.vue', '0', 'none', '', '97', '1', '1655980365', '1655820461');
  528. INSERT INTO `__PREFIX__user_rule` VALUES ('5', '1', 'menu', '积分记录', 'account/integral', 'account/integral', 'fa fa-tag', 'tab', '', '/src/views/frontend/user/account/integral.vue', '0', 'none', '', '96', '1', '1655985356', '1655820507');
  529. INSERT INTO `__PREFIX__user_rule` VALUES ('6', '1', 'menu', '余额记录', 'account/balance', 'account/balance', 'fa fa-money', 'tab', '', '/src/views/frontend/user/account/balance.vue', '0', 'none', '', '95', '1', '1655985373', '1655820593');
  530. COMMIT;
  531. -- ----------------------------
  532. -- Table structure for `__PREFIX__user_score_log`
  533. -- ----------------------------
  534. DROP TABLE IF EXISTS `__PREFIX__user_score_log`;
  535. CREATE TABLE `__PREFIX__user_score_log` (
  536. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  537. `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '会员ID',
  538. `score` int(10) NOT NULL DEFAULT '0' COMMENT '变更积分',
  539. `before` int(10) NOT NULL DEFAULT '0' COMMENT '变更前积分',
  540. `after` int(10) NOT NULL DEFAULT '0' COMMENT '变更后积分',
  541. `memo` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '备注',
  542. `createtime` int(10) unsigned DEFAULT NULL COMMENT '创建时间',
  543. PRIMARY KEY (`id`)
  544. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='会员积分变动表';
  545. -- ----------------------------
  546. -- Table structure for `__PREFIX__crud_log`
  547. -- ----------------------------
  548. DROP TABLE IF EXISTS `__PREFIX__crud_log`;
  549. CREATE TABLE `__PREFIX__crud_log` (
  550. `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  551. `table_name` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '数据表名',
  552. `table` text COLLATE utf8mb4_unicode_ci COMMENT '数据表数据',
  553. `fields` text COLLATE utf8mb4_unicode_ci COMMENT '字段数据',
  554. `status` enum('delete','success','error','start') COLLATE utf8mb4_unicode_ci DEFAULT 'start' COMMENT '状态:delete=已删除,success=成功,error=失败,start=生成中',
  555. `create_time` bigint(16) DEFAULT NULL COMMENT '创建时间',
  556. PRIMARY KEY (`id`)
  557. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='crud记录';