SQL01-数据表结构.sql 77 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101
  1. /*
  2. Navicat Premium Data Transfer
  3. Source Server : thinkadmin.top.tencent
  4. Source Server Type : MySQL
  5. Source Server Version : 50562
  6. Source Host : 127.0.0.1:3306
  7. Source Schema : admin_v6
  8. Target Server Type : MySQL
  9. Target Server Version : 50562
  10. File Encoding : 65001
  11. Date: 19/09/2022 10:24:11
  12. */
  13. SET NAMES utf8mb4;
  14. SET FOREIGN_KEY_CHECKS = 0;
  15. -- ----------------------------
  16. -- Table structure for base_postage_company
  17. -- ----------------------------
  18. DROP TABLE IF EXISTS `base_postage_company`;
  19. CREATE TABLE `base_postage_company` (
  20. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  21. `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '快递公司名称',
  22. `code_1` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '快递公司代码',
  23. `code_2` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '百度快递100代码',
  24. `code_3` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '官方快递100代码',
  25. `remark` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '快递公司描述',
  26. `sort` bigint(20) NULL DEFAULT 0 COMMENT '排序权重',
  27. `status` tinyint(1) NULL DEFAULT 1 COMMENT '状态(0.无效,1.有效)',
  28. `deleted` tinyint(1) NULL DEFAULT 0 COMMENT '删除状态(1已删除,0未删除)',
  29. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  30. PRIMARY KEY (`id`) USING BTREE,
  31. INDEX `idx_base_postage_company_code1`(`code_1`) USING BTREE,
  32. INDEX `idx_base_postage_company_code2`(`code_2`) USING BTREE,
  33. INDEX `idx_base_postage_company_code3`(`code_3`) USING BTREE,
  34. INDEX `idx_base_postage_company_status`(`status`) USING BTREE,
  35. INDEX `idx_base_postage_company_deleted`(`deleted`) USING BTREE
  36. ) ENGINE = InnoDB AUTO_INCREMENT = 125 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据-快递-公司' ROW_FORMAT = DYNAMIC;
  37. -- ----------------------------
  38. -- Table structure for base_postage_region
  39. -- ----------------------------
  40. DROP TABLE IF EXISTS `base_postage_region`;
  41. CREATE TABLE `base_postage_region` (
  42. `id` bigint(20) NOT NULL DEFAULT 0 COMMENT 'ID',
  43. `pid` bigint(20) NULL DEFAULT NULL COMMENT '上级PID',
  44. `first` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '首字母',
  45. `short` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '区域简称',
  46. `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '区域名称',
  47. `level` tinyint(4) NULL DEFAULT 0 COMMENT '区域层级',
  48. `pinyin` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '区域拼音',
  49. `code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '区域邮编',
  50. `status` tinyint(1) NULL DEFAULT 1 COMMENT '使用状态',
  51. `lng` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '所在经度',
  52. `lat` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '所在纬度',
  53. PRIMARY KEY (`id`) USING BTREE,
  54. INDEX `idx_base_postage_region_pid`(`pid`) USING BTREE,
  55. INDEX `idx_base_postage_region_name`(`name`) USING BTREE
  56. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据-快递-区域' ROW_FORMAT = COMPACT;
  57. -- ----------------------------
  58. -- Table structure for base_postage_template
  59. -- ----------------------------
  60. DROP TABLE IF EXISTS `base_postage_template`;
  61. CREATE TABLE `base_postage_template` (
  62. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  63. `code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '模板编号',
  64. `name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '模板名称',
  65. `normal` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '默认规则',
  66. `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '模板规则',
  67. `sort` bigint(20) NULL DEFAULT 0 COMMENT '排序权重',
  68. `status` tinyint(1) NULL DEFAULT 1 COMMENT '模板状态',
  69. `deleted` tinyint(1) NULL DEFAULT 0 COMMENT '删除状态',
  70. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  71. PRIMARY KEY (`id`) USING BTREE,
  72. INDEX `idx_base_postage_template_code`(`code`) USING BTREE,
  73. INDEX `idx_base_postage_template_status`(`status`) USING BTREE,
  74. INDEX `idx_base_postage_template_deleted`(`deleted`) USING BTREE
  75. ) ENGINE = InnoDB AUTO_INCREMENT = 63 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据-快递-模板' ROW_FORMAT = DYNAMIC;
  76. -- ----------------------------
  77. -- Table structure for base_user_discount
  78. -- ----------------------------
  79. DROP TABLE IF EXISTS `base_user_discount`;
  80. CREATE TABLE `base_user_discount` (
  81. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  82. `name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '方案名称',
  83. `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '方案规则',
  84. `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '方案描述',
  85. `sort` bigint(20) NULL DEFAULT 0 COMMENT '排序权重',
  86. `status` tinyint(1) NULL DEFAULT 1 COMMENT '方案状态(1使用,0禁用)',
  87. `deleted` tinyint(1) NULL DEFAULT 0 COMMENT '删除状态',
  88. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  89. PRIMARY KEY (`id`) USING BTREE,
  90. INDEX `idx_base_user_discount_status`(`status`) USING BTREE,
  91. INDEX `idx_base_user_discount_deleted`(`deleted`) USING BTREE
  92. ) ENGINE = InnoDB AUTO_INCREMENT = 64 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据-基础-折扣' ROW_FORMAT = DYNAMIC;
  93. -- ----------------------------
  94. -- Table structure for base_user_message
  95. -- ----------------------------
  96. DROP TABLE IF EXISTS `base_user_message`;
  97. CREATE TABLE `base_user_message` (
  98. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  99. `type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '消息类型',
  100. `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '消息名称',
  101. `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '消息内容',
  102. `num_read` bigint(20) NULL DEFAULT 0 COMMENT '阅读次数',
  103. `sort` bigint(20) NULL DEFAULT 0 COMMENT '排序权重',
  104. `status` tinyint(1) NULL DEFAULT 1 COMMENT '消息状态(1使用,0禁用)',
  105. `deleted` tinyint(1) NULL DEFAULT 0 COMMENT '删除状态',
  106. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  107. PRIMARY KEY (`id`) USING BTREE,
  108. INDEX `idx_base_user_message_type`(`type`) USING BTREE,
  109. INDEX `idx_base_user_message_status`(`status`) USING BTREE,
  110. INDEX `idx_base_user_message_deleted`(`deleted`) USING BTREE
  111. ) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据-基础-通知' ROW_FORMAT = DYNAMIC;
  112. -- ----------------------------
  113. -- Table structure for base_user_payment
  114. -- ----------------------------
  115. DROP TABLE IF EXISTS `base_user_payment`;
  116. CREATE TABLE `base_user_payment` (
  117. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  118. `type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '支付类型',
  119. `code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '通道编号',
  120. `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '支付名称',
  121. `cover` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '支付图标',
  122. `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '支付参数',
  123. `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '支付说明',
  124. `sort` bigint(20) NULL DEFAULT 0 COMMENT '排序权重',
  125. `status` tinyint(1) NULL DEFAULT 1 COMMENT '支付状态(1使用,0禁用)',
  126. `deleted` tinyint(1) NULL DEFAULT 0 COMMENT '删除状态',
  127. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  128. PRIMARY KEY (`id`) USING BTREE,
  129. INDEX `idx_base_user_payment_type`(`type`) USING BTREE,
  130. INDEX `idx_base_user_payment_code`(`code`) USING BTREE,
  131. INDEX `idx_base_user_payment_status`(`status`) USING BTREE,
  132. INDEX `idx_base_user_payment_deleted`(`deleted`) USING BTREE
  133. ) ENGINE = InnoDB AUTO_INCREMENT = 54 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据-基础-支付' ROW_FORMAT = DYNAMIC;
  134. -- ----------------------------
  135. -- Table structure for base_user_upgrade
  136. -- ----------------------------
  137. DROP TABLE IF EXISTS `base_user_upgrade`;
  138. CREATE TABLE `base_user_upgrade` (
  139. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  140. `name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户级别名称',
  141. `number` tinyint(2) NULL DEFAULT 0 COMMENT '用户级别序号',
  142. `rebate_rule` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户奖利规则',
  143. `upgrade_type` tinyint(1) NULL DEFAULT 0 COMMENT '会员升级规则(0单个,1同时)',
  144. `upgrade_team` tinyint(1) NULL DEFAULT 1 COMMENT '团队人数统计(0不计,1累计)',
  145. `goods_vip_status` tinyint(1) NULL DEFAULT 0 COMMENT '入会礼包状态',
  146. `order_amount_status` tinyint(1) NULL DEFAULT 0 COMMENT '订单金额状态',
  147. `order_amount_number` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '订单金额累计',
  148. `teams_users_status` tinyint(1) NULL DEFAULT 0 COMMENT '团队人数状态',
  149. `teams_users_number` bigint(20) NULL DEFAULT 0 COMMENT '团队人数累计',
  150. `teams_direct_status` tinyint(1) NULL DEFAULT 0 COMMENT '直推人数状态',
  151. `teams_direct_number` bigint(20) NULL DEFAULT 0 COMMENT '直推人数累计',
  152. `teams_indirect_status` tinyint(1) NULL DEFAULT 0 COMMENT '间推人数状态',
  153. `teams_indirect_number` bigint(20) NULL DEFAULT 0 COMMENT '间推人数累计',
  154. `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户级别描述',
  155. `utime` bigint(20) NULL DEFAULT 0 COMMENT '等级更新时间',
  156. `status` tinyint(1) NULL DEFAULT 1 COMMENT '用户等级状态(1使用,0禁用)',
  157. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '等级创建时间',
  158. PRIMARY KEY (`id`) USING BTREE,
  159. INDEX `idx_base_user_upgrade_status`(`status`) USING BTREE,
  160. INDEX `idx_base_user_upgrade_number`(`number`) USING BTREE
  161. ) ENGINE = InnoDB AUTO_INCREMENT = 93 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据-用户-等级' ROW_FORMAT = DYNAMIC;
  162. -- ----------------------------
  163. -- Table structure for data_news_item
  164. -- ----------------------------
  165. DROP TABLE IF EXISTS `data_news_item`;
  166. CREATE TABLE `data_news_item` (
  167. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  168. `code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '文章编号',
  169. `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '文章标题',
  170. `mark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '文章标签',
  171. `cover` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '文章封面',
  172. `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '备注说明',
  173. `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '文章内容',
  174. `num_like` bigint(20) NULL DEFAULT 0 COMMENT '文章点赞数',
  175. `num_read` bigint(20) NULL DEFAULT 0 COMMENT '文章阅读数',
  176. `num_collect` bigint(20) NULL DEFAULT 0 COMMENT '文章收藏数',
  177. `num_comment` bigint(20) NULL DEFAULT 0 COMMENT '文章评论数',
  178. `sort` bigint(20) NULL DEFAULT 0 COMMENT '排序权重',
  179. `status` tinyint(1) NULL DEFAULT 1 COMMENT '文章状态(1使用,0禁用)',
  180. `deleted` tinyint(1) NULL DEFAULT 0 COMMENT '删除状态(0未删,1已删)',
  181. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  182. PRIMARY KEY (`id`) USING BTREE,
  183. INDEX `idx_data_news_item_code`(`code`) USING BTREE,
  184. INDEX `idx_data_news_item_status`(`status`) USING BTREE,
  185. INDEX `idx_data_news_item_deleted`(`deleted`) USING BTREE
  186. ) ENGINE = InnoDB AUTO_INCREMENT = 181 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据-文章-内容' ROW_FORMAT = DYNAMIC;
  187. -- ----------------------------
  188. -- Table structure for data_news_mark
  189. -- ----------------------------
  190. DROP TABLE IF EXISTS `data_news_mark`;
  191. CREATE TABLE `data_news_mark` (
  192. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  193. `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '标签名称',
  194. `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '标签说明',
  195. `sort` bigint(20) NULL DEFAULT 0 COMMENT '排序权重',
  196. `status` tinyint(1) NULL DEFAULT 1 COMMENT '标签状态(1使用,0禁用)',
  197. `deleted` tinyint(1) NULL DEFAULT 0 COMMENT '删除状态',
  198. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  199. PRIMARY KEY (`id`) USING BTREE,
  200. INDEX `idx_data_news_mark_status`(`status`) USING BTREE,
  201. INDEX `idx_data_news_mark_deleted`(`deleted`) USING BTREE
  202. ) ENGINE = InnoDB AUTO_INCREMENT = 63 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据-文章-标签' ROW_FORMAT = DYNAMIC;
  203. -- ----------------------------
  204. -- Table structure for data_news_x_collect
  205. -- ----------------------------
  206. DROP TABLE IF EXISTS `data_news_x_collect`;
  207. CREATE TABLE `data_news_x_collect` (
  208. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  209. `uuid` bigint(20) NULL DEFAULT 0 COMMENT '用户UID',
  210. `type` tinyint(1) NULL DEFAULT 1 COMMENT '记录类型(1收藏,2点赞,3历史,4评论)',
  211. `code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '文章编号',
  212. `reply` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '评论内容',
  213. `status` tinyint(1) NULL DEFAULT 1 COMMENT '记录状态(0无效,1待审核,2已审核)',
  214. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  215. PRIMARY KEY (`id`) USING BTREE,
  216. INDEX `idx_data_news_x_collect_type`(`type`) USING BTREE,
  217. INDEX `idx_data_news_x_collect_code`(`code`) USING BTREE,
  218. INDEX `idx_data_news_x_collect_status`(`status`) USING BTREE,
  219. INDEX `idx_data_news_x_collect_uuid`(`uuid`) USING BTREE
  220. ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据-文章-标记' ROW_FORMAT = DYNAMIC;
  221. -- ----------------------------
  222. -- Table structure for data_user
  223. -- ----------------------------
  224. DROP TABLE IF EXISTS `data_user`;
  225. CREATE TABLE `data_user` (
  226. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  227. `pid0` bigint(20) NULL DEFAULT 0 COMMENT '临时推荐人UID',
  228. `pid1` bigint(20) NULL DEFAULT 0 COMMENT '推荐人一级UID',
  229. `pid2` bigint(20) NULL DEFAULT 0 COMMENT '推荐人二级UID',
  230. `pids` tinyint(1) NULL DEFAULT 0 COMMENT '推荐人绑定状态',
  231. `path` varchar(999) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '-' COMMENT '推荐关系路径',
  232. `layer` bigint(20) NULL DEFAULT 1 COMMENT '推荐关系层级',
  233. `openid1` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '小程序OPENID',
  234. `openid2` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '服务号OPENID',
  235. `unionid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '公众号UnionID',
  236. `phone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户手机',
  237. `headimg` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户头像',
  238. `username` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户姓名',
  239. `nickname` varchar(99) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户昵称',
  240. `password` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '登录密码',
  241. `region_province` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '所在省份',
  242. `region_city` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '所在城市',
  243. `region_area` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '所在区域',
  244. `base_age` bigint(20) NULL DEFAULT 0 COMMENT '用户年龄',
  245. `base_sex` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户性别',
  246. `base_height` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户身高',
  247. `base_weight` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户体重',
  248. `base_birthday` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户生日',
  249. `vip_code` bigint(20) NULL DEFAULT 0 COMMENT 'VIP等级编号',
  250. `vip_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '普通用户' COMMENT 'VIP等级名称',
  251. `vip_order` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT 'VIP升级订单',
  252. `vip_datetime` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT 'VIP等级时间',
  253. `buy_vip_entry` tinyint(1) NULL DEFAULT 0 COMMENT '是否入会礼包',
  254. `buy_last_date` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '最后支付时间',
  255. `rebate_total` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '返利金额统计',
  256. `rebate_used` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '返利提现统计',
  257. `rebate_lock` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '返利锁定统计',
  258. `balance_total` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '累计充值统计',
  259. `balance_used` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '已经使用统计',
  260. `teams_users_total` bigint(20) NULL DEFAULT 0 COMMENT '团队人数统计',
  261. `teams_users_direct` bigint(20) NULL DEFAULT 0 COMMENT '直属人数团队',
  262. `teams_users_indirect` bigint(20) NULL DEFAULT 0 COMMENT '间接人数团队',
  263. `order_amount_total` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '订单交易统计',
  264. `teams_amount_total` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '二级团队业绩',
  265. `teams_amount_direct` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '直属团队业绩',
  266. `teams_amount_indirect` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '间接团队业绩',
  267. `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户备注描述',
  268. `status` tinyint(1) NULL DEFAULT 1 COMMENT '用户状态(1正常,0已黑)',
  269. `deleted` tinyint(1) NULL DEFAULT 0 COMMENT '删除状态(0未删,1已删)',
  270. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '注册时间',
  271. PRIMARY KEY (`id`) USING BTREE,
  272. INDEX `idx_data_user_status`(`status`) USING BTREE,
  273. INDEX `idx_data_user_deleted`(`deleted`) USING BTREE,
  274. INDEX `idx_data_user_openid1`(`openid1`) USING BTREE,
  275. INDEX `idx_data_user_openid2`(`openid2`) USING BTREE,
  276. INDEX `idx_data_user_unionid`(`unionid`) USING BTREE,
  277. INDEX `idx_data_user_pid1`(`pid1`) USING BTREE,
  278. INDEX `idx_data_user_pid2`(`pid2`) USING BTREE,
  279. INDEX `idx_data_user_pid0`(`pid0`) USING BTREE,
  280. INDEX `idx_data_user_pids`(`pids`) USING BTREE
  281. ) ENGINE = InnoDB AUTO_INCREMENT = 40 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据-用户-会员' ROW_FORMAT = DYNAMIC;
  282. -- ----------------------------
  283. -- Table structure for data_user_address
  284. -- ----------------------------
  285. DROP TABLE IF EXISTS `data_user_address`;
  286. CREATE TABLE `data_user_address` (
  287. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  288. `uuid` bigint(20) NULL DEFAULT 0 COMMENT '用户UID',
  289. `type` tinyint(1) NULL DEFAULT 0 COMMENT '地址类型(0普通,1默认)',
  290. `code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '地址编号',
  291. `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '收货姓名',
  292. `phone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '收货手机',
  293. `idcode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '身体证号',
  294. `idimg1` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '身份证正面',
  295. `idimg2` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '身份证反面',
  296. `province` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '地址-省份',
  297. `city` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '地址-城市',
  298. `area` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '地址-区域',
  299. `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '地址-详情',
  300. `deleted` tinyint(1) NULL DEFAULT 0 COMMENT '删除状态',
  301. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  302. PRIMARY KEY (`id`) USING BTREE,
  303. INDEX `idx_data_user_address_type`(`type`) USING BTREE,
  304. INDEX `idx_data_user_address_code`(`code`) USING BTREE,
  305. INDEX `idx_data_user_address_deleted`(`deleted`) USING BTREE,
  306. INDEX `idx_data_user_address_uuid`(`uuid`) USING BTREE
  307. ) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据-用户-地址' ROW_FORMAT = DYNAMIC;
  308. -- ----------------------------
  309. -- Table structure for data_user_balance
  310. -- ----------------------------
  311. DROP TABLE IF EXISTS `data_user_balance`;
  312. CREATE TABLE `data_user_balance` (
  313. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  314. `uuid` bigint(20) NULL DEFAULT 0 COMMENT '用户UID',
  315. `code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '充值编号',
  316. `name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '充值名称',
  317. `remark` varchar(999) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '充值备注',
  318. `amount` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '充值金额',
  319. `upgrade` tinyint(20) NULL DEFAULT 0 COMMENT '强制升级',
  320. `deleted` tinyint(1) NULL DEFAULT 0 COMMENT '删除状态',
  321. `create_by` bigint(20) NULL DEFAULT 0 COMMENT '系统用户',
  322. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  323. PRIMARY KEY (`id`) USING BTREE,
  324. INDEX `idx_data_user_balance_code`(`code`) USING BTREE,
  325. INDEX `idx_data_user_balance_deleted`(`deleted`) USING BTREE,
  326. INDEX `idx_data_user_balance_uuid`(`uuid`) USING BTREE
  327. ) ENGINE = InnoDB AUTO_INCREMENT = 328 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据-用户-余额' ROW_FORMAT = DYNAMIC;
  328. -- ----------------------------
  329. -- Table structure for data_user_message
  330. -- ----------------------------
  331. DROP TABLE IF EXISTS `data_user_message`;
  332. CREATE TABLE `data_user_message` (
  333. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  334. `type` tinyint(1) NULL DEFAULT 1 COMMENT '短信类型',
  335. `msgid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '消息编号',
  336. `phone` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '目标手机',
  337. `region` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '国家编号',
  338. `result` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '返回结果',
  339. `content` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '短信内容',
  340. `status` tinyint(1) NULL DEFAULT 0 COMMENT '短信状态(0失败,1成功)',
  341. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  342. PRIMARY KEY (`id`) USING BTREE,
  343. INDEX `idx_data_user_message_type`(`type`) USING BTREE,
  344. INDEX `idx_data_user_message_status`(`status`) USING BTREE,
  345. INDEX `idx_data_user_message_phone`(`phone`) USING BTREE,
  346. INDEX `idx_data_user_message_msgid`(`msgid`) USING BTREE
  347. ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据-用户-短信' ROW_FORMAT = DYNAMIC;
  348. -- ----------------------------
  349. -- Table structure for data_user_payment
  350. -- ----------------------------
  351. DROP TABLE IF EXISTS `data_user_payment`;
  352. CREATE TABLE `data_user_payment` (
  353. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  354. `order_no` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '订单单号',
  355. `order_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '订单描述',
  356. `order_amount` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '订单金额',
  357. `payment_code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '支付编号',
  358. `payment_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '支付通道',
  359. `payment_trade` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '支付单号',
  360. `payment_status` tinyint(1) NULL DEFAULT 0 COMMENT '支付状态',
  361. `payment_amount` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '支付金额',
  362. `payment_datetime` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '支付时间',
  363. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  364. PRIMARY KEY (`id`) USING BTREE,
  365. INDEX `idx_data_user_payment_order_no`(`order_no`) USING BTREE,
  366. INDEX `idx_data_user_payment_payment_code`(`payment_code`) USING BTREE,
  367. INDEX `idx_data_user_payment_payment_type`(`payment_type`) USING BTREE,
  368. INDEX `idx_data_user_payment_payment_trade`(`payment_trade`) USING BTREE,
  369. INDEX `idx_data_user_payment_payment_status`(`payment_status`) USING BTREE
  370. ) ENGINE = InnoDB AUTO_INCREMENT = 20 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据-用户-支付' ROW_FORMAT = DYNAMIC;
  371. -- ----------------------------
  372. -- Table structure for data_user_rebate
  373. -- ----------------------------
  374. DROP TABLE IF EXISTS `data_user_rebate`;
  375. CREATE TABLE `data_user_rebate` (
  376. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  377. `uuid` bigint(20) NULL DEFAULT 0 COMMENT '用户UID',
  378. `date` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '奖励日期',
  379. `code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '奖励编号',
  380. `type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '奖励类型',
  381. `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '奖励名称',
  382. `amount` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '奖励数量',
  383. `order_no` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '订单单号',
  384. `order_uuid` bigint(20) NULL DEFAULT 0 COMMENT '订单用户',
  385. `order_amount` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '订单金额',
  386. `status` tinyint(1) NULL DEFAULT 1 COMMENT '生效状态(0未生效,1已生效)',
  387. `deleted` tinyint(1) NULL DEFAULT 0 COMMENT '删除状态(0未删除,1已删除)',
  388. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  389. PRIMARY KEY (`id`) USING BTREE,
  390. INDEX `idx_data_user_rebate_type`(`type`) USING BTREE,
  391. INDEX `idx_data_user_rebate_date`(`date`) USING BTREE,
  392. INDEX `idx_data_user_rebate_code`(`code`) USING BTREE,
  393. INDEX `idx_data_user_rebate_name`(`name`) USING BTREE,
  394. INDEX `idx_data_user_rebate_status`(`status`) USING BTREE,
  395. INDEX `idx_data_user_rebate_uuid`(`uuid`) USING BTREE
  396. ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据-用户-返利' ROW_FORMAT = DYNAMIC;
  397. -- ----------------------------
  398. -- Table structure for data_user_token
  399. -- ----------------------------
  400. DROP TABLE IF EXISTS `data_user_token`;
  401. CREATE TABLE `data_user_token` (
  402. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  403. `uuid` bigint(20) NULL DEFAULT 0 COMMENT '用户UID',
  404. `type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '授权类型',
  405. `time` bigint(20) NULL DEFAULT 0 COMMENT '有效时间',
  406. `token` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '授权令牌',
  407. `tokenv` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '授权验证',
  408. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  409. PRIMARY KEY (`id`) USING BTREE,
  410. INDEX `idx_data_user_token_uuid`(`uuid`) USING BTREE,
  411. INDEX `idx_data_user_token_type`(`type`) USING BTREE,
  412. INDEX `idx_data_user_token_time`(`time`) USING BTREE,
  413. INDEX `idx_data_user_token_token`(`token`) USING BTREE
  414. ) ENGINE = InnoDB AUTO_INCREMENT = 242 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据-用户-认证' ROW_FORMAT = DYNAMIC;
  415. -- ----------------------------
  416. -- Table structure for data_user_transfer
  417. -- ----------------------------
  418. DROP TABLE IF EXISTS `data_user_transfer`;
  419. CREATE TABLE `data_user_transfer` (
  420. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  421. `uuid` bigint(20) NULL DEFAULT 0 COMMENT '用户UID',
  422. `type` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '提现方式',
  423. `date` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '提现日期',
  424. `code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '提现单号',
  425. `appid` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '公众号APPID',
  426. `openid` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '公众号OPENID',
  427. `charge_rate` decimal(20, 4) NULL DEFAULT 0.0000 COMMENT '提现手续费比例',
  428. `charge_amount` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '提现手续费金额',
  429. `amount` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '提现转账金额',
  430. `qrcode` varchar(999) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '收款码图片地址',
  431. `bank_wseq` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '微信银行编号',
  432. `bank_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '开户银行名称',
  433. `bank_bran` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '开户分行名称',
  434. `bank_user` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '开户账号姓名',
  435. `bank_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '开户银行卡号',
  436. `alipay_user` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '支付宝姓名',
  437. `alipay_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '支付宝账号',
  438. `remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '提现描述',
  439. `trade_no` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '交易单号',
  440. `trade_time` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '打款时间',
  441. `change_time` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '处理时间',
  442. `change_desc` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '处理描述',
  443. `audit_status` tinyint(1) NULL DEFAULT 0 COMMENT '审核状态',
  444. `audit_remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '审核描述',
  445. `audit_datetime` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '审核时间',
  446. `status` tinyint(1) NULL DEFAULT 1 COMMENT '提现状态(0失败,1待审核,2已审核,3打款中,4已打款,5已收款)',
  447. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  448. PRIMARY KEY (`id`) USING BTREE,
  449. INDEX `idx_data_user_transfer_code`(`code`) USING BTREE,
  450. INDEX `idx_data_user_transfer_status`(`status`) USING BTREE,
  451. INDEX `idx_data_user_transfer_date`(`date`) USING BTREE,
  452. INDEX `idx_data_user_transfer_type`(`type`) USING BTREE,
  453. INDEX `idx_data_user_transfer_audit_status`(`audit_status`) USING BTREE,
  454. INDEX `idx_data_user_transfer_appid`(`appid`) USING BTREE,
  455. INDEX `idx_data_user_transfer_openid`(`openid`) USING BTREE,
  456. INDEX `idx_data_user_transfer_uuid`(`uuid`) USING BTREE
  457. ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据-用户-提现' ROW_FORMAT = DYNAMIC;
  458. -- ----------------------------
  459. -- Table structure for shop_goods
  460. -- ----------------------------
  461. DROP TABLE IF EXISTS `shop_goods`;
  462. CREATE TABLE `shop_goods` (
  463. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  464. `code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '商品编号',
  465. `name` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '商品名称',
  466. `marks` varchar(999) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '商品标签',
  467. `cateids` varchar(999) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '分类编号',
  468. `cover` varchar(999) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '商品封面',
  469. `slider` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '轮播图片',
  470. `remark` varchar(999) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '商品描述',
  471. `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '商品详情',
  472. `payment` varchar(999) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '支付方式',
  473. `data_specs` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '商品规格(JSON)',
  474. `data_items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '商品规格(JSON)',
  475. `stock_total` bigint(20) NULL DEFAULT 0 COMMENT '商品库存统计',
  476. `stock_sales` bigint(20) NULL DEFAULT 0 COMMENT '商品销售统计',
  477. `stock_virtual` bigint(20) NULL DEFAULT 0 COMMENT '商品虚拟销量',
  478. `price_selling` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '最低销售价格',
  479. `price_market` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '最低市场价格',
  480. `discount_id` bigint(20) NULL DEFAULT 0 COMMENT '折扣方案编号',
  481. `truck_code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '物流运费模板',
  482. `truck_type` tinyint(1) NULL DEFAULT 0 COMMENT '物流配送(0无需配送,1需要配送)',
  483. `rebate_type` tinyint(1) NULL DEFAULT 1 COMMENT '参与返利(0无需返利,1需要返利)',
  484. `vip_entry` tinyint(1) NULL DEFAULT 0 COMMENT '入会礼包(0非入会礼包,1是入会礼包)',
  485. `vip_upgrade` bigint(20) NULL DEFAULT 0 COMMENT '购买升级等级(0不升级,其他升级)',
  486. `limit_low_vip` bigint(20) NULL DEFAULT 0 COMMENT '限制最低等级(0不限制,其他限制)',
  487. `limit_max_num` bigint(20) NULL DEFAULT 0 COMMENT '最大购买数量(0不限制,其他限制)',
  488. `num_read` bigint(20) NULL DEFAULT 0 COMMENT '访问阅读统计',
  489. `state_hot` tinyint(1) NULL DEFAULT 0 COMMENT '设置热度标签',
  490. `state_home` tinyint(1) NULL DEFAULT 0 COMMENT '设置首页推荐',
  491. `sort` bigint(20) NULL DEFAULT 0 COMMENT '列表排序权重',
  492. `status` tinyint(1) NULL DEFAULT 1 COMMENT '商品状态(1使用,0禁用)',
  493. `deleted` tinyint(1) NULL DEFAULT 0 COMMENT '删除状态(0未删,1已删)',
  494. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  495. PRIMARY KEY (`id`) USING BTREE,
  496. INDEX `idx_shop_goods_code`(`code`) USING BTREE,
  497. INDEX `idx_shop_goods_status`(`status`) USING BTREE,
  498. INDEX `idx_shop_goods_deleted`(`deleted`) USING BTREE
  499. ) ENGINE = InnoDB AUTO_INCREMENT = 189 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商城-商品-内容' ROW_FORMAT = DYNAMIC;
  500. -- ----------------------------
  501. -- Table structure for shop_goods_cate
  502. -- ----------------------------
  503. DROP TABLE IF EXISTS `shop_goods_cate`;
  504. CREATE TABLE `shop_goods_cate` (
  505. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  506. `pid` bigint(20) NULL DEFAULT 0 COMMENT '上级分类',
  507. `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '分类名称',
  508. `cover` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '分类图标',
  509. `remark` varchar(999) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '分类描述',
  510. `sort` bigint(20) NULL DEFAULT 0 COMMENT '排序权重',
  511. `status` tinyint(1) NULL DEFAULT 1 COMMENT '使用状态',
  512. `deleted` tinyint(1) NULL DEFAULT 0 COMMENT '删除状态',
  513. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  514. PRIMARY KEY (`id`) USING BTREE,
  515. INDEX `idx_shop_goods_cate_sort`(`sort`) USING BTREE,
  516. INDEX `idx_shop_goods_cate_status`(`status`) USING BTREE,
  517. INDEX `idx_shop_goods_cate_deleted`(`deleted`) USING BTREE
  518. ) ENGINE = InnoDB AUTO_INCREMENT = 1231 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商城-商品-分类' ROW_FORMAT = DYNAMIC;
  519. -- ----------------------------
  520. -- Table structure for shop_goods_item
  521. -- ----------------------------
  522. DROP TABLE IF EXISTS `shop_goods_item`;
  523. CREATE TABLE `shop_goods_item` (
  524. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  525. `goods_sku` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '商品SKU',
  526. `goods_code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '商品编号',
  527. `goods_spec` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '商品规格',
  528. `stock_sales` bigint(20) NULL DEFAULT 0 COMMENT '销售数量',
  529. `stock_total` bigint(20) NULL DEFAULT 0 COMMENT '商品库存',
  530. `price_selling` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '销售价格',
  531. `price_market` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '市场价格',
  532. `number_virtual` bigint(20) NULL DEFAULT 0 COMMENT '虚拟销量',
  533. `number_express` bigint(20) NULL DEFAULT 1 COMMENT '配送计件',
  534. `reward_balance` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '奖励余额',
  535. `reward_integral` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '奖励积分',
  536. `status` tinyint(1) NULL DEFAULT 1 COMMENT '商品状态',
  537. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  538. PRIMARY KEY (`id`) USING BTREE,
  539. INDEX `idx_shop_goods_item_code`(`goods_code`) USING BTREE,
  540. INDEX `idx_shop_goods_item_spec`(`goods_spec`) USING BTREE,
  541. INDEX `idx_shop_goods_item_status`(`status`) USING BTREE
  542. ) ENGINE = InnoDB AUTO_INCREMENT = 1187 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商城-商品-规格' ROW_FORMAT = DYNAMIC;
  543. -- ----------------------------
  544. -- Table structure for shop_goods_mark
  545. -- ----------------------------
  546. DROP TABLE IF EXISTS `shop_goods_mark`;
  547. CREATE TABLE `shop_goods_mark` (
  548. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  549. `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '标签名称',
  550. `remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '标签描述',
  551. `sort` bigint(20) NULL DEFAULT 0 COMMENT '排序权重',
  552. `status` tinyint(1) NULL DEFAULT 1 COMMENT '标签状态(1使用,0禁用)',
  553. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  554. PRIMARY KEY (`id`) USING BTREE,
  555. INDEX `idx_shop_goods_mark_sort`(`sort`) USING BTREE,
  556. INDEX `idx_shop_goods_mark_status`(`status`) USING BTREE
  557. ) ENGINE = InnoDB AUTO_INCREMENT = 119 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商城-商品-标签' ROW_FORMAT = DYNAMIC;
  558. -- ----------------------------
  559. -- Table structure for shop_goods_stock
  560. -- ----------------------------
  561. DROP TABLE IF EXISTS `shop_goods_stock`;
  562. CREATE TABLE `shop_goods_stock` (
  563. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  564. `batch_no` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '操作批量',
  565. `goods_code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '商品编号',
  566. `goods_spec` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '商品规格',
  567. `goods_stock` bigint(20) NULL DEFAULT 0 COMMENT '入库数量',
  568. `status` tinyint(1) NULL DEFAULT 1 COMMENT '数据状态(1使用,0禁用)',
  569. `deleted` tinyint(1) NULL DEFAULT 0 COMMENT '删除状态(0未删,1已删)',
  570. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  571. PRIMARY KEY (`id`) USING BTREE,
  572. INDEX `idx_shop_goods_stock_status`(`status`) USING BTREE,
  573. INDEX `idx_shop_goods_stock_deleted`(`deleted`) USING BTREE
  574. ) ENGINE = InnoDB AUTO_INCREMENT = 684 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商城-商品-库存' ROW_FORMAT = DYNAMIC;
  575. -- ----------------------------
  576. -- Table structure for shop_order
  577. -- ----------------------------
  578. DROP TABLE IF EXISTS `shop_order`;
  579. CREATE TABLE `shop_order` (
  580. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  581. `uuid` bigint(20) NULL DEFAULT 0 COMMENT '下单用户编号',
  582. `puid1` bigint(20) NULL DEFAULT 0 COMMENT '推荐一层用户',
  583. `puid2` bigint(20) NULL DEFAULT 0 COMMENT '推荐二层用户',
  584. `order_no` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '商品订单单号',
  585. `amount_real` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '订单实际金额',
  586. `amount_total` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '订单统计金额',
  587. `amount_goods` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '商品统计金额',
  588. `amount_reduct` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '随机减免金额',
  589. `amount_express` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '快递费用金额',
  590. `amount_discount` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '折扣后的金额',
  591. `payment_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '实际支付平台',
  592. `payment_code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '实际通道编号',
  593. `payment_allow` varchar(999) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '允许支付通道',
  594. `payment_trade` varchar(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '实际支付单号',
  595. `payment_status` tinyint(1) NULL DEFAULT 0 COMMENT '实际支付状态',
  596. `payment_image` varchar(999) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '支付凭证图片',
  597. `payment_amount` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '实际支付金额',
  598. `payment_balance` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '余额抵扣金额',
  599. `payment_remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '支付结果描述',
  600. `payment_datetime` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '支付到账时间',
  601. `number_goods` bigint(20) NULL DEFAULT 0 COMMENT '订单商品数量',
  602. `number_express` bigint(20) NULL DEFAULT 0 COMMENT '订单快递计数',
  603. `truck_type` tinyint(1) NULL DEFAULT 0 COMMENT '物流配送类型(0无需配送,1需要配送)',
  604. `rebate_amount` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '参与返利金额',
  605. `reward_balance` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '奖励账户余额',
  606. `order_remark` varchar(999) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '订单用户备注',
  607. `cancel_status` tinyint(1) NULL DEFAULT 0 COMMENT '订单取消状态',
  608. `cancel_remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '订单取消描述',
  609. `cancel_datetime` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '订单取消时间',
  610. `deleted_status` tinyint(1) NULL DEFAULT 0 COMMENT '订单删除状态(0未删,1已删)',
  611. `deleted_remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '订单删除描述',
  612. `deleted_datetime` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '订单删除时间',
  613. `status` tinyint(1) NULL DEFAULT 1 COMMENT '订单流程状态(0已取消,1预订单,2待支付,3支付中,4已支付,5已发货,6已完成)',
  614. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '订单创建时间',
  615. PRIMARY KEY (`id`) USING BTREE,
  616. INDEX `idx_shop_order_status`(`status`) USING BTREE,
  617. INDEX `idx_shop_order_orderno`(`order_no`) USING BTREE,
  618. INDEX `idx_shop_order_cancel_status`(`cancel_status`) USING BTREE,
  619. INDEX `idx_shop_order_payment_status`(`payment_status`) USING BTREE,
  620. INDEX `idx_shop_order_from`(`puid1`) USING BTREE,
  621. INDEX `idx_shop_order_deleted`(`deleted_status`) USING BTREE,
  622. INDEX `idx_shop_order_mid`(`uuid`) USING BTREE
  623. ) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商城-订单-内容' ROW_FORMAT = DYNAMIC;
  624. -- ----------------------------
  625. -- Table structure for shop_order_item
  626. -- ----------------------------
  627. DROP TABLE IF EXISTS `shop_order_item`;
  628. CREATE TABLE `shop_order_item` (
  629. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  630. `uuid` bigint(20) NULL DEFAULT 0 COMMENT '商城用户编号',
  631. `order_no` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '商城订单单号',
  632. `goods_sku` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '商城商品SKU',
  633. `goods_code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '商城商品编号',
  634. `goods_spec` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '商城商品规格',
  635. `goods_name` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '商城商品名称',
  636. `goods_cover` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '商品封面图片',
  637. `goods_payment` varchar(999) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '指定支付通道',
  638. `price_market` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '商品市场单价',
  639. `price_selling` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '商品销售单价',
  640. `total_market` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '商品市场总价',
  641. `total_selling` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '商品销售总价',
  642. `reward_balance` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '商品奖励余额',
  643. `reward_integral` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '商品奖励积分',
  644. `stock_sales` bigint(20) NULL DEFAULT 1 COMMENT '包含商品数量',
  645. `vip_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户等级名称',
  646. `vip_code` bigint(20) NULL DEFAULT 0 COMMENT '用户等级序号',
  647. `vip_entry` tinyint(1) NULL DEFAULT 0 COMMENT '是否入会礼包(0非礼包,1是礼包)',
  648. `vip_upgrade` bigint(20) NULL DEFAULT 0 COMMENT '升级用户等级',
  649. `truck_type` tinyint(1) NULL DEFAULT 0 COMMENT '物流配送类型(0虚物,1实物)',
  650. `truck_code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '快递邮费模板',
  651. `truck_number` bigint(20) NULL DEFAULT 0 COMMENT '快递计费基数',
  652. `rebate_type` tinyint(1) NULL DEFAULT 0 COMMENT '参与返利状态(0不返,1返利)',
  653. `rebate_amount` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '参与返利金额',
  654. `discount_id` bigint(20) NULL DEFAULT 0 COMMENT '优惠方案编号',
  655. `discount_rate` decimal(20, 6) NULL DEFAULT 100.000000 COMMENT '销售价格折扣',
  656. `discount_amount` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '商品优惠金额',
  657. `status` tinyint(1) NULL DEFAULT 1 COMMENT '商品状态(1使用,0禁用)',
  658. `deleted` tinyint(1) NULL DEFAULT 0 COMMENT '删除状态(0未删,1已删)',
  659. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '订单创建时间',
  660. PRIMARY KEY (`id`) USING BTREE,
  661. INDEX `idx_shop_order_item_status`(`status`) USING BTREE,
  662. INDEX `idx_shop_order_item_deleted`(`deleted`) USING BTREE,
  663. INDEX `idx_shop_order_item_order_no`(`order_no`) USING BTREE,
  664. INDEX `idx_shop_order_item_goods_sku`(`goods_sku`) USING BTREE,
  665. INDEX `idx_shop_order_item_goods_code`(`goods_code`) USING BTREE,
  666. INDEX `idx_shop_order_item_goods_spec`(`goods_spec`) USING BTREE,
  667. INDEX `idx_shop_order_item_rebate_type`(`rebate_type`) USING BTREE
  668. ) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商城-订单-商品' ROW_FORMAT = DYNAMIC;
  669. -- ----------------------------
  670. -- Table structure for shop_order_send
  671. -- ----------------------------
  672. DROP TABLE IF EXISTS `shop_order_send`;
  673. CREATE TABLE `shop_order_send` (
  674. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  675. `uuid` bigint(20) NULL DEFAULT 0 COMMENT '商城用户编号',
  676. `order_no` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '商城订单单号',
  677. `address_code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '配送地址编号',
  678. `address_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '配送收货人姓名',
  679. `address_phone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '配送收货人手机',
  680. `address_idcode` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '配送收货人证件号码',
  681. `address_idimg1` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '配送收货人证件正面',
  682. `address_idimg2` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '配送收货人证件反面',
  683. `address_province` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '配送地址的省份',
  684. `address_city` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '配送地址的城市',
  685. `address_area` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '配送地址的区域',
  686. `address_content` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '配送的详细地址',
  687. `address_datetime` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '地址确认时间',
  688. `template_code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '配送模板编号',
  689. `template_count` bigint(20) NULL DEFAULT 0 COMMENT '快递计费基数',
  690. `template_remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '配送计算描述',
  691. `template_amount` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '配送计算金额',
  692. `company_code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '快递公司编码',
  693. `company_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '快递公司名称',
  694. `send_number` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '快递运送单号',
  695. `send_remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '快递发送备注',
  696. `send_datetime` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '快递发送时间',
  697. `status` tinyint(1) NULL DEFAULT 1 COMMENT '发货商品状态(1使用,0禁用)',
  698. `deleted` tinyint(1) NULL DEFAULT 0 COMMENT '发货删除状态(0未删,1已删)',
  699. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  700. PRIMARY KEY (`id`) USING BTREE,
  701. INDEX `idx_shop_order_send_status`(`status`) USING BTREE,
  702. INDEX `idx_shop_order_send_deleted`(`deleted`) USING BTREE,
  703. INDEX `idx_shop_order_send_order_no`(`order_no`) USING BTREE,
  704. INDEX `idx_shop_order_send_mid`(`uuid`) USING BTREE
  705. ) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商城-订单-配送' ROW_FORMAT = DYNAMIC;
  706. -- ----------------------------
  707. -- Table structure for system_auth
  708. -- ----------------------------
  709. DROP TABLE IF EXISTS `system_auth`;
  710. CREATE TABLE `system_auth` (
  711. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  712. `title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '权限名称',
  713. `utype` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '身份权限',
  714. `desc` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '备注说明',
  715. `sort` bigint(20) NULL DEFAULT 0 COMMENT '排序权重',
  716. `status` tinyint(1) NULL DEFAULT 1 COMMENT '权限状态(1使用,0禁用)',
  717. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  718. PRIMARY KEY (`id`) USING BTREE,
  719. INDEX `idx_system_auth_status`(`status`) USING BTREE,
  720. INDEX `idx_system_auth_title`(`title`) USING BTREE
  721. ) ENGINE = InnoDB AUTO_INCREMENT = 155 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统-权限' ROW_FORMAT = DYNAMIC;
  722. -- ----------------------------
  723. -- Table structure for system_auth_node
  724. -- ----------------------------
  725. DROP TABLE IF EXISTS `system_auth_node`;
  726. CREATE TABLE `system_auth_node` (
  727. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  728. `auth` bigint(20) NULL DEFAULT 0 COMMENT '角色',
  729. `node` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '节点',
  730. PRIMARY KEY (`id`) USING BTREE,
  731. INDEX `idx_system_auth_auth`(`auth`) USING BTREE,
  732. INDEX `idx_system_auth_node`(`node`(191)) USING BTREE
  733. ) ENGINE = InnoDB AUTO_INCREMENT = 24370 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统-授权' ROW_FORMAT = DYNAMIC;
  734. -- ----------------------------
  735. -- Table structure for system_base
  736. -- ----------------------------
  737. DROP TABLE IF EXISTS `system_base`;
  738. CREATE TABLE `system_base` (
  739. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  740. `type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '数据类型',
  741. `code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '数据代码',
  742. `name` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '数据名称',
  743. `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '数据内容',
  744. `sort` bigint(20) NULL DEFAULT 0 COMMENT '排序权重',
  745. `status` tinyint(1) NULL DEFAULT 1 COMMENT '数据状态(0禁用,1启动)',
  746. `deleted` tinyint(1) NULL DEFAULT 0 COMMENT '删除状态(0正常,1已删)',
  747. `deleted_at` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '删除时间',
  748. `deleted_by` bigint(20) NULL DEFAULT 0 COMMENT '删除用户',
  749. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  750. PRIMARY KEY (`id`) USING BTREE,
  751. INDEX `idx_system_base_type`(`type`) USING BTREE,
  752. INDEX `idx_system_base_code`(`code`) USING BTREE,
  753. INDEX `idx_system_base_name`(`name`(191)) USING BTREE
  754. ) ENGINE = InnoDB AUTO_INCREMENT = 179 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统-字典' ROW_FORMAT = COMPACT;
  755. -- ----------------------------
  756. -- Table structure for system_config
  757. -- ----------------------------
  758. DROP TABLE IF EXISTS `system_config`;
  759. CREATE TABLE `system_config` (
  760. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  761. `type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '配置分类',
  762. `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '配置名称',
  763. `value` varchar(2048) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '配置内容',
  764. PRIMARY KEY (`id`) USING BTREE,
  765. INDEX `idx_system_config_type`(`type`) USING BTREE,
  766. INDEX `idx_system_config_name`(`name`) USING BTREE
  767. ) ENGINE = InnoDB AUTO_INCREMENT = 39 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统-配置' ROW_FORMAT = COMPACT;
  768. -- ----------------------------
  769. -- Table structure for system_data
  770. -- ----------------------------
  771. DROP TABLE IF EXISTS `system_data`;
  772. CREATE TABLE `system_data` (
  773. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  774. `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '配置名',
  775. `value` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '配置值',
  776. PRIMARY KEY (`id`) USING BTREE,
  777. INDEX `idx_system_data_name`(`name`) USING BTREE
  778. ) ENGINE = InnoDB AUTO_INCREMENT = 49 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统-数据' ROW_FORMAT = DYNAMIC;
  779. -- ----------------------------
  780. -- Table structure for system_file
  781. -- ----------------------------
  782. DROP TABLE IF EXISTS `system_file`;
  783. CREATE TABLE `system_file` (
  784. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  785. `type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '上传类型',
  786. `hash` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '文件哈希',
  787. `name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '文件名称',
  788. `xext` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '文件后缀',
  789. `xurl` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '访问链接',
  790. `xkey` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '文件路径',
  791. `mime` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '文件类型',
  792. `size` bigint(20) NULL DEFAULT 0 COMMENT '文件大小',
  793. `uuid` bigint(20) NULL DEFAULT 0 COMMENT '用户编号',
  794. `isfast` tinyint(1) NULL DEFAULT 0 COMMENT '是否秒传',
  795. `issafe` tinyint(1) NULL DEFAULT 0 COMMENT '安全模式',
  796. `status` tinyint(1) NULL DEFAULT 1 COMMENT '上传状态(1悬空,2落地)',
  797. `create_at` datetime NULL DEFAULT NULL COMMENT '创建时间',
  798. `update_at` datetime NULL DEFAULT NULL COMMENT '更新时间',
  799. PRIMARY KEY (`id`) USING BTREE,
  800. INDEX `idx_system_file_type`(`type`) USING BTREE,
  801. INDEX `idx_system_file_hash`(`hash`) USING BTREE,
  802. INDEX `idx_system_file_uuid`(`uuid`) USING BTREE,
  803. INDEX `idx_system_file_xext`(`xext`) USING BTREE,
  804. INDEX `idx_system_file_status`(`status`) USING BTREE,
  805. INDEX `idx_system_file_issafe`(`issafe`) USING BTREE,
  806. INDEX `idx_system_file_isfast`(`isfast`) USING BTREE
  807. ) ENGINE = InnoDB AUTO_INCREMENT = 587 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统-文件' ROW_FORMAT = COMPACT;
  808. -- ----------------------------
  809. -- Table structure for system_menu
  810. -- ----------------------------
  811. DROP TABLE IF EXISTS `system_menu`;
  812. CREATE TABLE `system_menu` (
  813. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  814. `pid` bigint(20) NULL DEFAULT 0 COMMENT '上级ID',
  815. `title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '菜单名称',
  816. `icon` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '菜单图标',
  817. `node` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '节点代码',
  818. `url` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '链接节点',
  819. `params` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '链接参数',
  820. `target` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '_self' COMMENT '打开方式',
  821. `sort` int(11) NULL DEFAULT 0 COMMENT '排序权重',
  822. `status` tinyint(1) NULL DEFAULT 1 COMMENT '状态(0:禁用,1:启用)',
  823. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  824. PRIMARY KEY (`id`) USING BTREE,
  825. INDEX `idx_system_menu_status`(`status`) USING BTREE
  826. ) ENGINE = InnoDB AUTO_INCREMENT = 46 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统-菜单' ROW_FORMAT = Compact;
  827. -- ----------------------------
  828. -- Table structure for system_oplog
  829. -- ----------------------------
  830. DROP TABLE IF EXISTS `system_oplog`;
  831. CREATE TABLE `system_oplog` (
  832. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  833. `node` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '当前操作节点',
  834. `geoip` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '操作者IP地址',
  835. `action` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '操作行为名称',
  836. `content` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '操作内容描述',
  837. `username` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '操作人用户名',
  838. `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  839. PRIMARY KEY (`id`) USING BTREE
  840. ) ENGINE = InnoDB AUTO_INCREMENT = 1581 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统-日志' ROW_FORMAT = DYNAMIC;
  841. -- ----------------------------
  842. -- Table structure for system_queue
  843. -- ----------------------------
  844. DROP TABLE IF EXISTS `system_queue`;
  845. CREATE TABLE `system_queue` (
  846. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  847. `code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '任务编号',
  848. `title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '任务名称',
  849. `command` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '执行指令',
  850. `exec_pid` bigint(20) NULL DEFAULT 0 COMMENT '执行进程',
  851. `exec_data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '执行参数',
  852. `exec_time` bigint(20) NULL DEFAULT 0 COMMENT '执行时间',
  853. `exec_desc` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '执行描述',
  854. `enter_time` decimal(20, 4) NULL DEFAULT 0.0000 COMMENT '开始时间',
  855. `outer_time` decimal(20, 4) NULL DEFAULT 0.0000 COMMENT '结束时间',
  856. `loops_time` bigint(20) NULL DEFAULT 0 COMMENT '循环时间',
  857. `attempts` bigint(20) NULL DEFAULT 0 COMMENT '执行次数',
  858. `rscript` tinyint(1) NULL DEFAULT 1 COMMENT '任务类型(0单例,1多例)',
  859. `status` tinyint(1) NULL DEFAULT 1 COMMENT '任务状态(1新任务,2处理中,3成功,4失败)',
  860. `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  861. PRIMARY KEY (`id`) USING BTREE,
  862. INDEX `idx_system_queue_code`(`code`) USING BTREE,
  863. INDEX `idx_system_queue_title`(`title`) USING BTREE,
  864. INDEX `idx_system_queue_status`(`status`) USING BTREE,
  865. INDEX `idx_system_queue_rscript`(`rscript`) USING BTREE,
  866. INDEX `idx_system_queue_create_at`(`create_at`) USING BTREE,
  867. INDEX `idx_system_queue_exec_time`(`exec_time`) USING BTREE
  868. ) ENGINE = InnoDB AUTO_INCREMENT = 5554 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统-任务' ROW_FORMAT = DYNAMIC;
  869. -- ----------------------------
  870. -- Table structure for system_user
  871. -- ----------------------------
  872. DROP TABLE IF EXISTS `system_user`;
  873. CREATE TABLE `system_user` (
  874. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  875. `usertype` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户类型',
  876. `username` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户账号',
  877. `password` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户密码',
  878. `nickname` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户昵称',
  879. `headimg` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '头像地址',
  880. `authorize` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '权限授权',
  881. `contact_qq` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '联系QQ',
  882. `contact_mail` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '联系邮箱',
  883. `contact_phone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '联系手机',
  884. `login_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '登录地址',
  885. `login_at` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '登录时间',
  886. `login_num` bigint(20) NULL DEFAULT 0 COMMENT '登录次数',
  887. `describe` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '备注说明',
  888. `status` tinyint(1) NULL DEFAULT 1 COMMENT '状态(0禁用,1启用)',
  889. `sort` bigint(20) NULL DEFAULT 0 COMMENT '排序权重',
  890. `is_deleted` tinyint(1) NULL DEFAULT 0 COMMENT '删除(1删除,0未删)',
  891. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  892. PRIMARY KEY (`id`) USING BTREE,
  893. INDEX `idx_system_user_status`(`status`) USING BTREE,
  894. INDEX `idx_system_user_username`(`username`) USING BTREE,
  895. INDEX `idx_system_user_deleted`(`is_deleted`) USING BTREE
  896. ) ENGINE = InnoDB AUTO_INCREMENT = 10131 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统-用户' ROW_FORMAT = COMPACT;
  897. -- ----------------------------
  898. -- Table structure for wechat_auto
  899. -- ----------------------------
  900. DROP TABLE IF EXISTS `wechat_auto`;
  901. CREATE TABLE `wechat_auto` (
  902. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  903. `type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '类型(text,image,news)',
  904. `time` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '延迟时间',
  905. `code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '消息编号',
  906. `appid` char(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '公众号APPID',
  907. `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '文本内容',
  908. `image_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '图片链接',
  909. `voice_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '语音链接',
  910. `music_title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '音乐标题',
  911. `music_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '音乐链接',
  912. `music_image` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '缩略图片',
  913. `music_desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '音乐描述',
  914. `video_title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '视频标题',
  915. `video_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '视频URL',
  916. `video_desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '视频描述',
  917. `news_id` bigint(20) NULL DEFAULT 0 COMMENT '图文ID',
  918. `status` tinyint(1) NULL DEFAULT 1 COMMENT '状态(0禁用,1启用)',
  919. `create_by` bigint(20) NULL DEFAULT 0 COMMENT '创建人',
  920. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
  921. PRIMARY KEY (`id`) USING BTREE,
  922. INDEX `idx_wechat_auto_type`(`type`) USING BTREE,
  923. INDEX `idx_wechat_auto_keys`(`time`) USING BTREE,
  924. INDEX `idx_wechat_auto_code`(`code`) USING BTREE,
  925. INDEX `idx_wechat_auto_appid`(`appid`) USING BTREE
  926. ) ENGINE = InnoDB AUTO_INCREMENT = 13 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '微信-回复' ROW_FORMAT = DYNAMIC;
  927. -- ----------------------------
  928. -- Table structure for wechat_fans
  929. -- ----------------------------
  930. DROP TABLE IF EXISTS `wechat_fans`;
  931. CREATE TABLE `wechat_fans` (
  932. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  933. `appid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '公众号APPID',
  934. `unionid` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '粉丝unionid',
  935. `openid` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '粉丝openid',
  936. `tagid_list` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '粉丝标签id',
  937. `is_black` tinyint(1) NULL DEFAULT 0 COMMENT '是否为黑名单状态',
  938. `subscribe` tinyint(1) NULL DEFAULT 0 COMMENT '关注状态(0未关注,1已关注)',
  939. `nickname` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户昵称',
  940. `sex` tinyint(1) NULL DEFAULT 0 COMMENT '用户性别(1男性,2女性,0未知)',
  941. `country` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户所在国家',
  942. `province` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户所在省份',
  943. `city` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户所在城市',
  944. `language` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户的语言(zh_CN)',
  945. `headimgurl` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户头像',
  946. `subscribe_time` bigint(20) NULL DEFAULT 0 COMMENT '关注时间',
  947. `subscribe_at` datetime NULL DEFAULT NULL COMMENT '关注时间',
  948. `remark` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '备注',
  949. `subscribe_scene` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '扫码关注场景',
  950. `qr_scene` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '二维码场景值',
  951. `qr_scene_str` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '二维码场景内容',
  952. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  953. PRIMARY KEY (`id`) USING BTREE,
  954. INDEX `idx_wechat_fans_openid`(`openid`) USING BTREE,
  955. INDEX `idx_wechat_fans_unionid`(`unionid`) USING BTREE,
  956. INDEX `idx_wechat_fans_isblack`(`is_black`) USING BTREE,
  957. INDEX `idx_wechat_fans_subscribe`(`subscribe`) USING BTREE
  958. ) ENGINE = InnoDB AUTO_INCREMENT = 491 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '微信-粉丝' ROW_FORMAT = DYNAMIC;
  959. -- ----------------------------
  960. -- Table structure for wechat_fans_tags
  961. -- ----------------------------
  962. DROP TABLE IF EXISTS `wechat_fans_tags`;
  963. CREATE TABLE `wechat_fans_tags` (
  964. `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '标签ID',
  965. `appid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '公众号APPID',
  966. `name` varchar(35) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '标签名称',
  967. `count` bigint(20) NULL DEFAULT 0 COMMENT '总数',
  968. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
  969. INDEX `idx_wechat_fans_tags_id`(`id`) USING BTREE,
  970. INDEX `idx_wechat_fans_tags_appid`(`appid`) USING BTREE
  971. ) ENGINE = InnoDB AUTO_INCREMENT = 246 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '微信-标签' ROW_FORMAT = DYNAMIC;
  972. -- ----------------------------
  973. -- Table structure for wechat_keys
  974. -- ----------------------------
  975. DROP TABLE IF EXISTS `wechat_keys`;
  976. CREATE TABLE `wechat_keys` (
  977. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  978. `appid` char(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '公众号APPID',
  979. `type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '类型(text,image,news)',
  980. `keys` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '关键字',
  981. `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '文本内容',
  982. `image_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '图片链接',
  983. `voice_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '语音链接',
  984. `music_title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '音乐标题',
  985. `music_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '音乐链接',
  986. `music_image` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '缩略图片',
  987. `music_desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '音乐描述',
  988. `video_title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '视频标题',
  989. `video_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '视频URL',
  990. `video_desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '视频描述',
  991. `news_id` bigint(20) NULL DEFAULT 0 COMMENT '图文ID',
  992. `sort` bigint(20) NULL DEFAULT 0 COMMENT '排序字段',
  993. `status` tinyint(1) NULL DEFAULT 1 COMMENT '状态(0禁用,1启用)',
  994. `create_by` bigint(20) NULL DEFAULT 0 COMMENT '创建人',
  995. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
  996. PRIMARY KEY (`id`) USING BTREE,
  997. INDEX `idx_wechat_keys_appid`(`appid`) USING BTREE,
  998. INDEX `idx_wechat_keys_type`(`type`) USING BTREE,
  999. INDEX `idx_wechat_keys_keys`(`keys`) USING BTREE
  1000. ) ENGINE = InnoDB AUTO_INCREMENT = 23 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '微信-规则' ROW_FORMAT = DYNAMIC;
  1001. -- ----------------------------
  1002. -- Table structure for wechat_media
  1003. -- ----------------------------
  1004. DROP TABLE IF EXISTS `wechat_media`;
  1005. CREATE TABLE `wechat_media` (
  1006. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  1007. `md5` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '文件md5',
  1008. `type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '媒体类型',
  1009. `appid` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '公众号ID',
  1010. `media_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '永久素材MediaID',
  1011. `local_url` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '本地文件链接',
  1012. `media_url` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '远程图片链接',
  1013. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  1014. PRIMARY KEY (`id`) USING BTREE,
  1015. INDEX `idx_wechat_media_appid`(`appid`) USING BTREE,
  1016. INDEX `idx_wechat_media_md5`(`md5`) USING BTREE,
  1017. INDEX `idx_wechat_media_type`(`type`) USING BTREE,
  1018. INDEX `idx_wechat_media_media_id`(`media_id`) USING BTREE
  1019. ) ENGINE = InnoDB AUTO_INCREMENT = 13 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '微信-素材' ROW_FORMAT = DYNAMIC;
  1020. -- ----------------------------
  1021. -- Table structure for wechat_news
  1022. -- ----------------------------
  1023. DROP TABLE IF EXISTS `wechat_news`;
  1024. CREATE TABLE `wechat_news` (
  1025. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  1026. `media_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '永久素材MediaID',
  1027. `local_url` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '永久素材外网URL',
  1028. `article_id` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '关联图文ID(用英文逗号做分割)',
  1029. `is_deleted` tinyint(1) NULL DEFAULT 0 COMMENT '删除状态(0未删除,1已删除)',
  1030. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  1031. `create_by` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
  1032. PRIMARY KEY (`id`) USING BTREE,
  1033. INDEX `idx_wechat_news_artcle_id`(`article_id`) USING BTREE,
  1034. INDEX `idx_wechat_news_media_id`(`media_id`) USING BTREE
  1035. ) ENGINE = InnoDB AUTO_INCREMENT = 118 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '微信-图文' ROW_FORMAT = DYNAMIC;
  1036. -- ----------------------------
  1037. -- Table structure for wechat_news_article
  1038. -- ----------------------------
  1039. DROP TABLE IF EXISTS `wechat_news_article`;
  1040. CREATE TABLE `wechat_news_article` (
  1041. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  1042. `title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '素材标题',
  1043. `local_url` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '永久素材显示URL',
  1044. `show_cover_pic` tinyint(4) NULL DEFAULT 0 COMMENT '显示封面(0不显示,1显示)',
  1045. `author` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '文章作者',
  1046. `digest` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '摘要内容',
  1047. `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '图文内容',
  1048. `content_source_url` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '原文地址',
  1049. `read_num` bigint(20) NULL DEFAULT 0 COMMENT '阅读数量',
  1050. `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  1051. PRIMARY KEY (`id`) USING BTREE
  1052. ) ENGINE = InnoDB AUTO_INCREMENT = 303 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '微信-文章' ROW_FORMAT = DYNAMIC;
  1053. SET FOREIGN_KEY_CHECKS = 1;