/*
 Navicat Premium Data Transfer

 Source Server         : localhost MySQL 5.7
 Source Server Type    : MySQL
 Source Server Version : 50726
 Source Host           : localhost:3306
 Source Schema         : flashsale

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

 Date: 05/03/2022 12:39:01
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for item_info
-- ----------------------------
DROP TABLE IF EXISTS `item_info`;
CREATE TABLE `item_info`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `price` decimal(10, 2) NOT NULL DEFAULT 0.00,
  `description` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `sales` int(11) NOT NULL DEFAULT 0,
  `img_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 16 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of item_info
-- ----------------------------
INSERT INTO `item_info` VALUES (1, 'item-h7p0wt-22680', 22.00, '0sddhs4aeowc26638j5fp2ox', 0, 'https://ns-strategy.cdn.bcebos.com/ns-strategy/upload/fc_big_pic/part-00015-3050.jpg');
INSERT INTO `item_info` VALUES (2, '电视机', 1800.00, '一台电视机', 0, 'https://ns-strategy.cdn.bcebos.com/ns-strategy/upload/fc_big_pic/part-00015-3050.jpg');
INSERT INTO `item_info` VALUES (3, '电冰箱', 2800.00, '一台电冰箱', 0, 'https://ns-strategy.cdn.bcebos.com/ns-strategy/upload/fc_big_pic/part-00015-3050.jpg');
INSERT INTO `item_info` VALUES (4, '空调', 3600.00, '一台空调', 0, 'https://ns-strategy.cdn.bcebos.com/ns-strategy/upload/fc_big_pic/part-00015-3050.jpg');
INSERT INTO `item_info` VALUES (5, '小米手机', 2235.00, 'lsudsf67ghobos3q1olbwx27', 0, 'https://ss0.baidu.com/7Po3dSag_xI4khGko9WTAnF6hhy/image/h%3D300/sign=edc83f8851f431ada3d245397b37ac0f/d058ccbf6c81800a46a75314ec3533fa828b476e.jpg');
INSERT INTO `item_info` VALUES (6, 'item-wlx9gu-1220', 270.00, '3q234qqp3wwo53mtdv0qjuvg', 0, 'https://ns-strategy.cdn.bcebos.com/ns-strategy/upload/fc_big_pic/part-00015-3050.jpg');
INSERT INTO `item_info` VALUES (7, 'item-cqru11-3487', 259.00, '04q6lopvj3ubb4458k4wldok', 0, 'https://ns-strategy.cdn.bcebos.com/ns-strategy/upload/fc_big_pic/part-00015-3050.jpg');
INSERT INTO `item_info` VALUES (8, 'item-7f7qa1-5168', 314.00, 'jqkgc5ks2r9e2k8za3zs9rlc', 0, 'https://ns-strategy.cdn.bcebos.com/ns-strategy/upload/fc_big_pic/part-00015-3050.jpg');
INSERT INTO `item_info` VALUES (9, 'item-i8flrb-7649', 129.00, 'i0m9w2x5w4gugeq7hlyp8nqx', 0, 'https://ns-strategy.cdn.bcebos.com/ns-strategy/upload/fc_big_pic/part-00015-3050.jpg');
INSERT INTO `item_info` VALUES (10, 'item-epo4p3-8545', 40.00, 'x71zeodg46ziiid7pgfag4bc', 0, 'https://ns-strategy.cdn.bcebos.com/ns-strategy/upload/fc_big_pic/part-00015-3050.jpg');
INSERT INTO `item_info` VALUES (11, 'item-o7iiuj-1056', 322.00, 'fm3r99ko038jbfhy5cg7kwp8', 0, 'https://ns-strategy.cdn.bcebos.com/ns-strategy/upload/fc_big_pic/part-00015-3050.jpg');
INSERT INTO `item_info` VALUES (12, 'item-fi7q7p-11366', 24.00, '18e54me0cdbqt8n9mxjnisf8', 0, 'https://ns-strategy.cdn.bcebos.com/ns-strategy/upload/fc_big_pic/part-00015-3050.jpg');
INSERT INTO `item_info` VALUES (13, 'item-9lwcps-12165', 9.00, 'hlxnhcfak89wengpsnehgtqs', 0, 'https://ns-strategy.cdn.bcebos.com/ns-strategy/upload/fc_big_pic/part-00015-3050.jpg');
INSERT INTO `item_info` VALUES (14, 'item-pgdbqk-12664', 151.00, 'irydvab5wixg59c7scgt50yh', 0, 'https://ns-strategy.cdn.bcebos.com/ns-strategy/upload/fc_big_pic/part-00015-3050.jpg');
INSERT INTO `item_info` VALUES (15, 'item-0lq98b-13424', 164.00, 'vwz4rsb4qhsnjs3phos35415', 0, 'https://ns-strategy.cdn.bcebos.com/ns-strategy/upload/fc_big_pic/part-00015-3050.jpg');

-- ----------------------------
-- Table structure for item_stock
-- ----------------------------
DROP TABLE IF EXISTS `item_stock`;
CREATE TABLE `item_stock`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `stock` int(11) NOT NULL,
  `item_id` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `item_id`(`item_id`) USING BTREE,
  CONSTRAINT `item_stock_ibfk_1` FOREIGN KEY (`item_id`) REFERENCES `item_info` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 16 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of item_stock
-- ----------------------------
INSERT INTO `item_stock` VALUES (1, 140, 1);
INSERT INTO `item_stock` VALUES (2, 876, 2);
INSERT INTO `item_stock` VALUES (3, 876, 3);
INSERT INTO `item_stock` VALUES (4, 87, 4);
INSERT INTO `item_stock` VALUES (5, 909, 5);
INSERT INTO `item_stock` VALUES (6, 960, 6);
INSERT INTO `item_stock` VALUES (7, 511, 7);
INSERT INTO `item_stock` VALUES (8, 444, 8);
INSERT INTO `item_stock` VALUES (9, 116, 9);
INSERT INTO `item_stock` VALUES (10, 93, 10);
INSERT INTO `item_stock` VALUES (11, 943, 11);
INSERT INTO `item_stock` VALUES (12, 917, 12);
INSERT INTO `item_stock` VALUES (13, 351, 13);
INSERT INTO `item_stock` VALUES (14, 117, 14);
INSERT INTO `item_stock` VALUES (15, 34, 15);

-- ----------------------------
-- Table structure for order_info
-- ----------------------------
DROP TABLE IF EXISTS `order_info`;
CREATE TABLE `order_info`  (
  `id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL DEFAULT 0,
  `item_id` int(11) NOT NULL,
  `item_price` decimal(10, 2) NOT NULL,
  `amount` int(255) NOT NULL,
  `order_price` decimal(10, 2) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of order_info
-- ----------------------------

-- ----------------------------
-- Table structure for promo_info
-- ----------------------------
DROP TABLE IF EXISTS `promo_info`;
CREATE TABLE `promo_info`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `promo_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `start_date` datetime NOT NULL DEFAULT '0000-01-01 00:00:00',
  `item_id` int(11) NOT NULL DEFAULT 0,
  `prome_item_price` decimal(10, 2) NOT NULL DEFAULT 0.00,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `item_id`(`item_id`) USING BTREE,
  CONSTRAINT `promo_info_ibfk_1` FOREIGN KEY (`item_id`) REFERENCES `item_info` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of promo_info
-- ----------------------------
INSERT INTO `promo_info` VALUES (1, '小米手机抢购活动', '2022-03-05 14:00:00', 1, 1999.00);

-- ----------------------------
-- Table structure for sequence_info
-- ----------------------------
DROP TABLE IF EXISTS `sequence_info`;
CREATE TABLE `sequence_info`  (
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `current_value` int(11) NOT NULL DEFAULT 0,
  `step` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`name`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of sequence_info
-- ----------------------------
INSERT INTO `sequence_info` VALUES ('order_info', 0, 1);

-- ----------------------------
-- Table structure for user_info
-- ----------------------------
DROP TABLE IF EXISTS `user_info`;
CREATE TABLE `user_info`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `gender` tinyint(4) NOT NULL DEFAULT 0 COMMENT '1代表男性，2代表女性',
  `age` int(11) NOT NULL DEFAULT 0,
  `telephone` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `register_mode` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '通过手机号注册，通过微信注册，通过支付宝注册',
  `third_party_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `telephone_unique_index`(`telephone`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of user_info
-- ----------------------------
INSERT INTO `user_info` VALUES (1, 'admin', 2, 18, '110', 'phone', '');
INSERT INTO `user_info` VALUES (2, 'user-1wk6xq-59489', 1, 49, '18900000001', 'phone', '');

-- ----------------------------
-- Table structure for user_password
-- ----------------------------
DROP TABLE IF EXISTS `user_password`;
CREATE TABLE `user_password`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `encrypt_password` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `user_id` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `user_id`(`user_id`) USING BTREE,
  CONSTRAINT `user_password_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `user_info` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of user_password
-- ----------------------------
INSERT INTO `user_password` VALUES (1, '21232f297a57a5a743894a0e4a801fc3', 1);
INSERT INTO `user_password` VALUES (2, 'bnW2mQTNe40qWH3b5atFWw==', 2);

SET FOREIGN_KEY_CHECKS = 1;
