admin_v5.sql 66 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859
  1. /*
  2. Navicat Premium Data Transfer
  3. Source Server : local.server.cuci.cc
  4. Source Server Type : MySQL
  5. Source Server Version : 50562
  6. Source Host : server.cuci.cc:3306
  7. Source Schema : admin_v5
  8. Target Server Type : MySQL
  9. Target Server Version : 50562
  10. File Encoding : 65001
  11. Date: 19/08/2019 10:34:31
  12. */
  13. SET NAMES utf8mb4;
  14. SET FOREIGN_KEY_CHECKS = 0;
  15. -- ----------------------------
  16. -- Table structure for company_user
  17. -- ----------------------------
  18. DROP TABLE IF EXISTS `company_user`;
  19. CREATE TABLE `company_user` (
  20. `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  21. `nickname` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '员工姓名',
  22. `svn_username` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '员工账号',
  23. `svn_password` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '员工密码',
  24. `svn_authorize` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '权限授权',
  25. `user_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '员工身份',
  26. `entry_date` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '入职日期',
  27. `leave_date` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '离职日期',
  28. `become_date` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '转正日期',
  29. `contact_qq` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '联系QQ',
  30. `contact_mail` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '联系邮箱',
  31. `contact_phone` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '联系手机',
  32. `mobile_macs` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '打卡手机',
  33. `status` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '状态(0禁用,1正常,2离职)',
  34. `sort` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '排序权重',
  35. `is_deleted` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '删除(1删除,0未删)',
  36. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  37. PRIMARY KEY (`id`) USING BTREE,
  38. UNIQUE INDEX `idx_company_user_nickname`(`nickname`) USING BTREE,
  39. INDEX `idx_company_user_svn_username`(`svn_username`) USING BTREE,
  40. INDEX `idx_company_user_deleted`(`is_deleted`) USING BTREE,
  41. INDEX `idx_company_user_status`(`status`) USING BTREE,
  42. INDEX `idx_company_user_type`(`user_type`) USING BTREE
  43. ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '企业-员工信息';
  44. -- ----------------------------
  45. -- Table structure for company_user_auth
  46. -- ----------------------------
  47. DROP TABLE IF EXISTS `company_user_auth`;
  48. CREATE TABLE `company_user_auth` (
  49. `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  50. `title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '权限名称',
  51. `path` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '权限路径',
  52. `status` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '状态(0禁用,1正常)',
  53. `desc` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '权限描述',
  54. `sort` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '排序权重',
  55. `is_deleted` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '删除(1删除,0未删)',
  56. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  57. PRIMARY KEY (`id`) USING BTREE,
  58. INDEX `idx_company_user_auth_status`(`status`) USING BTREE,
  59. INDEX `idx_company_user_auth_deleted`(`is_deleted`) USING BTREE
  60. ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '企业-仓库权限';
  61. -- ----------------------------
  62. -- Table structure for company_user_clock
  63. -- ----------------------------
  64. DROP TABLE IF EXISTS `company_user_clock`;
  65. CREATE TABLE `company_user_clock` (
  66. `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  67. `uid` bigint(20) UNSIGNED NULL DEFAULT NULL COMMENT '用户ID',
  68. `name` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户姓名',
  69. `ip` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '权限名称',
  70. `mac` char(17) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '1' COMMENT '状态(1:禁用,2:启用)',
  71. `desc` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注说明',
  72. `date` date NULL DEFAULT NULL,
  73. `start_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  74. `end_at` datetime NULL DEFAULT NULL COMMENT '结束时间',
  75. PRIMARY KEY (`id`) USING BTREE,
  76. INDEX `idx_company_user_clock_date`(`date`) USING BTREE,
  77. INDEX `idx_company_user_clock_uid`(`uid`) USING BTREE,
  78. INDEX `idx_company_user_clock_name`(`name`) USING BTREE
  79. ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '企业-打卡记录';
  80. -- ----------------------------
  81. -- Table structure for store_express_company
  82. -- ----------------------------
  83. DROP TABLE IF EXISTS `store_express_company`;
  84. CREATE TABLE `store_express_company` (
  85. `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  86. `express_title` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '快递公司名称',
  87. `express_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '快递公司代码',
  88. `express_desc` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '快递公司描述',
  89. `status` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '状态(0.无效,1.有效)',
  90. `sort` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '排序权重',
  91. `is_deleted` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '删除状态(1删除,0未删除)',
  92. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  93. PRIMARY KEY (`id`) USING BTREE
  94. ) ENGINE = InnoDB AUTO_INCREMENT = 95 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商城-快递-公司';
  95. -- ----------------------------
  96. -- Records of store_express_company
  97. -- ----------------------------
  98. INSERT INTO `store_express_company` VALUES (5, 'AAE全球专递', 'aae', NULL, 0, 0, 0, '2017-09-12 11:53:40');
  99. INSERT INTO `store_express_company` VALUES (6, '安捷快递', 'anjie', '', 0, 0, 0, '2017-09-13 15:27:26');
  100. INSERT INTO `store_express_company` VALUES (7, '安信达快递', 'anxindakuaixi', NULL, 0, 0, 0, '2017-09-13 16:05:19');
  101. INSERT INTO `store_express_company` VALUES (8, '彪记快递', 'biaojikuaidi', NULL, 0, 0, 0, '2017-09-13 16:05:26');
  102. INSERT INTO `store_express_company` VALUES (9, 'BHT', 'bht', '', 0, 0, 0, '2017-09-13 16:05:37');
  103. INSERT INTO `store_express_company` VALUES (10, '百福东方国际物流', 'baifudongfang', NULL, 0, 0, 0, '2017-09-13 16:05:41');
  104. INSERT INTO `store_express_company` VALUES (11, '中国东方(COE)', 'coe', NULL, 0, 0, 0, '2017-09-13 16:05:48');
  105. INSERT INTO `store_express_company` VALUES (12, '长宇物流', 'changyuwuliu', NULL, 0, 0, 0, '2017-09-13 16:05:58');
  106. INSERT INTO `store_express_company` VALUES (13, '大田物流', 'datianwuliu', NULL, 0, 0, 0, '2017-09-13 16:06:06');
  107. INSERT INTO `store_express_company` VALUES (14, '德邦物流', 'debangwuliu', '', 0, 1, 0, '2017-09-13 16:06:14');
  108. INSERT INTO `store_express_company` VALUES (15, 'DHL', 'dhl', NULL, 0, 0, 0, '2017-09-13 16:06:24');
  109. INSERT INTO `store_express_company` VALUES (16, 'DPEX', 'dpex', NULL, 0, 0, 0, '2017-09-13 16:06:29');
  110. INSERT INTO `store_express_company` VALUES (17, 'd速快递', 'dsukuaidi', NULL, 0, 0, 0, '2017-09-13 16:06:34');
  111. INSERT INTO `store_express_company` VALUES (18, '递四方', 'disifang', NULL, 0, 0, 0, '2017-09-13 16:06:40');
  112. INSERT INTO `store_express_company` VALUES (19, 'EMS快递', 'ems', '', 1, 0, 0, '2017-09-13 16:06:47');
  113. INSERT INTO `store_express_company` VALUES (20, 'FEDEX(国外)', 'fedex', NULL, 0, 0, 0, '2017-09-13 16:06:56');
  114. INSERT INTO `store_express_company` VALUES (21, '飞康达物流', 'feikangda', NULL, 0, 0, 0, '2017-09-13 16:07:03');
  115. INSERT INTO `store_express_company` VALUES (22, '凤凰快递', 'fenghuangkuaidi', NULL, 0, 0, 0, '2017-09-13 16:07:10');
  116. INSERT INTO `store_express_company` VALUES (23, '飞快达', 'feikuaida', NULL, 0, 0, 0, '2017-09-13 16:07:16');
  117. INSERT INTO `store_express_company` VALUES (24, '国通快递', 'guotongkuaidi', NULL, 0, 0, 0, '2017-09-13 16:07:27');
  118. INSERT INTO `store_express_company` VALUES (25, '港中能达物流', 'ganzhongnengda', NULL, 0, 0, 0, '2017-09-13 16:07:33');
  119. INSERT INTO `store_express_company` VALUES (26, '广东邮政物流', 'guangdongyouzhengwuliu', NULL, 0, 0, 0, '2017-09-13 16:08:22');
  120. INSERT INTO `store_express_company` VALUES (27, '共速达', 'gongsuda', NULL, 0, 0, 0, '2017-09-13 16:08:48');
  121. INSERT INTO `store_express_company` VALUES (28, '汇通快运', 'huitongkuaidi', NULL, 0, 0, 0, '2017-09-13 16:08:56');
  122. INSERT INTO `store_express_company` VALUES (29, '恒路物流', 'hengluwuliu', NULL, 0, 0, 0, '2017-09-13 16:09:02');
  123. INSERT INTO `store_express_company` VALUES (30, '华夏龙物流', 'huaxialongwuliu', NULL, 0, 0, 0, '2017-09-13 16:09:12');
  124. INSERT INTO `store_express_company` VALUES (31, '海红', 'haihongwangsong', NULL, 0, 0, 0, '2017-09-13 16:09:20');
  125. INSERT INTO `store_express_company` VALUES (32, '海外环球', 'haiwaihuanqiu', NULL, 0, 0, 0, '2017-09-13 16:09:27');
  126. INSERT INTO `store_express_company` VALUES (33, '佳怡物流', 'jiayiwuliu', NULL, 0, 0, 0, '2017-09-13 16:09:35');
  127. INSERT INTO `store_express_company` VALUES (34, '京广速递', 'jinguangsudikuaijian', NULL, 0, 0, 0, '2017-09-13 16:09:42');
  128. INSERT INTO `store_express_company` VALUES (35, '急先达', 'jixianda', NULL, 0, 0, 0, '2017-09-13 16:09:49');
  129. INSERT INTO `store_express_company` VALUES (36, '佳吉物流', 'jjwl', NULL, 0, 0, 0, '2017-09-13 16:10:01');
  130. INSERT INTO `store_express_company` VALUES (37, '加运美物流', 'jymwl', NULL, 0, 0, 0, '2017-09-13 16:10:13');
  131. INSERT INTO `store_express_company` VALUES (38, '金大物流', 'jindawuliu', NULL, 0, 0, 0, '2017-09-13 16:10:22');
  132. INSERT INTO `store_express_company` VALUES (39, '嘉里大通', 'jialidatong', NULL, 0, 0, 0, '2017-09-13 16:10:33');
  133. INSERT INTO `store_express_company` VALUES (40, '晋越快递', 'jykd', NULL, 0, 0, 0, '2017-09-13 16:10:40');
  134. INSERT INTO `store_express_company` VALUES (41, '快捷速递', 'kuaijiesudi', NULL, 0, 0, 0, '2017-09-13 16:10:49');
  135. INSERT INTO `store_express_company` VALUES (42, '联邦快递(国内)', 'lianb', NULL, 0, 0, 0, '2017-09-13 16:10:58');
  136. INSERT INTO `store_express_company` VALUES (43, '联昊通物流', 'lianhaowuliu', NULL, 0, 0, 0, '2017-09-13 16:11:07');
  137. INSERT INTO `store_express_company` VALUES (44, '龙邦物流', 'longbanwuliu', NULL, 0, 0, 0, '2017-09-13 16:11:15');
  138. INSERT INTO `store_express_company` VALUES (45, '立即送', 'lijisong', NULL, 0, 0, 0, '2017-09-13 16:11:25');
  139. INSERT INTO `store_express_company` VALUES (46, '乐捷递', 'lejiedi', NULL, 0, 0, 0, '2017-09-13 16:11:36');
  140. INSERT INTO `store_express_company` VALUES (47, '民航快递', 'minghangkuaidi', NULL, 0, 0, 0, '2017-09-13 16:11:45');
  141. INSERT INTO `store_express_company` VALUES (48, '美国快递', 'meiguokuaidi', NULL, 0, 0, 0, '2017-09-13 16:11:53');
  142. INSERT INTO `store_express_company` VALUES (49, '门对门', 'menduimen', NULL, 0, 0, 0, '2017-09-13 16:12:01');
  143. INSERT INTO `store_express_company` VALUES (50, 'OCS', 'ocs', NULL, 0, 0, 0, '2017-09-13 16:12:10');
  144. INSERT INTO `store_express_company` VALUES (51, '配思货运', 'peisihuoyunkuaidi', NULL, 0, 0, 0, '2017-09-13 16:12:18');
  145. INSERT INTO `store_express_company` VALUES (52, '全晨快递', 'quanchenkuaidi', NULL, 0, 0, 0, '2017-09-13 16:12:26');
  146. INSERT INTO `store_express_company` VALUES (53, '全峰快递', 'quanfengkuaidi', NULL, 0, 0, 0, '2017-09-13 16:12:34');
  147. INSERT INTO `store_express_company` VALUES (54, '全际通物流', 'quanjitong', NULL, 0, 0, 0, '2017-09-13 16:12:41');
  148. INSERT INTO `store_express_company` VALUES (55, '全日通快递', 'quanritongkuaidi', NULL, 0, 0, 0, '2017-09-13 16:12:49');
  149. INSERT INTO `store_express_company` VALUES (56, '全一快递', 'quanyikuaidi', NULL, 0, 0, 0, '2017-09-13 16:12:56');
  150. INSERT INTO `store_express_company` VALUES (57, '如风达', 'rufengda', NULL, 0, 0, 0, '2017-09-13 16:13:03');
  151. INSERT INTO `store_express_company` VALUES (58, '三态速递', 'santaisudi', NULL, 0, 0, 0, '2017-09-13 16:13:15');
  152. INSERT INTO `store_express_company` VALUES (59, '盛辉物流', 'shenghuiwuliu', NULL, 0, 0, 0, '2017-09-13 16:13:22');
  153. INSERT INTO `store_express_company` VALUES (60, '申通', 'shentong', NULL, 0, 0, 0, '2017-09-13 16:13:34');
  154. INSERT INTO `store_express_company` VALUES (61, '顺丰', 'shunfeng', '', 0, 0, 0, '2017-09-13 16:13:41');
  155. INSERT INTO `store_express_company` VALUES (62, '速尔物流', 'sue', NULL, 0, 0, 0, '2017-09-13 16:13:48');
  156. INSERT INTO `store_express_company` VALUES (63, '盛丰物流', 'shengfeng', NULL, 0, 0, 0, '2017-09-13 16:13:55');
  157. INSERT INTO `store_express_company` VALUES (64, '赛澳递', 'saiaodi', NULL, 0, 0, 0, '2017-09-13 16:14:02');
  158. INSERT INTO `store_express_company` VALUES (65, '天地华宇', 'tiandihuayu', NULL, 0, 0, 0, '2017-09-13 16:14:11');
  159. INSERT INTO `store_express_company` VALUES (66, '天天快递', 'tiantian', NULL, 0, 0, 0, '2017-09-13 16:14:19');
  160. INSERT INTO `store_express_company` VALUES (67, 'TNT', 'tnt', NULL, 0, 0, 0, '2017-09-13 16:14:26');
  161. INSERT INTO `store_express_company` VALUES (68, 'UPS', 'ups', NULL, 0, 0, 0, '2017-09-13 16:14:29');
  162. INSERT INTO `store_express_company` VALUES (69, '万家物流', 'wanjiawuliu', NULL, 0, 0, 0, '2017-09-13 16:14:37');
  163. INSERT INTO `store_express_company` VALUES (70, '文捷航空速递', 'wenjiesudi', NULL, 0, 0, 0, '2017-09-13 16:14:46');
  164. INSERT INTO `store_express_company` VALUES (71, '伍圆', 'wuyuan', NULL, 0, 0, 0, '2017-09-13 16:14:52');
  165. INSERT INTO `store_express_company` VALUES (72, '万象物流', 'wxwl', NULL, 0, 0, 0, '2017-09-13 16:15:00');
  166. INSERT INTO `store_express_company` VALUES (73, '新邦物流', 'xinbangwuliu', NULL, 0, 0, 0, '2017-09-13 16:15:06');
  167. INSERT INTO `store_express_company` VALUES (74, '信丰物流', 'xinfengwuliu', NULL, 0, 0, 0, '2017-09-13 16:15:15');
  168. INSERT INTO `store_express_company` VALUES (75, '亚风速递', 'yafengsudi', NULL, 0, 0, 0, '2017-09-13 16:15:23');
  169. INSERT INTO `store_express_company` VALUES (76, '一邦速递', 'yibangwuliu', NULL, 0, 0, 0, '2017-09-13 16:15:30');
  170. INSERT INTO `store_express_company` VALUES (77, '优速物流', 'youshuwuliu', NULL, 0, 0, 0, '2017-09-13 16:15:36');
  171. INSERT INTO `store_express_company` VALUES (78, '邮政包裹挂号信', 'youzhengguonei', NULL, 0, 3, 0, '2017-09-13 16:15:44');
  172. INSERT INTO `store_express_company` VALUES (79, '邮政国际包裹挂号信', 'youzhengguoji', NULL, 0, 2, 0, '2017-09-13 16:15:51');
  173. INSERT INTO `store_express_company` VALUES (80, '远成物流', 'yuanchengwuliu', NULL, 0, 0, 0, '2017-09-13 16:15:57');
  174. INSERT INTO `store_express_company` VALUES (81, '圆通速递', 'yuantong', '', 1, 1, 0, '2017-09-13 16:16:03');
  175. INSERT INTO `store_express_company` VALUES (82, '源伟丰快递', 'yuanweifeng', NULL, 0, 0, 0, '2017-09-13 16:16:10');
  176. INSERT INTO `store_express_company` VALUES (83, '元智捷诚快递', 'yuanzhijiecheng', NULL, 0, 0, 0, '2017-09-13 16:16:17');
  177. INSERT INTO `store_express_company` VALUES (84, '韵达快运', 'yunda', NULL, 0, 0, 0, '2017-09-13 16:16:24');
  178. INSERT INTO `store_express_company` VALUES (85, '运通快递', 'yuntongkuaidi', NULL, 0, 0, 0, '2017-09-13 16:16:33');
  179. INSERT INTO `store_express_company` VALUES (86, '越丰物流', 'yuefengwuliu', NULL, 0, 0, 0, '2017-09-13 16:16:40');
  180. INSERT INTO `store_express_company` VALUES (87, '源安达', 'yad', NULL, 0, 0, 0, '2017-09-13 16:16:47');
  181. INSERT INTO `store_express_company` VALUES (88, '银捷速递', 'yinjiesudi', NULL, 0, 0, 0, '2017-09-13 16:16:56');
  182. INSERT INTO `store_express_company` VALUES (89, '宅急送', 'zhaijisong', NULL, 0, 0, 0, '2017-09-13 16:17:03');
  183. INSERT INTO `store_express_company` VALUES (90, '中铁快运', 'zhongtiekuaiyun', NULL, 0, 0, 0, '2017-09-13 16:17:10');
  184. INSERT INTO `store_express_company` VALUES (91, '中通速递', 'zhongtong', '', 0, 0, 0, '2017-09-13 16:17:16');
  185. INSERT INTO `store_express_company` VALUES (92, '中邮物流', 'zhongyouwuliu', NULL, 0, 0, 0, '2017-09-13 16:17:27');
  186. INSERT INTO `store_express_company` VALUES (93, '忠信达', 'zhongxinda', NULL, 0, 0, 0, '2017-09-13 16:17:34');
  187. INSERT INTO `store_express_company` VALUES (94, '芝麻开门', 'zhimakaimen', '', 1, 0, 0, '2017-09-13 16:17:41');
  188. -- ----------------------------
  189. -- Table structure for store_express_template
  190. -- ----------------------------
  191. DROP TABLE IF EXISTS `store_express_template`;
  192. CREATE TABLE `store_express_template` (
  193. `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  194. `rule` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '省份规则内容',
  195. `order_reduction_state` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '订单满减状态',
  196. `order_reduction_price` decimal(20, 2) UNSIGNED NULL DEFAULT 0.00 COMMENT '订单满减金额',
  197. `first_number` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '首件数量',
  198. `first_price` decimal(20, 2) UNSIGNED NULL DEFAULT 0.00 COMMENT '首件邮费',
  199. `next_number` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '续件数量',
  200. `next_price` decimal(20, 2) UNSIGNED NULL DEFAULT 0.00 COMMENT '续件邮费',
  201. `is_default` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '默认规则',
  202. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  203. PRIMARY KEY (`id`) USING BTREE,
  204. INDEX `idx_store_express_template_is_default`(`is_default`) USING BTREE
  205. ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商城-快递-模板';
  206. -- ----------------------------
  207. -- Table structure for store_goods
  208. -- ----------------------------
  209. DROP TABLE IF EXISTS `store_goods`;
  210. CREATE TABLE `store_goods` (
  211. `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  212. `cate_id` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '商品分类',
  213. `title` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '商品标题',
  214. `logo` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '商品图标',
  215. `specs` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '商品规格JSON',
  216. `lists` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '商品列表JSON',
  217. `image` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '商品图片',
  218. `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '商品内容',
  219. `number_sales` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '销售数量',
  220. `number_stock` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '库库数量',
  221. `price_rate` decimal(20, 4) UNSIGNED NULL DEFAULT 0.0000 COMMENT '返利比例',
  222. `price_express` decimal(20, 2) UNSIGNED NULL DEFAULT 0.00 COMMENT '统一运费',
  223. `status` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '销售状态',
  224. `sort` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '排序权重',
  225. `is_deleted` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '删除状态',
  226. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  227. PRIMARY KEY (`id`) USING BTREE,
  228. INDEX `idx_store_goods_status`(`status`) USING BTREE,
  229. INDEX `idx_store_goods_cate_id`(`cate_id`) USING BTREE,
  230. INDEX `idx_store_goods_is_deleted`(`is_deleted`) USING BTREE
  231. ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商品-记录';
  232. -- ----------------------------
  233. -- Table structure for store_goods_cate
  234. -- ----------------------------
  235. DROP TABLE IF EXISTS `store_goods_cate`;
  236. CREATE TABLE `store_goods_cate` (
  237. `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  238. `logo` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '分类图标',
  239. `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '分类名称',
  240. `desc` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '分类描述',
  241. `status` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '销售状态',
  242. `sort` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '排序权重',
  243. `is_deleted` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '删除状态',
  244. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  245. PRIMARY KEY (`id`) USING BTREE,
  246. INDEX `idx_store_goods_cate_is_deleted`(`is_deleted`) USING BTREE,
  247. INDEX `idx_store_goods_cate_status`(`status`) USING BTREE
  248. ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商品-分类';
  249. -- ----------------------------
  250. -- Table structure for store_goods_list
  251. -- ----------------------------
  252. DROP TABLE IF EXISTS `store_goods_list`;
  253. CREATE TABLE `store_goods_list` (
  254. `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  255. `sku` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT 'sku',
  256. `goods_id` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '商品ID',
  257. `goods_spec` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '商品规格',
  258. `price_market` decimal(20, 2) UNSIGNED NULL DEFAULT 0.00 COMMENT '商品标价',
  259. `price_selling` decimal(20, 2) UNSIGNED NULL DEFAULT 0.00 COMMENT '商品售价',
  260. `number_sales` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '销售数量',
  261. `number_stock` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '商品库存',
  262. `number_virtual` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '虚拟销量',
  263. `number_express` bigint(20) UNSIGNED NULL DEFAULT 1 COMMENT '快递数量',
  264. `status` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '商品状态',
  265. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  266. PRIMARY KEY (`id`) USING BTREE,
  267. INDEX `idx_store_goods_list_id`(`goods_id`) USING BTREE,
  268. INDEX `idx_store_goods_list_spec`(`goods_spec`) USING BTREE,
  269. INDEX `idx_store_goods_list_status`(`status`) USING BTREE,
  270. INDEX `idx_store_goods_list_sku`(`sku`) USING BTREE
  271. ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商品-详情';
  272. -- ----------------------------
  273. -- Table structure for store_goods_stock
  274. -- ----------------------------
  275. DROP TABLE IF EXISTS `store_goods_stock`;
  276. CREATE TABLE `store_goods_stock` (
  277. `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  278. `goods_id` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '商品ID',
  279. `goods_spec` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '商品规格',
  280. `number_stock` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '商品库存',
  281. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  282. PRIMARY KEY (`id`) USING BTREE,
  283. INDEX `idx_store_goods_stock_gid`(`goods_id`) USING BTREE,
  284. INDEX `idx_store_goods_stock_spec`(`goods_spec`(191)) USING BTREE
  285. ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商品-入库';
  286. -- ----------------------------
  287. -- Table structure for store_member
  288. -- ----------------------------
  289. DROP TABLE IF EXISTS `store_member`;
  290. CREATE TABLE `store_member` (
  291. `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  292. `openid` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '微信OPENID',
  293. `headimg` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '头像地址',
  294. `nickname` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '微信昵称',
  295. `phone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '联系手机',
  296. `username` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '真实姓名',
  297. `vip_level` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '会员级别(0游客,1为临时,2为VIP1,3为VIP2)',
  298. `vip_date` date NULL DEFAULT NULL COMMENT '保级日期',
  299. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  300. PRIMARY KEY (`id`) USING BTREE,
  301. INDEX `idx_store_member_openid`(`openid`) USING BTREE,
  302. INDEX `idx_store_member_phone`(`phone`) USING BTREE,
  303. INDEX `idx_store_member_vip_level`(`vip_level`) USING BTREE
  304. ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '会员-记录';
  305. -- ----------------------------
  306. -- Table structure for store_member_address
  307. -- ----------------------------
  308. DROP TABLE IF EXISTS `store_member_address`;
  309. CREATE TABLE `store_member_address` (
  310. `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  311. `mid` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '会员ID',
  312. `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '收货姓名',
  313. `phone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '收货手机',
  314. `province` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '地址-省份',
  315. `city` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '地址-城市',
  316. `area` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '地址-区域',
  317. `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '地址-详情',
  318. `is_default` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '默认地址',
  319. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  320. PRIMARY KEY (`id`) USING BTREE,
  321. INDEX `idx_store_member_address_mid`(`mid`) USING BTREE,
  322. INDEX `idx_store_member_address_is_default`(`is_default`) USING BTREE
  323. ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '会员-地址';
  324. -- ----------------------------
  325. -- Table structure for store_member_sms_history
  326. -- ----------------------------
  327. DROP TABLE IF EXISTS `store_member_sms_history`;
  328. CREATE TABLE `store_member_sms_history` (
  329. `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  330. `mid` bigint(20) unsigned DEFAULT '0' COMMENT '会员ID',
  331. `phone` varchar(20) DEFAULT '' COMMENT '目标手机',
  332. `content` varchar(512) DEFAULT '' COMMENT '短信内容',
  333. `region` varchar(100) DEFAULT '' COMMENT '区域编码',
  334. `result` varchar(100) DEFAULT '' COMMENT '返回结果',
  335. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  336. PRIMARY KEY (`id`) USING BTREE,
  337. KEY `idx_store_member_sms_history_phone` (`phone`) USING BTREE,
  338. KEY `idx_store_member_sms_history_mid` (`mid`) USING BTREE
  339. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='会员-短信';
  340. -- ----------------------------
  341. -- Table structure for store_order
  342. -- ----------------------------
  343. DROP TABLE IF EXISTS `store_order`;
  344. CREATE TABLE `store_order` (
  345. `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  346. `mid` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '会员ID',
  347. `order_no` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '订单单号',
  348. `from_mid` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '推荐会员ID',
  349. `price_total` decimal(20, 2) UNSIGNED NULL DEFAULT 0.00 COMMENT '待付金额统计',
  350. `price_goods` decimal(20, 2) UNSIGNED NULL DEFAULT 0.00 COMMENT '商品费用统计',
  351. `price_express` decimal(20, 2) UNSIGNED NULL DEFAULT 0.00 COMMENT '快递费用统计',
  352. `price_rate_amount` decimal(20, 2) UNSIGNED NULL DEFAULT 0.00 COMMENT '返利金额统计',
  353. `pay_state` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '支付状态(0未支付,1已支付)',
  354. `pay_type` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '支付方式',
  355. `pay_price` decimal(20, 2) UNSIGNED NULL DEFAULT 0.00 COMMENT '支付金额',
  356. `pay_no` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '支付单号',
  357. `pay_at` datetime NULL DEFAULT NULL COMMENT '支付时间',
  358. `cancel_state` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '取消状态',
  359. `cancel_at` datetime NULL DEFAULT NULL COMMENT '取消时间',
  360. `cancel_desc` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '取消描述',
  361. `refund_state` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '退款状态(0未退款,1待退款,2已退款)',
  362. `refund_at` datetime NULL DEFAULT NULL COMMENT '退款时间',
  363. `refund_no` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '退款单号',
  364. `refund_price` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '退款金额',
  365. `refund_desc` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '退款描述',
  366. `express_state` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '发货状态(0未发货,1已发货,2已签收)',
  367. `express_company_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '发货快递公司编码',
  368. `express_company_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '发货快递公司名称',
  369. `express_send_no` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '发货单号',
  370. `express_send_at` datetime NULL DEFAULT NULL COMMENT '发货时间',
  371. `express_address_id` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '收货地址ID',
  372. `express_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '收货人姓名',
  373. `express_phone` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '收货人手机',
  374. `express_province` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '收货地址省份',
  375. `express_city` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '收货地址城市',
  376. `express_area` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '收货地址区域',
  377. `express_address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '收货详细地址',
  378. `status` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '订单状态(0已取消,1预订单待补全,2新订单待支付,3已支付待发货,4已发货待签收,5已完成)',
  379. `is_deleted` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '删除状态',
  380. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  381. PRIMARY KEY (`id`) USING BTREE,
  382. INDEX `idx_store_groups_order_mid`(`mid`) USING BTREE,
  383. INDEX `idx_store_groups_order_order_no`(`order_no`) USING BTREE,
  384. INDEX `idx_store_groups_order_pay_state`(`pay_state`) USING BTREE,
  385. INDEX `idx_store_groups_order_cancel_state`(`cancel_state`) USING BTREE,
  386. INDEX `idx_store_groups_order_refund_state`(`refund_state`) USING BTREE,
  387. INDEX `idx_store_groups_order_status`(`status`) USING BTREE,
  388. INDEX `idx_store_groups_order_pay_no`(`pay_no`) USING BTREE
  389. ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '订单-记录';
  390. -- ----------------------------
  391. -- Table structure for store_order_list
  392. -- ----------------------------
  393. DROP TABLE IF EXISTS `store_order_list`;
  394. CREATE TABLE `store_order_list` (
  395. `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  396. `mid` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '会员ID',
  397. `from_id` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '推荐会员',
  398. `order_no` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '订单单号',
  399. `goods_id` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '商品标识',
  400. `goods_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '商品标题',
  401. `goods_logo` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '商品图标',
  402. `goods_spec` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '商品规格',
  403. `price_real` decimal(20, 2) UNSIGNED NULL DEFAULT 0.00 COMMENT '交易金额',
  404. `price_selling` decimal(20, 2) UNSIGNED NULL DEFAULT 0.00 COMMENT '销售价格',
  405. `price_market` decimal(20, 2) UNSIGNED NULL DEFAULT 0.00 COMMENT '市场价格',
  406. `price_express` decimal(20, 2) UNSIGNED NULL DEFAULT 0.00 COMMENT '快递费用',
  407. `price_rate` decimal(20, 4) UNSIGNED NULL DEFAULT 0.0000 COMMENT '分成比例',
  408. `price_rate_amount` decimal(20, 2) UNSIGNED NULL DEFAULT 0.00 COMMENT '分成金额',
  409. `number_goods` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '商品数量',
  410. `number_express` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '快递数量',
  411. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  412. PRIMARY KEY (`id`) USING BTREE,
  413. INDEX `idx_store_goods_list_id`(`goods_id`) USING BTREE,
  414. INDEX `idx_store_goods_list_spec`(`goods_spec`) USING BTREE
  415. ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '订单-详情';
  416. -- ----------------------------
  417. -- Table structure for system_auth
  418. -- ----------------------------
  419. DROP TABLE IF EXISTS `system_auth`;
  420. CREATE TABLE `system_auth` (
  421. `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  422. `title` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '权限名称',
  423. `status` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '权限状态',
  424. `sort` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '排序权重',
  425. `desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '备注说明',
  426. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  427. PRIMARY KEY (`id`) USING BTREE,
  428. INDEX `idx_system_auth_status`(`status`) USING BTREE,
  429. INDEX `idx_system_auth_title`(`title`) USING BTREE
  430. ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统-权限';
  431. -- ----------------------------
  432. -- Table structure for system_auth_node
  433. -- ----------------------------
  434. DROP TABLE IF EXISTS `system_auth_node`;
  435. CREATE TABLE `system_auth_node` (
  436. `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  437. `auth` bigint(20) UNSIGNED NULL DEFAULT NULL COMMENT '角色',
  438. `node` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '节点',
  439. PRIMARY KEY (`id`) USING BTREE,
  440. INDEX `idx_system_auth_auth`(`auth`) USING BTREE,
  441. INDEX `idx_system_auth_node`(`node`(191)) USING BTREE
  442. ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统-权限-授权';
  443. -- ----------------------------
  444. -- Table structure for system_config
  445. -- ----------------------------
  446. DROP TABLE IF EXISTS `system_config`;
  447. CREATE TABLE `system_config` (
  448. `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  449. `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '配置名',
  450. `value` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '配置值',
  451. PRIMARY KEY (`id`) USING BTREE,
  452. INDEX `idx_system_config_name`(`name`) USING BTREE
  453. ) ENGINE = InnoDB AUTO_INCREMENT = 81 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统-配置';
  454. -- ----------------------------
  455. -- Records of system_config
  456. -- ----------------------------
  457. INSERT INTO `system_config` VALUES (1, 'app_name', 'ThinkAdmin');
  458. INSERT INTO `system_config` VALUES (2, 'site_name', 'ThinkAdmin');
  459. INSERT INTO `system_config` VALUES (3, 'app_version', 'dev');
  460. INSERT INTO `system_config` VALUES (4, 'site_copy', '©版权所有 2014-2018 楚才科技');
  461. INSERT INTO `system_config` VALUES (5, 'site_icon', '/upload/decb0fe26fa3f486/b3f6521bf29403c8.png');
  462. INSERT INTO `system_config` VALUES (7, 'miitbeian', '粤ICP备16006642号-2');
  463. INSERT INTO `system_config` VALUES (8, 'storage_type', 'local');
  464. INSERT INTO `system_config` VALUES (9, 'storage_local_exts', 'doc,gif,icon,jpg,mp3,mp4,p12,pem,png,rar');
  465. INSERT INTO `system_config` VALUES (10, 'storage_qiniu_bucket', 'https');
  466. INSERT INTO `system_config` VALUES (11, 'storage_qiniu_domain', '用你自己的吧');
  467. INSERT INTO `system_config` VALUES (12, 'storage_qiniu_access_key', '用你自己的吧');
  468. INSERT INTO `system_config` VALUES (13, 'storage_qiniu_secret_key', '用你自己的吧');
  469. INSERT INTO `system_config` VALUES (14, 'storage_oss_bucket', 'cuci-mytest');
  470. INSERT INTO `system_config` VALUES (15, 'storage_oss_endpoint', 'oss-cn-hangzhou.aliyuncs.com');
  471. INSERT INTO `system_config` VALUES (16, 'storage_oss_domain', '用你自己的吧');
  472. INSERT INTO `system_config` VALUES (17, 'storage_oss_keyid', '用你自己的吧');
  473. INSERT INTO `system_config` VALUES (18, 'storage_oss_secret', '用你自己的吧');
  474. INSERT INTO `system_config` VALUES (36, 'storage_oss_is_https', 'http');
  475. INSERT INTO `system_config` VALUES (43, 'storage_qiniu_region', '华东');
  476. INSERT INTO `system_config` VALUES (44, 'storage_qiniu_is_https', 'https');
  477. INSERT INTO `system_config` VALUES (45, 'wechat_mch_id', '1332187001');
  478. INSERT INTO `system_config` VALUES (46, 'wechat_mch_key', 'A82DC5BD1F3359081049C568D8502BC5');
  479. INSERT INTO `system_config` VALUES (47, 'wechat_mch_ssl_type', 'p12');
  480. INSERT INTO `system_config` VALUES (48, 'wechat_mch_ssl_p12', '65b8e4f56718182d/1bc857ee646aa15d.p12');
  481. INSERT INTO `system_config` VALUES (49, 'wechat_mch_ssl_key', 'cc2e3e1345123930/c407d033294f283d.pem');
  482. INSERT INTO `system_config` VALUES (50, 'wechat_mch_ssl_cer', '966eaf89299e9c95/7014872cc109b29a.pem');
  483. INSERT INTO `system_config` VALUES (51, 'wechat_token', 'mytoken');
  484. INSERT INTO `system_config` VALUES (52, 'wechat_appid', 'wx60a43dd8161666d4');
  485. INSERT INTO `system_config` VALUES (53, 'wechat_appsecret', '9978422e0e431643d4b42868d183d60b');
  486. INSERT INTO `system_config` VALUES (54, 'wechat_encodingaeskey', '');
  487. INSERT INTO `system_config` VALUES (55, 'wechat_push_url', '消息推送地址:http://127.0.0.1:8000/wechat/api.push');
  488. INSERT INTO `system_config` VALUES (56, 'wechat_type', 'thr');
  489. INSERT INTO `system_config` VALUES (57, 'wechat_thr_appid', 'wx60a43dd8161666d4');
  490. INSERT INTO `system_config` VALUES (58, 'wechat_thr_appkey', '5caf4b0727f6e46a7e6ccbe773cc955d');
  491. INSERT INTO `system_config` VALUES (60, 'wechat_thr_appurl', '消息推送地址:http://127.0.0.1:2314/wechat/api.push');
  492. INSERT INTO `system_config` VALUES (61, 'component_appid', 'wx28b58798480874f9');
  493. INSERT INTO `system_config` VALUES (62, 'component_appsecret', '8d0e1ec14ea0adc5027dd0ad82c64bc9');
  494. INSERT INTO `system_config` VALUES (63, 'component_token', 'P8QHTIxpBEq88IrxatqhgpBm2OAQROkI');
  495. INSERT INTO `system_config` VALUES (64, 'component_encodingaeskey', 'L5uFIa0U6KLalPyXckyqoVIJYLhsfrg8k9YzybZIHsx');
  496. INSERT INTO `system_config` VALUES (65, 'system_message_state', '0');
  497. INSERT INTO `system_config` VALUES (66, 'sms_zt_username', '可以找CUCI申请');
  498. INSERT INTO `system_config` VALUES (67, 'sms_zt_password', '可以找CUCI申请');
  499. INSERT INTO `system_config` VALUES (68, 'sms_reg_template', '您的验证码为{code},请在十分钟内完成操作!');
  500. INSERT INTO `system_config` VALUES (69, 'sms_secure', '可以找CUCI申请');
  501. INSERT INTO `system_config` VALUES (70, 'store_title', '测试商城');
  502. INSERT INTO `system_config` VALUES (71, 'store_order_wait_time', '0.50');
  503. INSERT INTO `system_config` VALUES (72, 'store_order_clear_time', '24.00');
  504. INSERT INTO `system_config` VALUES (73, 'store_order_confirm_time', '60.00');
  505. INSERT INTO `system_config` VALUES (74, 'sms_zt_username2', '可以找CUCI申请2');
  506. INSERT INTO `system_config` VALUES (75, 'sms_zt_password2', '可以找CUCI申请2');
  507. INSERT INTO `system_config` VALUES (76, 'sms_secure2', '可以找CUCI申请2');
  508. INSERT INTO `system_config` VALUES (77, 'sms_reg_template2', '您的验证码为{code},请在十分钟内完成操作!2');
  509. INSERT INTO `system_config` VALUES (78, 'michat_appid', '2882303761518074614');
  510. INSERT INTO `system_config` VALUES (79, 'michat_appkey', '5861807470614');
  511. INSERT INTO `system_config` VALUES (80, 'michat_appsecert', 'CP/WUTUgDuyOxgLQ5ztesg==');
  512. -- ----------------------------
  513. -- Table structure for system_data
  514. -- ----------------------------
  515. DROP TABLE IF EXISTS `system_data`;
  516. CREATE TABLE `system_data` (
  517. `id` bigint(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  518. `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '配置名',
  519. `value` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '配置值',
  520. PRIMARY KEY (`id`) USING BTREE,
  521. INDEX `idx_system_data_name`(`name`) USING BTREE
  522. ) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统-数据';
  523. -- ----------------------------
  524. -- Records of system_data
  525. -- ----------------------------
  526. INSERT INTO `system_data` VALUES (1, 'menudata', '[{\"name\":\"请输入名称\",\"type\":\"scancode_push\",\"key\":\"scancode_push\"}]');
  527. -- ----------------------------
  528. -- Table structure for system_log
  529. -- ----------------------------
  530. DROP TABLE IF EXISTS `system_log`;
  531. CREATE TABLE `system_log` (
  532. `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  533. `node` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '当前操作节点',
  534. `geoip` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '操作者IP地址',
  535. `action` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '操作行为名称',
  536. `content` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '操作内容描述',
  537. `username` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '操作人用户名',
  538. `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  539. PRIMARY KEY (`id`) USING BTREE
  540. ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统-日志';
  541. -- ----------------------------
  542. -- Table structure for system_menu
  543. -- ----------------------------
  544. DROP TABLE IF EXISTS `system_menu`;
  545. CREATE TABLE `system_menu` (
  546. `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  547. `pid` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '父ID',
  548. `title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '名称',
  549. `node` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '节点代码',
  550. `icon` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '菜单图标',
  551. `url` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '链接',
  552. `params` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '链接参数',
  553. `target` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '_self' COMMENT '打开方式',
  554. `sort` int(11) UNSIGNED NULL DEFAULT 0 COMMENT '菜单排序',
  555. `status` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '状态(0:禁用,1:启用)',
  556. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  557. PRIMARY KEY (`id`) USING BTREE,
  558. INDEX `idx_system_menu_node`(`node`(191)) USING BTREE,
  559. INDEX `idx_system_menu_status`(`status`) USING BTREE
  560. ) ENGINE = InnoDB AUTO_INCREMENT = 62 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统-菜单';
  561. -- ----------------------------
  562. -- Records of system_menu
  563. -- ----------------------------
  564. INSERT INTO `system_menu` VALUES (1, 0, '后台首页', '', '', 'admin/index/main', '', '_self', 500, 1, '2018-09-05 17:59:38');
  565. INSERT INTO `system_menu` VALUES (2, 0, '系统管理', '', '', '#', '', '_self', 100, 1, '2018-09-05 18:04:52');
  566. INSERT INTO `system_menu` VALUES (3, 4, '系统菜单管理', '', 'layui-icon layui-icon-layouts', 'admin/menu/index', '', '_self', 1, 1, '2018-09-05 18:05:26');
  567. INSERT INTO `system_menu` VALUES (4, 2, '系统配置', '', '', '#', '', '_self', 20, 1, '2018-09-05 18:07:17');
  568. INSERT INTO `system_menu` VALUES (5, 12, '系统用户管理', '', 'layui-icon layui-icon-username', 'admin/user/index', '', '_self', 1, 1, '2018-09-06 11:10:42');
  569. INSERT INTO `system_menu` VALUES (7, 12, '访问权限管理', '', 'layui-icon layui-icon-vercode', 'admin/auth/index', '', '_self', 2, 1, '2018-09-06 15:17:14');
  570. INSERT INTO `system_menu` VALUES (11, 4, '系统参数配置', '', 'layui-icon layui-icon-set', 'admin/config/info', '', '_self', 4, 1, '2018-09-06 16:43:47');
  571. INSERT INTO `system_menu` VALUES (12, 2, '权限管理', '', '', '#', '', '_self', 10, 1, '2018-09-06 18:01:31');
  572. INSERT INTO `system_menu` VALUES (13, 0, '商城管理', '', '', '#', '', '_self', 400, 1, '2018-10-12 13:56:29');
  573. INSERT INTO `system_menu` VALUES (14, 48, '商品信息管理', '', 'layui-icon layui-icon-component', 'store/goods/index', '', '_self', 3, 1, '2018-10-12 13:56:48');
  574. INSERT INTO `system_menu` VALUES (16, 0, '微信管理', '', '', '#', '', '_self', 300, 1, '2018-10-31 15:15:27');
  575. INSERT INTO `system_menu` VALUES (17, 16, '微信管理', '', '', '#', '', '_self', 20, 1, '2018-10-31 15:16:46');
  576. INSERT INTO `system_menu` VALUES (18, 17, '微信授权配置', '', 'layui-icon layui-icon-set', 'wechat/config/options', '', '_self', 2, 1, '2018-10-31 15:17:11');
  577. INSERT INTO `system_menu` VALUES (19, 17, '微信支付配置', '', 'layui-icon layui-icon-rmb', 'wechat/config/payment', '', '_self', 1, 1, '2018-10-31 18:28:09');
  578. INSERT INTO `system_menu` VALUES (20, 16, '微信定制', '', '', '#', '', '_self', 10, 1, '2018-11-13 11:46:27');
  579. INSERT INTO `system_menu` VALUES (21, 20, '图文素材管理', '', 'layui-icon layui-icon-template', 'wechat/news/index', '', '_self', 6, 1, '2018-11-13 11:46:55');
  580. INSERT INTO `system_menu` VALUES (22, 20, '粉丝信息管理', '', 'layui-icon layui-icon-user', 'wechat/fans/index', '', '_self', 5, 1, '2018-11-15 09:51:13');
  581. INSERT INTO `system_menu` VALUES (23, 20, '回复规则管理', '', 'layui-icon layui-icon-engine', 'wechat/keys/index', '', '_self', 4, 1, '2018-11-22 11:29:08');
  582. INSERT INTO `system_menu` VALUES (24, 20, '关注回复配置', '', 'layui-icon layui-icon-senior', 'wechat/keys/subscribe', '', '_self', 3, 1, '2018-11-27 11:45:28');
  583. INSERT INTO `system_menu` VALUES (25, 20, '默认回复配置', '', 'layui-icon layui-icon-survey', 'wechat/keys/defaults', '', '_self', 2, 1, '2018-11-27 11:45:58');
  584. INSERT INTO `system_menu` VALUES (26, 20, '微信菜单管理', '', 'layui-icon layui-icon-cellphone', 'wechat/menu/index', '', '_self', 1, 1, '2018-11-27 17:56:56');
  585. INSERT INTO `system_menu` VALUES (27, 4, '系统任务管理', '', 'layui-icon layui-icon-log', 'admin/queue/index', '', '_self', 3, 1, '2018-11-29 11:13:34');
  586. INSERT INTO `system_menu` VALUES (37, 0, '开放平台', '', '', '#', '', '_self', 200, 1, '2018-12-28 13:29:25');
  587. INSERT INTO `system_menu` VALUES (38, 40, '开放平台配置', '', 'layui-icon layui-icon-set', 'service/config/index', '', '_self', 0, 1, '2018-12-28 13:29:44');
  588. INSERT INTO `system_menu` VALUES (39, 40, '公众授权管理', '', 'layui-icon layui-icon-template-1', 'service/index/index', '', '_self', 0, 1, '2018-12-28 13:30:07');
  589. INSERT INTO `system_menu` VALUES (40, 37, '平台管理', '', '', '#', '', '_self', 0, 1, '2018-12-28 16:05:46');
  590. INSERT INTO `system_menu` VALUES (42, 48, '会员信息管理', '', 'layui-icon layui-icon-user', 'store/member/index', '', '_self', 1, 1, '2019-01-22 14:24:23');
  591. INSERT INTO `system_menu` VALUES (43, 48, '订单记录管理', '', 'layui-icon layui-icon-template-1', 'store/finance/index', '', '_self', 2, 1, '2019-01-22 14:46:22');
  592. INSERT INTO `system_menu` VALUES (44, 48, '商品分类管理', '', 'layui-icon layui-icon-app', 'store/goods_cate/index', '', '_self', 4, 1, '2019-01-23 10:41:06');
  593. INSERT INTO `system_menu` VALUES (45, 47, '商城参数配置', '', 'layui-icon layui-icon-set', 'store/config/index', '', '_self', 5, 1, '2019-01-24 16:47:33');
  594. INSERT INTO `system_menu` VALUES (46, 47, '短信发送记录', '', 'layui-icon layui-icon-console', 'store/message/index', '', '_self', 4, 1, '2019-01-24 18:09:58');
  595. INSERT INTO `system_menu` VALUES (47, 13, '商城配置', '', '', '#', '', '_self', 20, 1, '2019-01-25 16:47:49');
  596. INSERT INTO `system_menu` VALUES (48, 13, '数据管理', '', '', '#', '', '_self', 10, 1, '2019-01-25 16:48:35');
  597. INSERT INTO `system_menu` VALUES (49, 4, '系统日志管理', '', 'layui-icon layui-icon-form', 'admin/oplog/index', '', '_self', 2, 1, '2019-02-18 12:56:56');
  598. INSERT INTO `system_menu` VALUES (50, 47, '快递公司管理', '', 'layui-icon layui-icon-form', 'store/express_company/index', '', '_self', 3, 1, '2019-04-01 17:10:59');
  599. INSERT INTO `system_menu` VALUES (52, 47, '邮费模板管理', '', 'layui-icon layui-icon-fonts-clear', 'store/express_template/index', '', '_self', 1, 1, '2019-04-23 13:17:10');
  600. INSERT INTO `system_menu` VALUES (55, 17, '微信数据统计', '', 'layui-icon layui-icon-chart-screen', 'wechat/index/index', '', '_self', 3, 1, '2019-06-15 15:03:51');
  601. INSERT INTO `system_menu` VALUES (56, 40, '微信粉丝管理', '', 'layui-icon layui-icon-username', 'service/fans/index', '', '_self', 0, 1, '2019-07-23 09:57:24');
  602. INSERT INTO `system_menu` VALUES (57, 0, '企业管理', '', '', '#', '', '_self', 150, 1, '2019-08-08 17:20:29');
  603. INSERT INTO `system_menu` VALUES (58, 57, '基础管理', '', '', '#', '', '_self', 0, 1, '2019-08-08 17:20:42');
  604. INSERT INTO `system_menu` VALUES (59, 58, '企业员工管理', '', 'layui-icon layui-icon-username', 'company/user/index', '', '_self', 0, 1, '2019-08-08 17:20:59');
  605. INSERT INTO `system_menu` VALUES (60, 58, '仓库权限管理', '', 'layui-icon layui-icon-template-1', 'company/auth/index', '', '_self', 0, 1, '2019-08-08 18:39:37');
  606. INSERT INTO `system_menu` VALUES (61, 58, '网络打卡管理', '', 'layui-icon layui-icon-engine', 'company/clock/index', '', '_self', 0, 1, '2019-08-09 14:44:23');
  607. -- ----------------------------
  608. -- Table structure for system_queue
  609. -- ----------------------------
  610. DROP TABLE IF EXISTS `system_queue`;
  611. CREATE TABLE `system_queue` (
  612. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  613. `title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '任务名称',
  614. `data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '执行参数',
  615. `status` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '任务状态(1新任务,2处理中,3成功,4失败)',
  616. `preload` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '执行内容',
  617. `time` bigint(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT '执行时间',
  618. `double` tinyint(1) NULL DEFAULT 1 COMMENT '单例模式',
  619. `desc` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '状态描述',
  620. `start_at` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '开始时间',
  621. `end_at` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '结束时间',
  622. `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  623. PRIMARY KEY (`id`) USING BTREE,
  624. INDEX `idx_system_queue_double`(`double`) USING BTREE,
  625. INDEX `idx_system_queue_time`(`time`) USING BTREE,
  626. INDEX `idx_system_queue_title`(`title`) USING BTREE,
  627. INDEX `idx_system_queue_create_at`(`create_at`) USING BTREE
  628. ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统-任务';
  629. -- ----------------------------
  630. -- Table structure for system_user
  631. -- ----------------------------
  632. DROP TABLE IF EXISTS `system_user`;
  633. CREATE TABLE `system_user` (
  634. `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  635. `username` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户账号',
  636. `password` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户密码',
  637. `qq` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '联系QQ',
  638. `mail` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '联系邮箱',
  639. `phone` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '联系手机',
  640. `login_at` datetime NULL DEFAULT NULL COMMENT '登录时间',
  641. `login_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '登录IP',
  642. `login_num` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '登录次数',
  643. `authorize` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '权限授权',
  644. `tags` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户标签',
  645. `desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '备注说明',
  646. `status` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '状态(0禁用,1启用)',
  647. `is_deleted` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '删除(1删除,0未删)',
  648. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  649. PRIMARY KEY (`id`) USING BTREE,
  650. INDEX `idx_system_user_username`(`username`) USING BTREE,
  651. INDEX `idx_system_user_status`(`status`) USING BTREE,
  652. INDEX `idx_system_user_deleted`(`is_deleted`) USING BTREE
  653. ) ENGINE = InnoDB AUTO_INCREMENT = 10001 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统-用户';
  654. -- ----------------------------
  655. -- Records of system_user
  656. -- ----------------------------
  657. INSERT INTO `system_user` VALUES (10000, 'admin', '21232f297a57a5a743894a0e4a801fc3', '22222222', '', '', '2019-08-18 18:34:14', '127.0.0.1', 661, '', '', '', 1, 0, '2015-11-13 15:14:22');
  658. -- ----------------------------
  659. -- Table structure for wechat_fans
  660. -- ----------------------------
  661. DROP TABLE IF EXISTS `wechat_fans`;
  662. CREATE TABLE `wechat_fans` (
  663. `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  664. `appid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '公众号APPID',
  665. `unionid` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '粉丝unionid',
  666. `openid` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '粉丝openid',
  667. `tagid_list` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '粉丝标签id',
  668. `is_black` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '是否为黑名单状态',
  669. `subscribe` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '关注状态(0未关注,1已关注)',
  670. `nickname` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户昵称',
  671. `sex` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT '用户性别(1男性,2女性,0未知)',
  672. `country` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户所在国家',
  673. `province` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户所在省份',
  674. `city` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户所在城市',
  675. `language` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户的语言(zh_CN)',
  676. `headimgurl` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户头像',
  677. `subscribe_time` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '关注时间',
  678. `subscribe_at` datetime NULL DEFAULT NULL COMMENT '关注时间',
  679. `remark` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '备注',
  680. `subscribe_scene` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '扫码关注场景',
  681. `qr_scene` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '二维码场景值',
  682. `qr_scene_str` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '二维码场景内容',
  683. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  684. PRIMARY KEY (`id`) USING BTREE,
  685. INDEX `idx_wechat_fans_openid`(`openid`) USING BTREE,
  686. INDEX `idx_wechat_fans_unionid`(`unionid`) USING BTREE,
  687. INDEX `idx_wechat_fans_is_back`(`is_black`) USING BTREE,
  688. INDEX `idx_wechat_fans_subscribe`(`subscribe`) USING BTREE
  689. ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '微信-粉丝';
  690. -- ----------------------------
  691. -- Table structure for wechat_fans_tags
  692. -- ----------------------------
  693. DROP TABLE IF EXISTS `wechat_fans_tags`;
  694. CREATE TABLE `wechat_fans_tags` (
  695. `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '标签ID',
  696. `appid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '公众号APPID',
  697. `name` varchar(35) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签名称',
  698. `count` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '总数',
  699. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  700. INDEX `idx_wechat_fans_tags_id`(`id`) USING BTREE,
  701. INDEX `idx_wechat_fans_tags_appid`(`appid`) USING BTREE
  702. ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '微信-粉丝-标签';
  703. -- ----------------------------
  704. -- Table structure for wechat_keys
  705. -- ----------------------------
  706. DROP TABLE IF EXISTS `wechat_keys`;
  707. CREATE TABLE `wechat_keys` (
  708. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  709. `appid` char(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '公众号APPID',
  710. `type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '类型(text,image,news)',
  711. `keys` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '关键字',
  712. `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '文本内容',
  713. `image_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '图片链接',
  714. `voice_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '语音链接',
  715. `music_title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '音乐标题',
  716. `music_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '音乐链接',
  717. `music_image` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '缩略图片',
  718. `music_desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '音乐描述',
  719. `video_title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '视频标题',
  720. `video_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '视频URL',
  721. `video_desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '视频描述',
  722. `news_id` bigint(20) UNSIGNED NULL DEFAULT NULL COMMENT '图文ID',
  723. `sort` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '排序字段',
  724. `status` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '状态(0禁用,1启用)',
  725. `create_by` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '创建人',
  726. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
  727. PRIMARY KEY (`id`) USING BTREE,
  728. INDEX `idx_wechat_keys_appid`(`appid`) USING BTREE,
  729. INDEX `idx_wechat_keys_type`(`type`) USING BTREE,
  730. INDEX `idx_wechat_keys_keys`(`keys`) USING BTREE
  731. ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '微信-关键字';
  732. -- ----------------------------
  733. -- Table structure for wechat_media
  734. -- ----------------------------
  735. DROP TABLE IF EXISTS `wechat_media`;
  736. CREATE TABLE `wechat_media` (
  737. `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  738. `appid` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '公众号ID',
  739. `md5` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '文件md5',
  740. `type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '媒体类型',
  741. `media_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '永久素材MediaID',
  742. `local_url` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '本地文件链接',
  743. `media_url` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '远程图片链接',
  744. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  745. PRIMARY KEY (`id`) USING BTREE,
  746. INDEX `idx_wechat_media_appid`(`appid`) USING BTREE,
  747. INDEX `idx_wechat_media_md5`(`md5`) USING BTREE,
  748. INDEX `idx_wechat_media_type`(`type`) USING BTREE,
  749. INDEX `idx_wechat_media_media_id`(`media_id`) USING BTREE
  750. ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '微信-素材';
  751. -- ----------------------------
  752. -- Table structure for wechat_news
  753. -- ----------------------------
  754. DROP TABLE IF EXISTS `wechat_news`;
  755. CREATE TABLE `wechat_news` (
  756. `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  757. `media_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '永久素材MediaID',
  758. `local_url` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '永久素材显示URL',
  759. `article_id` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '关联图文ID(用英文逗号做分割)',
  760. `is_deleted` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '是否删除',
  761. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  762. `create_by` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
  763. PRIMARY KEY (`id`) USING BTREE,
  764. INDEX `idx_wechat_news_artcle_id`(`article_id`) USING BTREE,
  765. INDEX `idx_wechat_news_media_id`(`media_id`) USING BTREE
  766. ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '微信-图文';
  767. -- ----------------------------
  768. -- Table structure for wechat_news_article
  769. -- ----------------------------
  770. DROP TABLE IF EXISTS `wechat_news_article`;
  771. CREATE TABLE `wechat_news_article` (
  772. `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  773. `title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '素材标题',
  774. `local_url` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '永久素材显示URL',
  775. `show_cover_pic` tinyint(4) UNSIGNED NULL DEFAULT 0 COMMENT '显示封面(0不显示,1显示)',
  776. `author` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '文章作者',
  777. `digest` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '摘要内容',
  778. `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '图文内容',
  779. `content_source_url` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '原文地址',
  780. `read_num` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '阅读数量',
  781. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  782. PRIMARY KEY (`id`) USING BTREE
  783. ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '微信-图文-文章';
  784. -- ----------------------------
  785. -- Table structure for wechat_service_config
  786. -- ----------------------------
  787. DROP TABLE IF EXISTS `wechat_service_config`;
  788. CREATE TABLE `wechat_service_config` (
  789. `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  790. `authorizer_appid` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '公众号APPID',
  791. `authorizer_access_token` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '公众号授权Token',
  792. `authorizer_refresh_token` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '公众号刷新Token',
  793. `func_info` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '公众号集权',
  794. `nick_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '公众号昵称',
  795. `head_img` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '公众号头像',
  796. `expires_in` bigint(20) NULL DEFAULT NULL COMMENT 'Token有效时间',
  797. `service_type` tinyint(2) NULL DEFAULT NULL COMMENT '微信类型(0代表订阅号,2代表服务号,3代表小程序)',
  798. `service_type_info` tinyint(2) NULL DEFAULT NULL COMMENT '公众号实际类型',
  799. `verify_type` tinyint(2) NULL DEFAULT NULL COMMENT '公众号认证类型(-1代表未认证, 0代表微信认证)',
  800. `verify_type_info` tinyint(2) NULL DEFAULT NULL COMMENT '公众号实际认证类型',
  801. `user_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '众众号原始账号',
  802. `alias` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '公众号别名',
  803. `qrcode_url` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '公众号二维码',
  804. `business_info` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '',
  805. `principal_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '公司名称',
  806. `miniprograminfo` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '小程序JSON',
  807. `idc` tinyint(1) UNSIGNED NULL DEFAULT NULL,
  808. `signature` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '小程序的描述',
  809. `total` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '统计调用次数',
  810. `appkey` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '应用接口KEY',
  811. `appuri` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '应用接口URI',
  812. `status` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '状态(1正常授权,0取消授权)',
  813. `is_deleted` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '删除状态(0未删除,1已删除)',
  814. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  815. PRIMARY KEY (`id`) USING BTREE,
  816. UNIQUE INDEX `idx_wechat_service_config_authorizer_appid`(`authorizer_appid`) USING BTREE,
  817. INDEX `idx_wechat_service_config_status`(`status`) USING BTREE,
  818. INDEX `idx_wechat_service_config_is_deleted`(`is_deleted`) USING BTREE
  819. ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '微信-授权';
  820. SET FOREIGN_KEY_CHECKS = 1;