/*
 Navicat Premium Data Transfer

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 50744
 Source Host           : localhost:3306
 Source Schema         : virtual_mall

 Target Server Type    : MySQL
 Target Server Version : 50744
 File Encoding         : 65001

 Date: 22/04/2024 17:27:04
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for authority
-- ----------------------------
DROP TABLE IF EXISTS `authority`;
CREATE TABLE `authority`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `authority_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `authority_path` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of authority
-- ----------------------------
INSERT INTO `authority` VALUES (1, '登录', '/api/ping');

-- ----------------------------
-- Table structure for goods
-- ----------------------------
DROP TABLE IF EXISTS `goods`;
CREATE TABLE `goods`  (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `type_id` int(11) NOT NULL COMMENT '分类id',
  `goods_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '商品名字',
  `introduction_id` int(11) NULL DEFAULT NULL COMMENT '商品介绍id',
  `sales_volume` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '近30天销量',
  `tag_ids` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '商品标签',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of goods
-- ----------------------------
INSERT INTO `goods` VALUES (1, 1, '苹果礼品卡特惠包', NULL, NULL, '1,2');
INSERT INTO `goods` VALUES (2, 2, 'PUBG国际服直充', NULL, NULL, NULL);

-- ----------------------------
-- Table structure for goods_commodity_area
-- ----------------------------
DROP TABLE IF EXISTS `goods_commodity_area`;
CREATE TABLE `goods_commodity_area`  (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `goods_id` int(11) NULL DEFAULT NULL COMMENT '商品id',
  `commodity_area_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '商品属地名称',
  `detail_image` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '详情图片',
  `detail_introduction_id` int(11) NULL DEFAULT NULL COMMENT '相关文本详情id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of goods_commodity_area
-- ----------------------------
INSERT INTO `goods_commodity_area` VALUES (1, 1, '美国', NULL, 1);
INSERT INTO `goods_commodity_area` VALUES (2, 1, '日本', NULL, 1);
INSERT INTO `goods_commodity_area` VALUES (3, 1, '香港', NULL, 1);
INSERT INTO `goods_commodity_area` VALUES (4, 1, '台湾', NULL, 1);

-- ----------------------------
-- Table structure for goods_introduction
-- ----------------------------
DROP TABLE IF EXISTS `goods_introduction`;
CREATE TABLE `goods_introduction`  (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '文章id',
  `goods_article_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '商品文章名',
  `goods_article` longblob NULL COMMENT '商品文章',
  `create_by` varchar(0) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商品介绍' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of goods_introduction
-- ----------------------------
INSERT INTO `goods_introduction` VALUES (1, '商品介绍', 0x3C64697620636C6173733D22636F6E74656E74223E3C70207374796C653D22746578742D777261703A20777261703B223EE5A3B0E6988EEFBC9AE4BF9DE68AA4E69CAAE68890E5B9B4E581A5E5BAB7EFBC8CE69CACE5B9B3E58FB0E7A681E6ADA2E69CAAE68890E5B9B4E6B688E8B4B93C2F703E3C70207374796C653D22746578742D777261703A20777261703B223EE4B880E38081E79BB4E58585E8AFB4E6988E3C2F703E3C70207374796C653D22746578742D777261703A20777261703B223EE38090E5A1ABE58699E4BFA1E681AFE38091554944E79BB4E585853C2F703E3C70207374796C653D22746578742D777261703A20777261703B223EE38090E58585E580BCE6B581E7A88BE38091E8BE93E585A5554944EFBC8CE98089E68BA9E58CBAE69C8D20E2869220E4B88BE58D95E694AFE4BB9820E2869220E58585E580BCE5AE8CE688903C2F703E3C70207374796C653D22746578742D777261703A20777261703B223EE38090E58585E580BCE697B6E995BFE38091317E33E58886E9929FEFBC88E9AB98E5B3B0E69C9FE58FAFE883BDE6999AE587A0E58886E9929FEFBC893C2F703E3C70207374796C653D22746578742D777261703A20777261703B223EE4BA8CE38081E6B3A8E6848FE4BA8BE9A1B93C2F703E3C70207374796C653D22746578742D777261703A20777261703B223E312EE5A1ABE99499E58585E580BCE8B4A6E58FB7E6808EE4B988E58A9EEFBC9FE883BDE98080E6ACBEE59097EFBC9F3C2F703E3C70207374796C653D22746578742D777261703A20777261703B223EE5A682E69E9CE68891E4BBACE68C89E785A7E682A8E5A1ABE58699E79A84E4BFA1E681AFE5B7B2E5AE8CE68890E58585E580BCEFBC8CE982A3E4B988E5B086E697A0E6B395E98080E8BF98EFBC8CE5A682E69E9CE59BA0E68891E5B9B3E58FB0E5AFBCE887B4E58585E580BCE99499E8AFAFEFBC8CE7BB8FE6A0B8E9AA8CE5908EEFBC8CE58FAFE98080E8BF98EFBC9BE88BA5E4B88DE5BDB1E5938DE4BA8CE6ACA1E99480E594AEE79A84E782B9E58DA1E7B1BBE59586E59381EFBC8CE88194E7B3BBE59CA8E7BABFE5AEA2E69C8DE58FAFE5B8AEE5BF99E8BDACE58D96EFBC8CE4BD86E7AD89E5BE85E697B6E997B4E4B88DE5AE9AE380823C2F703E3C70207374796C653D22746578742D777261703A20777261703B223E322EE694AFE4BB98E68890E58A9FE5908EE5A49AE4B985E883BDE588B0E8B4A6EFBC9F3C2F703E3C70207374796C653D22746578742D777261703A20777261703B223EE4B880E888ACE68385E586B5E4B88BEFBC8C312D32E58886E9929FE58685E58DB3E58FAFE588B0E8B4A6E38082E5A682E8B685E8BF8735E58886E9929FE69CAAE588B0E8B4A6E8AFB7E58F8AE697B6E88194E7B3BBE5AEA2E69C8DE592A8E8AFA23C2F703E3C70207374796C653D22746578742D777261703A20777261703B223E3C696D67207372633D2268747470733A2F2F66696C65732E6B6172647A2E636E2F636D732F696D6167655F24313730323838343839393537323035373536305F24313731323535373136383232333037373832372E706E67223E3C2F703E3C64697620636C6173733D2264657461696C2D6D61696E5F5F5374796C6564537570706C656D656E7461727953746174656D656E742D73632D313937316F746E2D302068664D67514E223E3C7370616E3E2A3C2F7370616E3EE69CACE594AEE5908EE694BFE7AD96E4B88DE58FA0E58AA0E38090E99A8FE5BF83E68DA2E69C8DE58AA1E380913C62723EE8B4A6E58FB7E7B1BBE59586E59381EFBC9AE887AAE8B4ADE4B9B0E697A5E8B5B7E594AEE5908EE69C9F33E5A4A9EFBC8CE59586E59381E8B4A8E9878FE997AEE9A298E5858DE8B4B9E69BB4E68DA23C62723EE982AEE7AEB1E7B1BBE59586E59381EFBC9AE887AAE8B4ADE4B9B0E697A5E8B5B733E5A4A9E586853C62723EE58DA1E5AF86E7B1BBE59586E59381EFBC9AE59BA0E58DA1E5AF86E983BDE698AFE6ADA3E8A784E58FAFE59BA4EFBC8CE697A0E594AEE5908EE69C9FE38082EFBC88E5A682E69C89E997AEE9A298E99A8FE697B6E88194E7B3BBE68891E4BBACE5A484E79086EFBC893C62723EE58585E580BCE7B1BBE59586E59381EFBC9AE588B0E8B4A6E5908EE697A0E6B395E594AEE5908E3C62723E3C2F6469763E3C64697620636C6173733D2264657363223EE8B4ADE4B9B0E8AFB4E6988EEFBC9AE58E9FE7A59EE59BBDE99985E69C8DE79BB4E58585203330302B33302047656E65736973204372797374616C73E69DA5E887AAE5AE98E696B9E6B8A0E98193EFBC8CE694AFE68C81E69E81E9809FE58F91E8B4A7E38081E99499E8AFAFE58C85E68DA2EFBC8CE5A682E69C89E99C80E8A681E58FAFE585B3E6B3A83C61207469746C653D22E58E9FE7A59EE6898BE6B8B8EFBC88E59BBDE99985E69C8DEFBC89E79BB4E58585E58E9FE7A59EE59BBDE99985E69C8DE79BB4E58585203330302B33302047656E65736973204372797374616C73E58585E580BC5FE58E9FE7A59EE6898BE6B8B8EFBC88E59BBDE99985E69C8DEFBC89E79BB4E58585E59BBDE99985E69C8DE58585E580BC2D6B6172647AE5AE98E7BD912220687265663D22687474703A2F2F6B61722E6B6172647A2E63632F64657461696C2F313537383238393630322E68746D6C223E687474703A2F2F6B61722E6B6172647A2E63632F64657461696C2F313537383238393630322E68746D6C3C2F613E3C2F6469763E3C2F6469763E, NULL, NULL, NULL, NULL);

-- ----------------------------
-- Table structure for goods_sku
-- ----------------------------
DROP TABLE IF EXISTS `goods_sku`;
CREATE TABLE `goods_sku`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `sku_image` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'sku图片',
  `sku_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '商品sku名字',
  `price` decimal(10, 2) NOT NULL COMMENT '现在价格',
  `historical_prices` decimal(10, 2) NOT NULL COMMENT '历史价格',
  `inventory_number` int(11) NOT NULL COMMENT '库存',
  `commodity_area_id` int(11) NOT NULL COMMENT '属地id',
  `goods_id` int(11) NOT NULL COMMENT '商品id',
  `create_by` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of goods_sku
-- ----------------------------
INSERT INTO `goods_sku` VALUES (1, NULL, '特惠包1【苹果礼品卡3美金+精品账号】', 36.00, 36.00, 50, 1, 1, NULL, NULL);
INSERT INTO `goods_sku` VALUES (2, NULL, '特惠包2【苹果礼品卡5美金+精品账号】', 52.00, 58.80, 50, 1, 1, NULL, NULL);
INSERT INTO `goods_sku` VALUES (3, NULL, '特惠包3【苹果礼品卡3美金+5美金】', 75.00, 67.00, 50, 1, 1, NULL, NULL);
INSERT INTO `goods_sku` VALUES (4, NULL, '特惠包2【苹果礼品卡500日元+精美账号】', 48.00, 55.00, 50, 2, 1, NULL, NULL);
INSERT INTO `goods_sku` VALUES (5, NULL, '特惠包1【苹果礼品卡150港元+200港元】', 381.00, 384.00, 50, 3, 1, NULL, NULL);
INSERT INTO `goods_sku` VALUES (6, NULL, '特惠包1【苹果礼品卡100NT+300NT】', 135.00, 139.00, 50, 4, 1, NULL, NULL);
INSERT INTO `goods_sku` VALUES (7, NULL, 'PUBG国际服(地铁逃生)直充-300+25UC', 37.39, 41.00, 50, 0, 2, NULL, NULL);

-- ----------------------------
-- Table structure for goods_tag
-- ----------------------------
DROP TABLE IF EXISTS `goods_tag`;
CREATE TABLE `goods_tag`  (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '名字',
  `icon_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图标路径',
  `tag` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '标签',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of goods_tag
-- ----------------------------
INSERT INTO `goods_tag` VALUES (1, '支持中文', NULL, '语言支持');
INSERT INTO `goods_tag` VALUES (2, '支持', NULL, '独立密码');

-- ----------------------------
-- Table structure for goods_topic
-- ----------------------------
DROP TABLE IF EXISTS `goods_topic`;
CREATE TABLE `goods_topic`  (
  `id` int(11) NOT NULL,
  `topic_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '主题名称',
  `topic_page_image` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '主题首页图片',
  `topic_desc` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '主题描述',
  `goods_ids` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '商品id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of goods_topic
-- ----------------------------

-- ----------------------------
-- Table structure for goods_type
-- ----------------------------
DROP TABLE IF EXISTS `goods_type`;
CREATE TABLE `goods_type`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `sort` int(11) NULL DEFAULT NULL COMMENT '排序',
  `type_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '商品类别名称',
  `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商品分类' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of goods_type
-- ----------------------------
INSERT INTO `goods_type` VALUES (1, NULL, '礼品卡', NULL);
INSERT INTO `goods_type` VALUES (2, NULL, '海外直冲', NULL);

-- ----------------------------
-- Table structure for role
-- ----------------------------
DROP TABLE IF EXISTS `role`;
CREATE TABLE `role`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `role_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of role
-- ----------------------------
INSERT INTO `role` VALUES (1, '超级管理员');
INSERT INTO `role` VALUES (2, '普通用户');

-- ----------------------------
-- Table structure for role_authority
-- ----------------------------
DROP TABLE IF EXISTS `role_authority`;
CREATE TABLE `role_authority`  (
  `authority_id` int(11) NOT NULL,
  `role_id` int(11) NOT NULL,
  PRIMARY KEY (`authority_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of role_authority
-- ----------------------------
INSERT INTO `role_authority` VALUES (1, 1);

-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '邮箱',
  `password` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '密码',
  `creation_time` int(11) NULL DEFAULT NULL COMMENT '账号创建时间',
  `login_time` int(11) NULL DEFAULT NULL COMMENT '登录时间',
  `status` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '账号状态',
  `role_id` int(11) NULL DEFAULT NULL COMMENT '角色id',
  `phone` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '手机',
  `recommend_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '推荐码',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `usernames`(`username`) USING BTREE COMMENT '用户名'
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of user
-- ----------------------------
INSERT INTO `user` VALUES (1, '516702882@qq.com', '8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92', 1711168151, NULL, '0', 1, '15537351020', NULL);
INSERT INTO `user` VALUES (2, '875182750@qq.com', '8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92', 1711168151, NULL, '0', 2, '13233826561', NULL);

SET FOREIGN_KEY_CHECKS = 1;
