代码拉取完成,页面将自动刷新
/*
Navicat Premium Data Transfer
Source Server : aa
Source Server Type : MySQL
Source Server Version : 50527
Source Host : localhost:3306
Source Schema : db_second_kill
Target Server Type : MySQL
Target Server Version : 50527
File Encoding : 65001
Date: 31/03/2020 21:24:34
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for item
-- ----------------------------
DROP TABLE IF EXISTS `item`;
CREATE TABLE `item` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '商品名',
`code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '商品编号',
`stock` bigint(20) NULL DEFAULT NULL COMMENT '库存',
`purchase_time` date NULL DEFAULT NULL COMMENT '采购时间',
`is_active` int(11) NULL DEFAULT 1 COMMENT '是否有效(1=是;0=否)',
`create_time` datetime NULL DEFAULT NULL,
`update_time` timestamp NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商品表' ROW_FORMAT = Compact;
-- ----------------------------
-- Records of item
-- ----------------------------
INSERT INTO `item` VALUES (6, 'Java编程思想', 'book10010', 1000, '2019-05-18', 1, '2019-05-18 21:11:23', NULL);
INSERT INTO `item` VALUES (7, 'Spring实战第四版', 'book10011', 2000, '2019-05-18', 1, '2019-05-18 21:11:23', NULL);
INSERT INTO `item` VALUES (8, '深入分析JavaWeb', 'book10012', 2000, '2019-05-18', 1, '2019-05-18 21:11:23', NULL);
-- ----------------------------
-- Table structure for item_kill
-- ----------------------------
DROP TABLE IF EXISTS `item_kill`;
CREATE TABLE `item_kill` (
`id` int(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
`item_id` int(11) NULL DEFAULT NULL COMMENT '商品id',
`total` int(11) NULL DEFAULT NULL COMMENT '可被秒杀的总数',
`start_time` datetime NULL DEFAULT NULL COMMENT '秒杀开始时间',
`end_time` datetime NULL DEFAULT NULL COMMENT '秒杀结束时间',
`is_active` tinyint(11) NULL DEFAULT 1 COMMENT '是否有效(1=是;0=否)',
`create_time` timestamp NULL DEFAULT NULL COMMENT '创建的时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '待秒杀商品表' ROW_FORMAT = Compact;
-- ----------------------------
-- Records of item_kill
-- ----------------------------
INSERT INTO `item_kill` VALUES (1, 6, 10, '2019-06-08 21:59:07', '2019-06-15 21:59:11', 1, '2019-05-20 21:59:41');
INSERT INTO `item_kill` VALUES (2, 7, 0, '2019-06-01 21:59:19', '2019-06-30 21:59:11', 1, '2019-05-20 21:59:41');
INSERT INTO `item_kill` VALUES (3, 8, 91, '2019-07-01 18:58:26', '2020-04-01 21:59:07', 1, '2019-05-20 21:59:41');
-- ----------------------------
-- Table structure for item_kill_success
-- ----------------------------
DROP TABLE IF EXISTS `item_kill_success`;
CREATE TABLE `item_kill_success` (
`code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '秒杀成功生成的订单编号',
`item_id` int(11) NULL DEFAULT NULL COMMENT '商品id',
`kill_id` int(11) NULL DEFAULT NULL COMMENT '秒杀id',
`user_id` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户id',
`status` tinyint(4) NULL DEFAULT -1 COMMENT '秒杀结果: -1无效 0成功(未付款) 1已付款 2已取消',
`create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`code`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '秒杀成功订单表' ROW_FORMAT = Compact;
-- ----------------------------
-- Records of item_kill_success
-- ----------------------------
INSERT INTO `item_kill_success` VALUES ('436222198618009600', 8, 3, '10', -1, '2020-03-14 15:12:22');
INSERT INTO `item_kill_success` VALUES ('436570873319927808', 8, 3, '10', 0, '2020-03-15 14:17:52');
-- ----------------------------
-- Table structure for random_code
-- ----------------------------
DROP TABLE IF EXISTS `random_code`;
CREATE TABLE `random_code` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `idx_code`(`code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户名',
`password` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '密码',
`phone` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '手机号',
`email` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '邮箱',
`is_active` tinyint(11) NULL DEFAULT 1 COMMENT '是否有效(1=是;0=否)',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
`update_time` timestamp NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `idx_user_name`(`user_name`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 11 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户信息表' ROW_FORMAT = Compact;
SET FOREIGN_KEY_CHECKS = 1;
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。