-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathspike.sql
106 lines (82 loc) · 4.24 KB
/
spike.sql
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
/*
SQLyog v10.2
MySQL - 5.6.20 : Database - spike
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
/*Table structure for table `goods` */
CREATE TABLE `goods` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`goods_name` varchar(16) DEFAULT NULL,
`goods_title` varchar(64) DEFAULT NULL,
`goods_img` varchar(64) DEFAULT NULL,
`goods_detail` longtext,
`goods_price` decimal(10,2) DEFAULT '0.00',
`goods_stock` int(11) DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
/*Data for the table `goods` */
insert into `goods`(`id`,`goods_name`,`goods_title`,`goods_img`,`goods_detail`,`goods_price`,`goods_stock`) values (1,'iphoneX','很好用','/img/iphonex.png','一款2020年出的无敌好用的手机','9999.00',500);
insert into `goods`(`id`,`goods_name`,`goods_title`,`goods_img`,`goods_detail`,`goods_price`,`goods_stock`) values (2,'程序员必备双肩背包','程序员专属','/img/mi6.png','代表着无限的希望','952.00',300);
/*Table structure for table `orderinfo` */
CREATE TABLE `orderinfo` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`user_id` bigint(20) DEFAULT NULL,
`goods_id` bigint(20) DEFAULT NULL,
`delivery_addr_id` bigint(20) DEFAULT NULL,
`goods_name` varchar(16) DEFAULT NULL,
`goods_count` int(11) DEFAULT NULL,
`goods_price` decimal(10,2) DEFAULT NULL,
`status` int(10) DEFAULT NULL,
`order_channel` tinyint(4) DEFAULT '0',
`create_date` datetime DEFAULT NULL,
`pay_date` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=612 DEFAULT CHARSET=utf8mb4;
/*Data for the table `orderinfo` */
insert into `orderinfo`(`id`,`user_id`,`goods_id`,`delivery_addr_id`,`goods_name`,`goods_count`,`goods_price`,`status`,`order_channel`,`create_date`,`pay_date`) values (611,12312312312,1,NULL,'iphoneX',1,'8888.00',0,1,'2019-04-29 17:21:03',NULL);
/*Table structure for table `spike_goods` */
CREATE TABLE `spike_goods` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`goods_id` bigint(20) DEFAULT NULL,
`spike_price` decimal(10,2) DEFAULT '0.00',
`stock_count` int(11) DEFAULT NULL,
`start_date` datetime DEFAULT NULL,
`end_date` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;
/*Data for the table `spike_goods` */
insert into `spike_goods`(`id`,`goods_id`,`spike_price`,`stock_count`,`start_date`,`end_date`) values (1,1,'8888.00',290,'2019-04-25 17:58:01','2019-05-03 16:53:03');
insert into `spike_goods`(`id`,`goods_id`,`spike_price`,`stock_count`,`start_date`,`end_date`) values (2,2,'345.00',100,'2019-04-25 17:17:19','2019-04-25 17:17:22');
/*Table structure for table `spike_order` */
CREATE TABLE `spike_order` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`user_id` bigint(20) DEFAULT NULL,
`order_id` bigint(20) DEFAULT NULL,
`goods_id` bigint(20) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `u_uid_gid` (`user_id`,`goods_id`)
) ENGINE=InnoDB AUTO_INCREMENT=611 DEFAULT CHARSET=utf8mb4;
/*Data for the table `spike_order` */
insert into `spike_order`(`id`,`user_id`,`order_id`,`goods_id`) values (610,12312312312,611,1);
/*Table structure for table `user` */
CREATE TABLE `user` (
`id` bigint(20) NOT NULL,
`nickname` varchar(255) NOT NULL,
`password` varchar(32) DEFAULT NULL,
`salt` varchar(10) DEFAULT NULL,
`head` varchar(128) DEFAULT NULL,
`register_date` datetime DEFAULT NULL,
`last_login_date` datetime DEFAULT NULL,
`login_count` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*Data for the table `user` */
insert into `user`(`id`,`nickname`,`password`,`salt`,`head`,`register_date`,`last_login_date`,`login_count`) values (12312312312,'Jack','b7797cce01b4b131b433b6acf4add449','1a2b3c4d',NULL,'2019-04-25 10:52:17','2019-04-25 10:52:20',1);
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;