virtual_mall.sql 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478
  1. -- MySQL dump 10.13 Distrib 5.7.44, for Win64 (x86_64)
  2. --
  3. -- Host: 127.0.0.1 Database: virtual_mall
  4. -- ------------------------------------------------------
  5. -- Server version 5.7.44-log
  6. /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  7. /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  8. /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
  9. /*!40101 SET NAMES utf8 */;
  10. /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
  11. /*!40103 SET TIME_ZONE='+00:00' */;
  12. /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
  13. /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
  14. /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
  15. /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
  16. --
  17. -- Table structure for table `artice`
  18. --
  19. DROP TABLE IF EXISTS `artice`;
  20. /*!40101 SET @saved_cs_client = @@character_set_client */;
  21. /*!40101 SET character_set_client = utf8 */;
  22. CREATE TABLE `artice` (
  23. `id` int(11) NOT NULL COMMENT 'id',
  24. `article_title` varchar(255) DEFAULT NULL COMMENT '文章名称',
  25. `artice_content` longblob COMMENT '文章内容',
  26. `state` varchar(255) DEFAULT NULL COMMENT '状态',
  27. `image` varchar(255) DEFAULT NULL COMMENT '图片',
  28. `publish_time` datetime DEFAULT NULL COMMENT '发表时间',
  29. `create_by` varchar(255) DEFAULT NULL COMMENT '创建人',
  30. `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  31. `update_by` varchar(255) DEFAULT NULL COMMENT '更新人',
  32. `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  33. PRIMARY KEY (`id`)
  34. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  35. /*!40101 SET character_set_client = @saved_cs_client */;
  36. --
  37. -- Dumping data for table `artice`
  38. --
  39. LOCK TABLES `artice` WRITE;
  40. /*!40000 ALTER TABLE `artice` DISABLE KEYS */;
  41. /*!40000 ALTER TABLE `artice` ENABLE KEYS */;
  42. UNLOCK TABLES;
  43. --
  44. -- Table structure for table `authority`
  45. --
  46. DROP TABLE IF EXISTS `authority`;
  47. /*!40101 SET @saved_cs_client = @@character_set_client */;
  48. /*!40101 SET character_set_client = utf8 */;
  49. CREATE TABLE `authority` (
  50. `id` int(11) NOT NULL AUTO_INCREMENT,
  51. `authority_name` varchar(255) DEFAULT NULL,
  52. `authority_path` varchar(255) DEFAULT NULL,
  53. PRIMARY KEY (`id`) USING BTREE
  54. ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
  55. /*!40101 SET character_set_client = @saved_cs_client */;
  56. --
  57. -- Dumping data for table `authority`
  58. --
  59. LOCK TABLES `authority` WRITE;
  60. /*!40000 ALTER TABLE `authority` DISABLE KEYS */;
  61. INSERT INTO `authority` VALUES (1,'登录','/api/ping');
  62. /*!40000 ALTER TABLE `authority` ENABLE KEYS */;
  63. UNLOCK TABLES;
  64. --
  65. -- Table structure for table `goods`
  66. --
  67. DROP TABLE IF EXISTS `goods`;
  68. /*!40101 SET @saved_cs_client = @@character_set_client */;
  69. /*!40101 SET character_set_client = utf8 */;
  70. CREATE TABLE `goods` (
  71. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  72. `type_id` int(11) NOT NULL COMMENT '分类id',
  73. `goods_name` varchar(255) NOT NULL COMMENT '商品名字',
  74. `introduction_id` int(11) DEFAULT NULL COMMENT '商品介绍id',
  75. `sales_volume` varchar(255) DEFAULT NULL COMMENT '近30天销量',
  76. `tag_ids` varchar(255) DEFAULT NULL COMMENT '商品标签',
  77. PRIMARY KEY (`id`) USING BTREE
  78. ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
  79. /*!40101 SET character_set_client = @saved_cs_client */;
  80. --
  81. -- Dumping data for table `goods`
  82. --
  83. LOCK TABLES `goods` WRITE;
  84. /*!40000 ALTER TABLE `goods` DISABLE KEYS */;
  85. INSERT INTO `goods` VALUES (1,1,'苹果礼品卡特惠包',NULL,NULL,'1,2'),(2,2,'PUBG国际服直充',NULL,NULL,NULL);
  86. /*!40000 ALTER TABLE `goods` ENABLE KEYS */;
  87. UNLOCK TABLES;
  88. --
  89. -- Table structure for table `goods_commodity_area`
  90. --
  91. DROP TABLE IF EXISTS `goods_commodity_area`;
  92. /*!40101 SET @saved_cs_client = @@character_set_client */;
  93. /*!40101 SET character_set_client = utf8 */;
  94. CREATE TABLE `goods_commodity_area` (
  95. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  96. `goods_id` int(11) DEFAULT NULL COMMENT '商品id',
  97. `commodity_area_name` varchar(255) NOT NULL COMMENT '商品属地名称',
  98. `detail_image` varchar(255) DEFAULT NULL COMMENT '详情图片',
  99. `detail_introduction_id` int(11) DEFAULT NULL COMMENT '相关文本详情id',
  100. PRIMARY KEY (`id`) USING BTREE
  101. ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
  102. /*!40101 SET character_set_client = @saved_cs_client */;
  103. --
  104. -- Dumping data for table `goods_commodity_area`
  105. --
  106. LOCK TABLES `goods_commodity_area` WRITE;
  107. /*!40000 ALTER TABLE `goods_commodity_area` DISABLE KEYS */;
  108. INSERT INTO `goods_commodity_area` VALUES (1,1,'美国',NULL,1),(2,1,'日本',NULL,2),(3,1,'香港',NULL,1),(4,1,'台湾',NULL,1);
  109. /*!40000 ALTER TABLE `goods_commodity_area` ENABLE KEYS */;
  110. UNLOCK TABLES;
  111. --
  112. -- Table structure for table `goods_coupon`
  113. --
  114. DROP TABLE IF EXISTS `goods_coupon`;
  115. /*!40101 SET @saved_cs_client = @@character_set_client */;
  116. /*!40101 SET character_set_client = utf8 */;
  117. CREATE TABLE `goods_coupon` (
  118. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  119. `coupon_name` varchar(255) DEFAULT NULL COMMENT '优惠券名称',
  120. `coupon_desc` varchar(255) DEFAULT NULL COMMENT '优惠券描述',
  121. `cash_back_point` decimal(11,0) DEFAULT NULL COMMENT '满x',
  122. `cash_back_price` decimal(10,2) DEFAULT NULL COMMENT '减x',
  123. `condition_by_topic` varchar(255) DEFAULT NULL COMMENT '主题可用,id',
  124. `condition_by_type` varchar(255) DEFAULT NULL COMMENT '类型可用,id',
  125. `condition_by_goods` varchar(255) DEFAULT NULL COMMENT '商品可用,id',
  126. `count` int(255) DEFAULT NULL COMMENT '优惠券数量',
  127. `receive_type` varchar(255) DEFAULT NULL COMMENT '领取条件',
  128. `validity` varchar(255) DEFAULT NULL COMMENT '有效性,领取开始计时(ClaimTiming),固定时间(FixedTime)',
  129. `validity_period` datetime DEFAULT NULL COMMENT '有效期',
  130. PRIMARY KEY (`id`)
  131. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='优惠券';
  132. /*!40101 SET character_set_client = @saved_cs_client */;
  133. --
  134. -- Dumping data for table `goods_coupon`
  135. --
  136. LOCK TABLES `goods_coupon` WRITE;
  137. /*!40000 ALTER TABLE `goods_coupon` DISABLE KEYS */;
  138. /*!40000 ALTER TABLE `goods_coupon` ENABLE KEYS */;
  139. UNLOCK TABLES;
  140. --
  141. -- Table structure for table `goods_coupon_user`
  142. --
  143. DROP TABLE IF EXISTS `goods_coupon_user`;
  144. /*!40101 SET @saved_cs_client = @@character_set_client */;
  145. /*!40101 SET character_set_client = utf8 */;
  146. CREATE TABLE `goods_coupon_user` (
  147. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  148. `user_id` int(11) DEFAULT NULL COMMENT '用户id',
  149. `coupon_id` int(11) DEFAULT NULL COMMENT '优惠券id',
  150. `collection_time` datetime DEFAULT NULL COMMENT '领取时间',
  151. `state` varchar(255) DEFAULT NULL COMMENT '状态,已使用2,未使用1,已过期0',
  152. PRIMARY KEY (`id`)
  153. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='优惠券领取';
  154. /*!40101 SET character_set_client = @saved_cs_client */;
  155. --
  156. -- Dumping data for table `goods_coupon_user`
  157. --
  158. LOCK TABLES `goods_coupon_user` WRITE;
  159. /*!40000 ALTER TABLE `goods_coupon_user` DISABLE KEYS */;
  160. /*!40000 ALTER TABLE `goods_coupon_user` ENABLE KEYS */;
  161. UNLOCK TABLES;
  162. --
  163. -- Table structure for table `goods_introduction`
  164. --
  165. DROP TABLE IF EXISTS `goods_introduction`;
  166. /*!40101 SET @saved_cs_client = @@character_set_client */;
  167. /*!40101 SET character_set_client = utf8 */;
  168. CREATE TABLE `goods_introduction` (
  169. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '文章id',
  170. `goods_article_name` varchar(255) DEFAULT NULL COMMENT '商品文章名',
  171. `goods_article` longblob COMMENT '商品文章',
  172. `create_by` varchar(0) DEFAULT NULL COMMENT '创建人',
  173. `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  174. `update_by` varchar(255) DEFAULT NULL COMMENT '更新人',
  175. `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  176. PRIMARY KEY (`id`)
  177. ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='商品介绍';
  178. /*!40101 SET character_set_client = @saved_cs_client */;
  179. --
  180. -- Dumping data for table `goods_introduction`
  181. --
  182. LOCK TABLES `goods_introduction` WRITE;
  183. /*!40000 ALTER TABLE `goods_introduction` DISABLE KEYS */;
  184. INSERT INTO `goods_introduction` VALUES (1,'商品介绍',_binary '<div class=\"content\"><p style=\"text-wrap: wrap;\">声明:保护未成年健康,本平台禁止未成年消费</p><p style=\"text-wrap: wrap;\">一、直充说明</p><p style=\"text-wrap: wrap;\">【填写信息】UID直充</p><p style=\"text-wrap: wrap;\">【充值流程】输入UID,选择区服 → 下单支付 → 充值完成</p><p style=\"text-wrap: wrap;\">【充值时长】1~3分钟(高峰期可能晚几分钟)</p><p style=\"text-wrap: wrap;\">二、注意事项</p><p style=\"text-wrap: wrap;\">1.填错充值账号怎么办?能退款吗?</p><p style=\"text-wrap: wrap;\">如果我们按照您填写的信息已完成充值,那么将无法退还,如果因我平台导致充值错误,经核验后,可退还;若不影响二次销售的点卡类商品,联系在线客服可帮忙转卖,但等待时间不定。</p><p style=\"text-wrap: wrap;\">2.支付成功后多久能到账?</p><p style=\"text-wrap: wrap;\">一般情况下,1-2分钟内即可到账。如超过5分钟未到账请及时联系客服咨询</p><p style=\"text-wrap: wrap;\"><img src=\"https://files.kardz.cn/cms/image_$1702884899572057560_$1712557168223077827.png\"></p><div class=\"detail-main__StyledSupplementaryStatement-sc-1971otn-0 hfMgQN\"><span>*</span>本售后政策不叠加【随心换服务】<br>账号类商品:自购买日起售后期3天,商品质量问题免费更换<br>邮箱类商品:自购买日起3天内<br>卡密类商品:因卡密都是正规可囤,无售后期。(如有问题随时联系我们处理)<br>充值类商品:到账后无法售后<br></div><div class=\"desc\">购买说明:原神国际服直充 300+30 Genesis Crystals来自官方渠道,支持极速发货、错误包换,如有需要可关注<a title=\"原神手游(国际服)直充原神国际服直充 300+30 Genesis Crystals充值_原神手游(国际服)直充国际服充值-kardz官网\" href=\"http://kar.kardz.cc/detail/1578289602.html\">http://kar.kardz.cc/detail/1578289602.html</a></div></div>',NULL,NULL,NULL,NULL),(2,'懒得介绍',_binary '<p>666</p>',NULL,NULL,NULL,NULL);
  185. /*!40000 ALTER TABLE `goods_introduction` ENABLE KEYS */;
  186. UNLOCK TABLES;
  187. --
  188. -- Table structure for table `goods_order`
  189. --
  190. DROP TABLE IF EXISTS `goods_order`;
  191. /*!40101 SET @saved_cs_client = @@character_set_client */;
  192. /*!40101 SET character_set_client = utf8 */;
  193. CREATE TABLE `goods_order` (
  194. `id` int(11) NOT NULL COMMENT 'id',
  195. `create_by` int(255) DEFAULT NULL COMMENT '用户id',
  196. `order_name` varchar(255) DEFAULT NULL COMMENT '订单名',
  197. `sku_id` int(11) DEFAULT NULL COMMENT 'skuid',
  198. `count` int(11) DEFAULT NULL COMMENT '购买数量',
  199. `price` decimal(10,2) DEFAULT NULL COMMENT '单价',
  200. `total_price` decimal(10,2) DEFAULT NULL COMMENT '总价',
  201. `coupon_user_id` int(11) DEFAULT NULL COMMENT '使用的优惠券',
  202. PRIMARY KEY (`id`)
  203. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  204. /*!40101 SET character_set_client = @saved_cs_client */;
  205. --
  206. -- Dumping data for table `goods_order`
  207. --
  208. LOCK TABLES `goods_order` WRITE;
  209. /*!40000 ALTER TABLE `goods_order` DISABLE KEYS */;
  210. /*!40000 ALTER TABLE `goods_order` ENABLE KEYS */;
  211. UNLOCK TABLES;
  212. --
  213. -- Table structure for table `goods_sku`
  214. --
  215. DROP TABLE IF EXISTS `goods_sku`;
  216. /*!40101 SET @saved_cs_client = @@character_set_client */;
  217. /*!40101 SET character_set_client = utf8 */;
  218. CREATE TABLE `goods_sku` (
  219. `id` int(11) NOT NULL AUTO_INCREMENT,
  220. `sku_image` varchar(255) DEFAULT NULL COMMENT 'sku图片',
  221. `sku_name` varchar(255) NOT NULL COMMENT '商品sku名字',
  222. `price` decimal(10,2) NOT NULL COMMENT '现在价格',
  223. `historical_prices` decimal(10,2) NOT NULL COMMENT '历史价格',
  224. `inventory_number` int(11) NOT NULL COMMENT '库存',
  225. `commodity_area_id` int(11) NOT NULL COMMENT '属地id',
  226. `goods_id` int(11) NOT NULL COMMENT '商品id',
  227. `create_by` varchar(255) DEFAULT NULL COMMENT '创建人',
  228. `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  229. PRIMARY KEY (`id`) USING BTREE
  230. ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
  231. /*!40101 SET character_set_client = @saved_cs_client */;
  232. --
  233. -- Dumping data for table `goods_sku`
  234. --
  235. LOCK TABLES `goods_sku` WRITE;
  236. /*!40000 ALTER TABLE `goods_sku` DISABLE KEYS */;
  237. INSERT INTO `goods_sku` VALUES (1,'/api/static/20240423094145微信图片_20240416170543.jpg','特惠包1【苹果礼品卡3美金+精品账号】',36.00,36.00,50,1,1,NULL,NULL),(2,'/api/static/20240423094145微信图片_20240416170543.jpg','特惠包2【苹果礼品卡5美金+精品账号】',52.00,58.80,50,1,1,NULL,NULL),(3,'/api/static/202404231412462.jpg','特惠包3【苹果礼品卡3美金+5美金】',75.00,67.00,50,1,1,NULL,NULL),(4,'/api/static/20240423094145微信图片_20240416170543.jpg','特惠包2【苹果礼品卡500日元+精美账号】',48.00,55.00,50,2,1,NULL,NULL),(5,'/api/static/20240423094145微信图片_20240416170543.jpg','特惠包1【苹果礼品卡150港元+200港元】',381.00,384.00,50,3,1,NULL,NULL),(6,'/api/static/20240423094145微信图片_20240416170543.jpg','特惠包1【苹果礼品卡100NT+300NT】',135.00,139.00,50,4,1,NULL,NULL),(7,'/api/static/20240423094145微信图片_20240416170543.jpg','PUBG国际服(地铁逃生)直充-300+25UC',37.39,41.00,50,0,2,NULL,NULL);
  238. /*!40000 ALTER TABLE `goods_sku` ENABLE KEYS */;
  239. UNLOCK TABLES;
  240. --
  241. -- Table structure for table `goods_tag`
  242. --
  243. DROP TABLE IF EXISTS `goods_tag`;
  244. /*!40101 SET @saved_cs_client = @@character_set_client */;
  245. /*!40101 SET character_set_client = utf8 */;
  246. CREATE TABLE `goods_tag` (
  247. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  248. `name` varchar(255) DEFAULT NULL COMMENT '名字',
  249. `icon_url` varchar(255) DEFAULT NULL COMMENT '图标路径',
  250. `tag` varchar(255) DEFAULT NULL COMMENT '标签',
  251. PRIMARY KEY (`id`)
  252. ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
  253. /*!40101 SET character_set_client = @saved_cs_client */;
  254. --
  255. -- Dumping data for table `goods_tag`
  256. --
  257. LOCK TABLES `goods_tag` WRITE;
  258. /*!40000 ALTER TABLE `goods_tag` DISABLE KEYS */;
  259. INSERT INTO `goods_tag` VALUES (1,'支持中文','/api/static/20240423094145微信图片_20240416170543.jpg','语言支持'),(2,'支持','','独立密码');
  260. /*!40000 ALTER TABLE `goods_tag` ENABLE KEYS */;
  261. UNLOCK TABLES;
  262. --
  263. -- Table structure for table `goods_topic`
  264. --
  265. DROP TABLE IF EXISTS `goods_topic`;
  266. /*!40101 SET @saved_cs_client = @@character_set_client */;
  267. /*!40101 SET character_set_client = utf8 */;
  268. CREATE TABLE `goods_topic` (
  269. `id` int(11) NOT NULL AUTO_INCREMENT,
  270. `topic_page_image` varchar(255) DEFAULT NULL COMMENT '主题首页图片',
  271. `topic_name` varchar(255) DEFAULT NULL COMMENT '主题名称',
  272. `topic_desc` varchar(255) DEFAULT NULL COMMENT '主题描述',
  273. `type_ids` varchar(255) DEFAULT NULL COMMENT '商品类型id',
  274. PRIMARY KEY (`id`)
  275. ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
  276. /*!40101 SET character_set_client = @saved_cs_client */;
  277. --
  278. -- Dumping data for table `goods_topic`
  279. --
  280. LOCK TABLES `goods_topic` WRITE;
  281. /*!40000 ALTER TABLE `goods_topic` DISABLE KEYS */;
  282. INSERT INTO `goods_topic` VALUES (1,NULL,'软件直充','软件在线充值,快速秒到账','1'),(2,NULL,'游戏充值','游戏在线充值,热门游戏尽在其中','2');
  283. /*!40000 ALTER TABLE `goods_topic` ENABLE KEYS */;
  284. UNLOCK TABLES;
  285. --
  286. -- Table structure for table `goods_type`
  287. --
  288. DROP TABLE IF EXISTS `goods_type`;
  289. /*!40101 SET @saved_cs_client = @@character_set_client */;
  290. /*!40101 SET character_set_client = utf8 */;
  291. CREATE TABLE `goods_type` (
  292. `id` int(11) NOT NULL AUTO_INCREMENT,
  293. `sort` int(11) DEFAULT NULL COMMENT '排序',
  294. `type_image` varchar(50) DEFAULT NULL COMMENT '类型图片',
  295. `type_name` varchar(255) NOT NULL COMMENT '商品类别名称',
  296. `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  297. PRIMARY KEY (`id`) USING BTREE
  298. ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='商品分类';
  299. /*!40101 SET character_set_client = @saved_cs_client */;
  300. --
  301. -- Dumping data for table `goods_type`
  302. --
  303. LOCK TABLES `goods_type` WRITE;
  304. /*!40000 ALTER TABLE `goods_type` DISABLE KEYS */;
  305. INSERT INTO `goods_type` VALUES (1,NULL,NULL,'礼品卡',NULL),(2,NULL,NULL,'海外直冲',NULL);
  306. /*!40000 ALTER TABLE `goods_type` ENABLE KEYS */;
  307. UNLOCK TABLES;
  308. --
  309. -- Table structure for table `role`
  310. --
  311. DROP TABLE IF EXISTS `role`;
  312. /*!40101 SET @saved_cs_client = @@character_set_client */;
  313. /*!40101 SET character_set_client = utf8 */;
  314. CREATE TABLE `role` (
  315. `id` int(11) NOT NULL AUTO_INCREMENT,
  316. `role_name` varchar(255) DEFAULT NULL,
  317. PRIMARY KEY (`id`) USING BTREE
  318. ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
  319. /*!40101 SET character_set_client = @saved_cs_client */;
  320. --
  321. -- Dumping data for table `role`
  322. --
  323. LOCK TABLES `role` WRITE;
  324. /*!40000 ALTER TABLE `role` DISABLE KEYS */;
  325. INSERT INTO `role` VALUES (1,'超级管理员'),(2,'普通用户');
  326. /*!40000 ALTER TABLE `role` ENABLE KEYS */;
  327. UNLOCK TABLES;
  328. --
  329. -- Table structure for table `role_authority`
  330. --
  331. DROP TABLE IF EXISTS `role_authority`;
  332. /*!40101 SET @saved_cs_client = @@character_set_client */;
  333. /*!40101 SET character_set_client = utf8 */;
  334. CREATE TABLE `role_authority` (
  335. `authority_id` int(11) NOT NULL,
  336. `role_id` int(11) NOT NULL,
  337. PRIMARY KEY (`authority_id`) USING BTREE
  338. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
  339. /*!40101 SET character_set_client = @saved_cs_client */;
  340. --
  341. -- Dumping data for table `role_authority`
  342. --
  343. LOCK TABLES `role_authority` WRITE;
  344. /*!40000 ALTER TABLE `role_authority` DISABLE KEYS */;
  345. INSERT INTO `role_authority` VALUES (1,1);
  346. /*!40000 ALTER TABLE `role_authority` ENABLE KEYS */;
  347. UNLOCK TABLES;
  348. --
  349. -- Table structure for table `user`
  350. --
  351. DROP TABLE IF EXISTS `user`;
  352. /*!40101 SET @saved_cs_client = @@character_set_client */;
  353. /*!40101 SET character_set_client = utf8 */;
  354. CREATE TABLE `user` (
  355. `id` int(11) NOT NULL AUTO_INCREMENT,
  356. `username` varchar(255) DEFAULT NULL COMMENT '账号',
  357. `password` varchar(255) DEFAULT NULL COMMENT '密码',
  358. `creation_time` int(11) DEFAULT NULL COMMENT '账号创建时间',
  359. `login_time` int(11) DEFAULT NULL COMMENT '登录时间',
  360. `status` varchar(255) DEFAULT NULL COMMENT '账号状态',
  361. `role_id` int(11) DEFAULT NULL COMMENT '角色id',
  362. `phone` varchar(255) DEFAULT NULL COMMENT '手机',
  363. `email` varchar(255) DEFAULT NULL COMMENT '邮箱',
  364. `name` varchar(255) DEFAULT NULL COMMENT '用户名',
  365. `avatar` varchar(255) DEFAULT NULL COMMENT '头像',
  366. `recommend_code` varchar(255) DEFAULT NULL COMMENT '推荐码',
  367. PRIMARY KEY (`id`) USING BTREE,
  368. KEY `usernames` (`username`) USING BTREE COMMENT '用户名'
  369. ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
  370. /*!40101 SET character_set_client = @saved_cs_client */;
  371. --
  372. -- Dumping data for table `user`
  373. --
  374. LOCK TABLES `user` WRITE;
  375. /*!40000 ALTER TABLE `user` DISABLE KEYS */;
  376. INSERT INTO `user` VALUES (1,'516702882@qq.com','37bcf5e351f329952fb347edc09f31a1',1711168151,NULL,'0',1,'15537351020','516702882@qq.com','大名鼎鼎',NULL,NULL),(2,'875182750@qq.com','37bcf5e351f329952fb347edc09f31a1',1711168151,NULL,'0',2,'13233826561','875182750@qq.com',NULL,NULL,NULL),(7,'123@qq.com','123123',1714287720,0,'0',2,'13642531323','123@qq.com','123@qq.com','','662df46810151761019911310251106102818984');
  377. /*!40000 ALTER TABLE `user` ENABLE KEYS */;
  378. UNLOCK TABLES;
  379. --
  380. -- Table structure for table `user_wallet`
  381. --
  382. DROP TABLE IF EXISTS `user_wallet`;
  383. /*!40101 SET @saved_cs_client = @@character_set_client */;
  384. /*!40101 SET character_set_client = utf8 */;
  385. CREATE TABLE `user_wallet` (
  386. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  387. `user_id` int(11) DEFAULT NULL COMMENT '用户id',
  388. `balance` decimal(65,0) DEFAULT NULL COMMENT '余额',
  389. `promotion_amount` decimal(20,2) DEFAULT NULL COMMENT '推广获取总金额',
  390. `recharge_amount` decimal(20,2) DEFAULT NULL COMMENT '充值金额',
  391. PRIMARY KEY (`id`),
  392. KEY `user` (`user_id`),
  393. CONSTRAINT `user` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
  394. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  395. /*!40101 SET character_set_client = @saved_cs_client */;
  396. --
  397. -- Dumping data for table `user_wallet`
  398. --
  399. LOCK TABLES `user_wallet` WRITE;
  400. /*!40000 ALTER TABLE `user_wallet` DISABLE KEYS */;
  401. /*!40000 ALTER TABLE `user_wallet` ENABLE KEYS */;
  402. UNLOCK TABLES;
  403. /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
  404. /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
  405. /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
  406. /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
  407. /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  408. /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  409. /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
  410. /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
  411. -- Dump completed on 2024-04-29 17:15:57