/*
 Navicat Premium Data Transfer

 Source Server         : 127.0.0.1
 Source Server Type    : MySQL
 Source Server Version : 50743
 Source Host           : 127.0.0.1:3306
 Source Schema         : virtual_mall

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

 Date: 06/05/2024 09:59:25
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for article
-- ----------------------------
DROP TABLE IF EXISTS `article`;
CREATE TABLE `article`  (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `article_title` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文章名称',
  `artice_content` longblob NULL COMMENT '文章内容',
  `state` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '状态',
  `artice_tag_ids` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文章标签',
  `artice_topic_id` int(11) NULL DEFAULT NULL COMMENT '文章主题id',
  `image` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图片',
  `publish_time` datetime(0) NULL DEFAULT NULL COMMENT '发表时间',
  `eye_fill` int(11) NULL DEFAULT NULL COMMENT '浏览量',
  `like_count` int(255) NULL DEFAULT NULL COMMENT '点赞量',
  `create_by` varchar(255) 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 = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for article_tag
-- ----------------------------
DROP TABLE IF EXISTS `article_tag`;
CREATE TABLE `article_tag`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `tag_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '标签名',
  `tag_desc` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '标签描述',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for article_topic
-- ----------------------------
DROP TABLE IF EXISTS `article_topic`;
CREATE TABLE `article_topic`  (
  `id` int(11) NOT NULL,
  `image` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '图片',
  `topic_name` 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 '主题描述',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- 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` int(255) 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, 2);
INSERT INTO `goods_commodity_area` VALUES (3, 1, '香港', NULL, 1);
INSERT INTO `goods_commodity_area` VALUES (4, 1, '台湾', NULL, 1);

-- ----------------------------
-- Table structure for goods_coupon
-- ----------------------------
DROP TABLE IF EXISTS `goods_coupon`;
CREATE TABLE `goods_coupon`  (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `coupon_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '优惠券名称',
  `coupon_desc` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '优惠券描述',
  `cash_back_point` decimal(11, 2) NULL DEFAULT NULL COMMENT '满x',
  `cash_back_price` decimal(11, 2) NULL DEFAULT NULL COMMENT '减x',
  `condition_by_topic` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '主题可用，id',
  `condition_by_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '类型可用，id',
  `condition_by_goods` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '商品可用，id',
  `grant_count` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '发放数量',
  `count` int(255) NULL DEFAULT NULL COMMENT '优惠券余量',
  `receive_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '领取条件',
  `validity` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '有效性，领取开始计时(ClaimTiming)，固定时间(FixedTime)',
  `validity_period` 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_coupon
-- ----------------------------
INSERT INTO `goods_coupon` VALUES (1, '全场优惠', '满10减1', 10.00, 1.00, NULL, NULL, NULL, NULL, 50, NULL, 'ClaimTiming', '2024-05-05 17:09:19');

-- ----------------------------
-- Table structure for goods_coupon_user
-- ----------------------------
DROP TABLE IF EXISTS `goods_coupon_user`;
CREATE TABLE `goods_coupon_user`  (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `user_id` int(11) NULL DEFAULT NULL COMMENT '用户id',
  `coupon_id` int(11) NULL DEFAULT NULL COMMENT '优惠券id',
  `collection_time` datetime(0) NULL DEFAULT NULL COMMENT '领取时间',
  `state` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '1' COMMENT '状态，已使用2，未使用1，已过期0',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '优惠券领取' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of goods_coupon_user
-- ----------------------------
INSERT INTO `goods_coupon_user` VALUES (1, 1, 1, '2024-05-05 16:30:25', '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 = 3 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);
INSERT INTO `goods_introduction` VALUES (2, '懒得介绍', 0x3C703E3636363C2F703E, NULL, NULL, NULL, NULL);

-- ----------------------------
-- Table structure for goods_order
-- ----------------------------
DROP TABLE IF EXISTS `goods_order`;
CREATE TABLE `goods_order`  (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `order_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '订单名',
  `sku_id` int(11) NULL DEFAULT NULL COMMENT 'skuid',
  `count` int(11) NULL DEFAULT NULL COMMENT '购买数量',
  `price` decimal(10, 2) NULL DEFAULT NULL COMMENT '单价',
  `total_price` decimal(10, 2) NULL DEFAULT NULL COMMENT '总价',
  `contact_information` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '联系方式',
  `coupon_user_id` int(11) NULL DEFAULT NULL COMMENT '使用的优惠券',
  `state` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '支付状态，0待支付，1待发货，2已发货，3订单完成，4订单异常',
  `create_by` int(255) NULL DEFAULT NULL COMMENT '用户id',
  `create_time` datetime(0) NULL DEFAULT NULL COMMENT '订单创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 19 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of goods_order
-- ----------------------------
INSERT INTO `goods_order` VALUES (1, '特惠包1【苹果礼品卡3美金+精品账号】【x1】', 1, 1, 36.00, 36.00, '', 0, '0', 1, '2024-05-04 14:08:31');
INSERT INTO `goods_order` VALUES (2, '特惠包1【苹果礼品卡3美金+精品账号】【x1】', 1, 1, 36.00, 36.00, '', 0, '1', 1, '2024-05-04 22:01:55');
INSERT INTO `goods_order` VALUES (3, '特惠包1【苹果礼品卡3美金+精品账号】【x1】', 1, 1, 36.00, 36.00, '', 0, '2', 1, '2024-05-04 22:01:55');
INSERT INTO `goods_order` VALUES (4, '特惠包1【苹果礼品卡3美金+精品账号】【x1】', 1, 1, 36.00, 36.00, '', 0, '3', 1, '2024-05-04 22:01:55');
INSERT INTO `goods_order` VALUES (5, '特惠包1【苹果礼品卡3美金+精品账号】【x1】', 1, 1, 36.00, 36.00, '', 0, '0', 1, '2024-05-04 22:01:55');
INSERT INTO `goods_order` VALUES (6, '特惠包1【苹果礼品卡3美金+精品账号】【x1】', 1, 1, 36.00, 36.00, '', 0, '1', 1, '2024-05-04 22:01:55');
INSERT INTO `goods_order` VALUES (7, '特惠包1【苹果礼品卡3美金+精品账号】【x1】', 1, 1, 36.00, 36.00, '', 0, '0', 1, '2024-05-04 22:01:55');
INSERT INTO `goods_order` VALUES (8, '特惠包1【苹果礼品卡3美金+精品账号】【x1】', 1, 1, 36.00, 36.00, '', 0, '0', 1, '2024-05-04 22:01:55');
INSERT INTO `goods_order` VALUES (9, '特惠包1【苹果礼品卡3美金+精品账号】【x1】', 1, 1, 36.00, 36.00, '', 0, '4', 1, '2024-05-04 22:01:55');
INSERT INTO `goods_order` VALUES (10, '特惠包1【苹果礼品卡3美金+精品账号】【x1】', 1, 1, 36.00, 36.00, '', 0, '1', 1, '2024-05-04 22:01:55');
INSERT INTO `goods_order` VALUES (11, '特惠包1【苹果礼品卡3美金+精品账号】【x1】', 1, 1, 36.00, 36.00, '', 0, '0', 1, '2024-05-04 22:01:55');
INSERT INTO `goods_order` VALUES (12, '特惠包1【苹果礼品卡3美金+精品账号】【x1】', 1, 1, 36.00, 36.00, '', 0, '2', 1, '2024-05-04 22:01:55');
INSERT INTO `goods_order` VALUES (13, '特惠包1【苹果礼品卡3美金+精品账号】【x1】', 1, 1, 36.00, 36.00, '', 0, '0', 1, '2024-05-04 22:01:55');
INSERT INTO `goods_order` VALUES (14, '特惠包1【苹果礼品卡3美金+精品账号】【x1】', 1, 1, 36.00, 36.00, '', 0, '0', 1, '2024-05-04 22:01:55');
INSERT INTO `goods_order` VALUES (15, '特惠包1【苹果礼品卡3美金+精品账号】【x1】', 1, 1, 36.00, 36.00, '', 0, '0', 1, '2024-05-04 22:01:55');
INSERT INTO `goods_order` VALUES (16, '特惠包1【苹果礼品卡3美金+精品账号】【x1】', 1, 1, 36.00, 36.00, '', 0, '2', 1, '2024-05-04 22:01:55');
INSERT INTO `goods_order` VALUES (17, '特惠包1【苹果礼品卡3美金+精品账号】【x1】', 1, 1, 36.00, 36.00, '', 0, '0', 1, '2024-05-04 22:01:55');
INSERT INTO `goods_order` VALUES (18, '特惠包1【苹果礼品卡3美金+精品账号】【x1】', 1, 1, 36.00, 36.00, '', 0, '0', 1, '2024-05-04 22:01:55');

-- ----------------------------
-- 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, '/api/static/20240423094145微信图片_20240416170543.jpg', '特惠包1【苹果礼品卡3美金+精品账号】', 36.00, 36.00, 50, 1, 1, NULL, NULL);
INSERT INTO `goods_sku` VALUES (2, '/api/static/20240423094145微信图片_20240416170543.jpg', '特惠包2【苹果礼品卡5美金+精品账号】', 52.00, 58.80, 50, 1, 1, NULL, NULL);
INSERT INTO `goods_sku` VALUES (3, '/api/static/202404231412462.jpg', '特惠包3【苹果礼品卡3美金+5美金】', 75.00, 67.00, 50, 1, 1, NULL, NULL);
INSERT INTO `goods_sku` VALUES (4, '/api/static/20240423094145微信图片_20240416170543.jpg', '特惠包2【苹果礼品卡500日元+精美账号】', 48.00, 55.00, 50, 2, 1, NULL, NULL);
INSERT INTO `goods_sku` VALUES (5, '/api/static/20240423094145微信图片_20240416170543.jpg', '特惠包1【苹果礼品卡150港元+200港元】', 381.00, 384.00, 50, 3, 1, NULL, NULL);
INSERT INTO `goods_sku` VALUES (6, '/api/static/20240423094145微信图片_20240416170543.jpg', '特惠包1【苹果礼品卡100NT+300NT】', 135.00, 139.00, 50, 4, 1, NULL, NULL);
INSERT INTO `goods_sku` VALUES (7, '/api/static/20240423094145微信图片_20240416170543.jpg', 'PUBG国际服(地铁逃生)直充-300+25UC', 37.39, 41.00, 50, 0, 2, NULL, NULL);

-- ----------------------------
-- Table structure for goods_sku_card
-- ----------------------------
DROP TABLE IF EXISTS `goods_sku_card`;
CREATE TABLE `goods_sku_card`  (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `card_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '卡种名称',
  `state` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '状态，0未使用，1已用，2过期',
  `count` int(11) NULL DEFAULT NULL COMMENT '库存',
  `total_count` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '总数',
  `card_key` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '卡密',
  `use` varchar(5) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '是否已用',
  `upload_time` datetime(0) NULL DEFAULT NULL COMMENT '入库时间',
  `sku_id` int(11) NULL DEFAULT NULL COMMENT '商品规格绑定',
  `sort` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '排序，出售优先级',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- 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, '支持中文', '/api/static/20240423094145微信图片_20240416170543.jpg', '语言支持');
INSERT INTO `goods_tag` VALUES (2, '支持', '', '独立密码');

-- ----------------------------
-- Table structure for goods_topic
-- ----------------------------
DROP TABLE IF EXISTS `goods_topic`;
CREATE TABLE `goods_topic`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `topic_page_image` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '主题首页图片',
  `topic_name` 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 '主题描述',
  `type_ids` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '商品类型id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of goods_topic
-- ----------------------------
INSERT INTO `goods_topic` VALUES (1, NULL, '软件直充', '软件在线充值，快速秒到账', '1');
INSERT INTO `goods_topic` VALUES (2, NULL, '游戏充值', '游戏在线充值，热门游戏尽在其中', '2');

-- ----------------------------
-- 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_image` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci 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, '礼品卡', NULL);
INSERT INTO `goods_type` VALUES (2, NULL, NULL, '海外直冲', NULL);

-- ----------------------------
-- Table structure for manage_user
-- ----------------------------
DROP TABLE IF EXISTS `manage_user`;
CREATE TABLE `manage_user`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '名称',
  `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 '手机',
  `email` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '邮箱',
  `avatar` 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 = 8 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of manage_user
-- ----------------------------
INSERT INTO `manage_user` VALUES (1, '大名鼎鼎', 'admin', '4fef88243e8e49e90007fdfe2df0e53f', NULL, 0, '1', 1, '13123456789', '516702882@qq.com', 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 '手机',
  `email` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '邮箱',
  `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户名',
  `avatar` 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 = 8 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of user
-- ----------------------------
INSERT INTO `user` VALUES (1, '516702882@qq.com', '37bcf5e351f329952fb347edc09f31a1', 1711168151, NULL, '0', 1, '15537351020', '516702882@qq.com', '666119', NULL, '20231');
INSERT INTO `user` VALUES (2, '875182750@qq.com', '37bcf5e351f329952fb347edc09f31a1', 1711168151, NULL, '0', 2, '13233826561', '875182750@qq.com', NULL, NULL, '91966');
INSERT INTO `user` VALUES (7, '123@qq.com', '123123', 1714287720, 0, '0', 2, '13642531323', '123@qq.com', '123@qq.com', '', '662df46810151761019911310251106102818984');

-- ----------------------------
-- Table structure for user_wallet
-- ----------------------------
DROP TABLE IF EXISTS `user_wallet`;
CREATE TABLE `user_wallet`  (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `user_id` int(11) NULL DEFAULT NULL COMMENT '用户id',
  `balance` decimal(65, 0) NULL DEFAULT 0 COMMENT '余额',
  `promotion_amount` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '推广获取总金额',
  `recharge_amount` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '充值金额',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `user`(`user_id`) USING BTREE,
  CONSTRAINT `user` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of user_wallet
-- ----------------------------
INSERT INTO `user_wallet` VALUES (1, 1, 0, 0.00, 0.00);

SET FOREIGN_KEY_CHECKS = 1;
