-
Notifications
You must be signed in to change notification settings - Fork 0
/
shopping_store_2019-12-16.sql
137 lines (104 loc) · 4.28 KB
/
shopping_store_2019-12-16.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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# ************************************************************
# Sequel Pro SQL dump
# Version 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: 127.0.0.1 (MySQL 5.7.15)
# Database: shopping_store
# Generation Time: 2019-12-16 10:34:24 +0000
# ************************************************************
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_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 */;
# Dump of table order_detail
# ------------------------------------------------------------
DROP TABLE IF EXISTS `order_detail`;
CREATE TABLE `order_detail` (
`order_record_id` int(11) DEFAULT NULL,
`product_id` int(11) DEFAULT NULL,
`price` decimal(10,2) DEFAULT NULL,
`profit` decimal(10,2) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
LOCK TABLES `order_detail` WRITE;
/*!40000 ALTER TABLE `order_detail` DISABLE KEYS */;
INSERT INTO `order_detail` (`order_record_id`, `product_id`, `price`, `profit`)
VALUES
(1,1,10.00,2.00),
(1,2,80.00,20.00);
/*!40000 ALTER TABLE `order_detail` ENABLE KEYS */;
UNLOCK TABLES;
# Dump of table order_record
# ------------------------------------------------------------
DROP TABLE IF EXISTS `order_record`;
CREATE TABLE `order_record` (
`user_id` int(11) DEFAULT NULL,
`profit` decimal(10,2) DEFAULT NULL,
`order_id` varchar(64) DEFAULT NULL,
`create_time` datetime DEFAULT CURRENT_TIMESTAMP,
KEY `order_id` (`order_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
LOCK TABLES `order_record` WRITE;
/*!40000 ALTER TABLE `order_record` DISABLE KEYS */;
INSERT INTO `order_record` (`user_id`, `profit`, `order_id`, `create_time`)
VALUES
(1,20.00,'1','2019-12-16 10:22:05');
/*!40000 ALTER TABLE `order_record` ENABLE KEYS */;
UNLOCK TABLES;
# Dump of table product
# ------------------------------------------------------------
DROP TABLE IF EXISTS `product`;
CREATE TABLE `product` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(32) NOT NULL DEFAULT '',
`description` varchar(64) DEFAULT NULL,
`source_price` decimal(10,2) NOT NULL,
`price` decimal(10,2) NOT NULL,
`count` int(11) NOT NULL,
`is_del` tinyint(1) NOT NULL DEFAULT '0',
`product_id` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
LOCK TABLES `product` WRITE;
/*!40000 ALTER TABLE `product` DISABLE KEYS */;
INSERT INTO `product` (`id`, `name`, `description`, `source_price`, `price`, `count`, `is_del`, `product_id`)
VALUES
(1,'笔记本','上课记笔记的笔记本',20.00,25.00,100,1,11111111),
(2,'圆珠笔',NULL,8.00,10.00,80,0,22222222);
/*!40000 ALTER TABLE `product` ENABLE KEYS */;
UNLOCK TABLES;
# Dump of table user
# ------------------------------------------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(16) NOT NULL DEFAULT '',
`pn` varchar(32) NOT NULL DEFAULT '',
`role` int(11) DEFAULT '0',
`password` varchar(500) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
LOCK TABLES `user` WRITE;
/*!40000 ALTER TABLE `user` DISABLE KEYS */;
INSERT INTO `user` (`id`, `name`, `pn`, `role`, `password`)
VALUES
(1,'lijintao','18201237029',1,'bd2756b738721d378af77198efc3975a'),
(2,'小夫','18334770735',1,'e10adc3949ba59abbe56e057f20f883e'),
(3,'aaa','18888888888',1,'c8837b23ff8aaa8a2dde915473ce0991'),
(4,'111','18222222222',1,'e3ceb5881a0a1fdaad01296d7554868d'),
(5,'1111','18201122111',0,'45678'),
(15,'李锦涛','18200000001',1,'c8837b23ff8aaa8a2dde915473ce0991'),
(16,'lijinyao','18222000033',1,'e50d9b8f32678fda664d7b9ef3f6702b');
/*!40000 ALTER TABLE `user` ENABLE KEYS */;
UNLOCK TABLES;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;