2022-03-01 15:21:38 +08:00
|
|
|
|
/*
|
|
|
|
|
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
|
|
|
|
|
|
2022-03-03 15:31:44 +08:00
|
|
|
|
Date: 03/03/2022 15:29:13
|
2022-03-01 15:21:38 +08:00
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
SET NAMES utf8mb4;
|
|
|
|
|
SET FOREIGN_KEY_CHECKS = 0;
|
|
|
|
|
|
2022-03-03 13:01:50 +08:00
|
|
|
|
-- ----------------------------
|
|
|
|
|
-- 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,
|
2022-03-03 13:14:44 +08:00
|
|
|
|
`price` decimal(10, 2) NOT NULL DEFAULT 0.00,
|
2022-03-03 13:01:50 +08:00
|
|
|
|
`description` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
|
2022-03-03 15:31:44 +08:00
|
|
|
|
`sales` int(11) NOT NULL DEFAULT 0,
|
2022-03-03 13:01:50 +08:00
|
|
|
|
`img_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
|
|
|
|
PRIMARY KEY (`id`) USING BTREE
|
2022-03-03 15:31:44 +08:00
|
|
|
|
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;
|
2022-03-03 13:01:50 +08:00
|
|
|
|
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
-- Records of item_info
|
|
|
|
|
-- ----------------------------
|
2022-03-03 15:31:44 +08:00
|
|
|
|
INSERT INTO `item_info` VALUES (1, 'item-h7p0wt-22680', 22.00, '0sddhs4aeowc26638j5fp2ox', 0, 'https://domain.com/pic/190ghi.jpg');
|
2022-03-03 13:01:50 +08:00
|
|
|
|
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
-- 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
|
2022-03-03 15:31:44 +08:00
|
|
|
|
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;
|
2022-03-03 13:01:50 +08:00
|
|
|
|
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
-- Records of item_stock
|
|
|
|
|
-- ----------------------------
|
2022-03-03 15:31:44 +08:00
|
|
|
|
INSERT INTO `item_stock` VALUES (1, 140, 1);
|
2022-03-03 13:01:50 +08:00
|
|
|
|
|
2022-03-01 15:21:38 +08:00
|
|
|
|
-- ----------------------------
|
|
|
|
|
-- 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 '',
|
2022-03-02 11:36:06 +08:00
|
|
|
|
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;
|
2022-03-01 15:21:38 +08:00
|
|
|
|
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
-- Records of user_info
|
|
|
|
|
-- ----------------------------
|
2022-03-01 17:17:29 +08:00
|
|
|
|
INSERT INTO `user_info` VALUES (1, 'admin', 2, 18, '110', 'phone', '');
|
2022-03-02 11:36:06 +08:00
|
|
|
|
INSERT INTO `user_info` VALUES (2, 'user-1wk6xq-59489', 1, 49, '18900000001', 'phone', '');
|
2022-03-01 15:21:38 +08:00
|
|
|
|
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
-- Table structure for user_password
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP TABLE IF EXISTS `user_password`;
|
|
|
|
|
CREATE TABLE `user_password` (
|
2022-03-02 11:28:19 +08:00
|
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
|
|
`encrypt_password` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
|
2022-03-01 15:21:38 +08:00
|
|
|
|
`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
|
2022-03-02 11:36:06 +08:00
|
|
|
|
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = DYNAMIC;
|
2022-03-01 15:21:38 +08:00
|
|
|
|
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
-- Records of user_password
|
|
|
|
|
-- ----------------------------
|
2022-03-01 17:17:29 +08:00
|
|
|
|
INSERT INTO `user_password` VALUES (1, '21232f297a57a5a743894a0e4a801fc3', 1);
|
2022-03-02 11:36:06 +08:00
|
|
|
|
INSERT INTO `user_password` VALUES (2, 'bnW2mQTNe40qWH3b5atFWw==', 2);
|
2022-03-01 15:21:38 +08:00
|
|
|
|
|
|
|
|
|
SET FOREIGN_KEY_CHECKS = 1;
|