forked from marc45/SpringCloud-Shop
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdbkeda.sql
More file actions
111 lines (98 loc) · 3.5 KB
/
dbkeda.sql
File metadata and controls
111 lines (98 loc) · 3.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
/*
Navicat Premium Data Transfer
Source Server : mysql本地数据库
Source Server Type : MySQL
Source Server Version : 50724
Source Host : localhost:3306
Source Schema : dbkeda
Target Server Type : MySQL
Target Server Version : 50724
File Encoding : 65001
Date: 05/08/2019 15:42:30
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for category
-- ----------------------------
DROP TABLE IF EXISTS `category`;
CREATE TABLE `category` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`name` varchar(20) NOT NULL,
`price` decimal(10,2) DEFAULT NULL,
`detail` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of category
-- ----------------------------
BEGIN;
INSERT INTO `category` VALUES (1, '海味', 29.99, '');
INSERT INTO `category` VALUES (2, 'ZEK 原味海苔', 8.90, 'ZEK 原味海苔 详情');
INSERT INTO `category` VALUES (3, '萨拉米 1+1小鸡腿', 29.99, '萨拉米 1+1小鸡腿 详情');
COMMIT;
-- ----------------------------
-- Table structure for order
-- ----------------------------
DROP TABLE IF EXISTS `order`;
CREATE TABLE `order` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`datetime` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP,
`summoney` decimal(10,2) DEFAULT NULL,
`state` tinyint(4) NOT NULL COMMENT '订单状态',
`user_id` bigint(20) NOT NULL,
PRIMARY KEY (`id`),
KEY `user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of order
-- ----------------------------
BEGIN;
INSERT INTO `order` VALUES (9, '2018-01-03 16:59:50', 8.90, 0, 2);
INSERT INTO `order` VALUES (10, '2018-01-04 10:07:43', 8.90, 0, 2);
INSERT INTO `order` VALUES (11, '2019-08-05 11:31:10', 10.00, 0, 2);
INSERT INTO `order` VALUES (12, '2019-08-05 11:31:40', 10.00, 0, 2);
COMMIT;
-- ----------------------------
-- Table structure for order_category
-- ----------------------------
DROP TABLE IF EXISTS `order_category`;
CREATE TABLE `order_category` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`order_id` bigint(20) NOT NULL,
`category_id` bigint(20) NOT NULL,
`num` int(11) NOT NULL,
`create_time` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `order_id` (`order_id`),
KEY `category_id` (`category_id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of order_category
-- ----------------------------
BEGIN;
INSERT INTO `order_category` VALUES (5, 9, 2, 1, '2018-01-03 14:32:32');
INSERT INTO `order_category` VALUES (6, 10, 2, 1, '2018-01-04 10:07:43');
INSERT INTO `order_category` VALUES (7, 11, 1, 1, '2019-08-05 11:31:11');
INSERT INTO `order_category` VALUES (8, 12, 1, 1, '2019-08-05 11:31:40');
COMMIT;
-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`phone` varchar(255) DEFAULT NULL,
`address` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of user
-- ----------------------------
BEGIN;
INSERT INTO `user` VALUES (2, 'admin', '123456', '18361248888', '北京');
INSERT INTO `user` VALUES (3, 'test', '123456', '18361222222', '北京');
COMMIT;
SET FOREIGN_KEY_CHECKS = 1;