forked from coupon-blockchain-bit/coupon
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbonuspointsexchange.sql
207 lines (178 loc) · 8.59 KB
/
bonuspointsexchange.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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
# MySQL-Front 5.1 (Build 4.2)
# Host: 127.0.0.1 Database: bonuspointsexchange
# ------------------------------------------------------
# Server version 8.0.15
#
# Source for table order
#
USE bonusbitExchange;
DROP TABLE IF EXISTS `order`;
CREATE TABLE `order` (
`orderID` int(11) NOT NULL AUTO_INCREMENT,
`userName` varchar(50) NOT NULL DEFAULT '',
`shopName` varchar(50) NOT NULL DEFAULT '',
`point` int(11) NOT NULL DEFAULT '0',
`wantedShop` varchar(50) NOT NULL DEFAULT '',
`wantedPoint` int(11) NOT NULL DEFAULT '0',
`exchangeUserName` varchar(50) DEFAULT NULL,
`untilDate` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
`orderDate` datetime DEFAULT '1000-01-01 00:00:00',
`orderStatus` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`orderID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
#
# Dumping data for table order
#
LOCK TABLES `order` WRITE;
/*!40000 ALTER TABLE `order` DISABLE KEYS */;
/*!40000 ALTER TABLE `order` ENABLE KEYS */;
UNLOCK TABLES;
#
# Source for table point
#
DROP TABLE IF EXISTS `point`;
CREATE TABLE `point` (
`pointID` int(11) NOT NULL AUTO_INCREMENT,
`userName` varchar(50) NOT NULL DEFAULT '',
`shopName` varchar(50) NOT NULL DEFAULT '',
`platformPoint` int(11) NOT NULL DEFAULT '0',
`bindtime` date DEFAULT '1000-01-01',
PRIMARY KEY (`pointID`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
#
# Dumping data for table point
#
LOCK TABLES `point` WRITE;
/*!40000 ALTER TABLE `point` DISABLE KEYS */;
INSERT INTO `point` VALUES (3,'Bob','Air China',100000,'2017-02-27');
INSERT INTO `point` VALUES (2,'Bob','Changan Airlines',100000,'2017-02-27');
INSERT INTO `point` VALUES (4,'Bob','Eastern Airlines',100000,'2017-02-27');
INSERT INTO `point` VALUES (5,'Bob','Northern Airlines',100000,'2017-02-27');
INSERT INTO `point` VALUES (6,'Bob','Shanghai Airlines',100000,'2017-02-27');
INSERT INTO `point` VALUES (7,'Bob','Shenzhen Airlines',100000,'2017-02-27');
INSERT INTO `point` VALUES (8,'Bob','Sichuan Airlines',100000,'2017-02-27');
INSERT INTO `point` VALUES (9,'Bob','Wuhan Airlines',100000,'2017-02-27');
INSERT INTO `point` VALUES (10,'Bob','Xiamen Airlines',100000,'2017-02-27');
INSERT INTO `point` VALUES (11,'John','Air China',100000,'2017-02-27');
INSERT INTO `point` VALUES (12,'John','Changan Airlines',100000,'2017-02-27');
INSERT INTO `point` VALUES (13,'John','Eastern Airlines',100000,'2017-02-27');
INSERT INTO `point` VALUES (14,'John','Northern Airlines',100000,'2017-02-27');
INSERT INTO `point` VALUES (15,'John','Shanghai Airlines',100000,'2017-02-27');
INSERT INTO `point` VALUES (16,'John','Shenzhen Airlines',100000,'2017-02-27');
INSERT INTO `point` VALUES (17,'John','Sichuan Airlines',100000,'2017-02-27');
INSERT INTO `point` VALUES (18,'John','Wuhan Airlines',100000,'2017-02-27');
INSERT INTO `point` VALUES (19,'John','Xiamen Airlines',100000,'2017-02-27');
/*!40000 ALTER TABLE `point` ENABLE KEYS */;
UNLOCK TABLES;
#
# Source for table shop
#
DROP TABLE IF EXISTS `shop`;
CREATE TABLE `shop` (
`shopName` varchar(50) NOT NULL DEFAULT '',
`imageURL` varchar(200) DEFAULT NULL,
`password` varchar(50) NOT NULL DEFAULT '',
`email` varchar(50) NOT NULL DEFAULT '',
`number` varchar(50) NOT NULL DEFAULT '',
`shopProperty` varchar(50) NOT NULL DEFAULT '',
`shopDec` varchar(500) DEFAULT NULL,
`telephone` varchar(50) DEFAULT NULL,
PRIMARY KEY (`shopName`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
#
# Dumping data for table shop
#
LOCK TABLES `shop` WRITE;
/*!40000 ALTER TABLE `shop` DISABLE KEYS */;
INSERT INTO `shop` VALUES ('Air China','defaultIcon.jpg','96E79218965EB72C92A549DD5A330112','[email protected]','6658789','Airlines','Air China ','13260665620');
INSERT INTO `shop` VALUES ('Changan Airlines','defaultIcon.jpg','96E79218965EB72C92A549DD5A330112','[email protected]','6659784','Airlines','Changan Airlines','13260665620');
INSERT INTO `shop` VALUES ('Eastern Airlines','defaultIcon.jpg','96E79218965EB72C92A549DD5A330112','[email protected]','6659685','Airlines','Eastern Airlines','13260665620');
INSERT INTO `shop` VALUES ('Northern Airlines','defaultIcon.jpg','96E79218965EB72C92A549DD5A330112','[email protected]','6659897','Airlines','Northern Airlines','13260665620');
INSERT INTO `shop` VALUES ('Shanghai Airlines','defaultIcon.jpg','96E79218965EB72C92A549DD5A330112','[email protected]','6659235','Airlines','Shanghai Airlines','13260665620');
INSERT INTO `shop` VALUES ('Shenzhen Airlines','defaultIcon.jpg','96E79218965EB72C92A549DD5A330112','[email protected]','6659365','Airlines','Shenzhen Airlines','13260665620');
INSERT INTO `shop` VALUES ('Sichuan Airlines','defaultIcon.jpg','96E79218965EB72C92A549DD5A330112','[email protected]','6659243','Airlines','Sichuan Airlines','13260665620');
INSERT INTO `shop` VALUES ('Wuhan Airlines','defaultIcon.jpg','96E79218965EB72C92A549DD5A330112','[email protected]','6659725','Airlines','Wuhan Airlines','13260665620');
INSERT INTO `shop` VALUES ('Xiamen Airlines','defaultIcon.jpg','96E79218965EB72C92A549DD5A330112','[email protected]','6659878','Airlines','Xiamen Airlines','13260665620');
/*!40000 ALTER TABLE `shop` ENABLE KEYS */;
UNLOCK TABLES;
#
# Source for table transfer
#
DROP TABLE IF EXISTS `transfer`;
CREATE TABLE `transfer` (
`transferID` int(11) NOT NULL AUTO_INCREMENT,
`pointID` int(11) NOT NULL DEFAULT '0',
`status` int(11) NOT NULL DEFAULT '0',
`point` int(11) NOT NULL DEFAULT '0',
`transferTime` date NOT NULL DEFAULT '1000-01-01',
`shopName` varchar(50) NOT NULL DEFAULT '',
PRIMARY KEY (`transferID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
#
# Dumping data for table transfer
#
LOCK TABLES `transfer` WRITE;
/*!40000 ALTER TABLE `transfer` DISABLE KEYS */;
/*!40000 ALTER TABLE `transfer` ENABLE KEYS */;
UNLOCK TABLES;
#
# Source for table user
#
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`userName` varchar(50) NOT NULL DEFAULT '',
`passwd` varchar(50) NOT NULL DEFAULT '',
`email` varchar(50) NOT NULL DEFAULT '',
`fullName` varchar(50) NOT NULL DEFAULT '',
`phone` varchar(50) NOT NULL DEFAULT '',
`imageURL` varchar(200) DEFAULT NULL,
PRIMARY KEY (`userName`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
#
# Dumping data for table user
#
LOCK TABLES `user` WRITE;
/*!40000 ALTER TABLE `user` DISABLE KEYS */;
INSERT INTO `user` VALUES ('Bob','96E79218965EB72C92A549DD5A330112','[email protected]','Bob','13260665620',NULL);
INSERT INTO `user` VALUES ('John','96E79218965EB72C92A549DD5A330112','[email protected]','John','13260665620',NULL);
/*!40000 ALTER TABLE `user` ENABLE KEYS */;
UNLOCK TABLES;
#
# Source for table userpoint
#
DROP TABLE IF EXISTS `userpoint`;
CREATE TABLE `userpoint` (
`userName` varchar(50) NOT NULL DEFAULT '',
`shopName` varchar(50) NOT NULL DEFAULT '',
`userPoint` int(11) DEFAULT '0',
`password` varchar(50) NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
#
# Dumping data for table userpoint
#
LOCK TABLES `userpoint` WRITE;
/*!40000 ALTER TABLE `userpoint` DISABLE KEYS */;
INSERT INTO `userpoint` VALUES ('Bob','Air China',20000,'111111');
INSERT INTO `userpoint` VALUES ('Bob','Changan Airlines',20000,'111111');
INSERT INTO `userpoint` VALUES ('Bob','Eastern Airlines',50000,'111111');
INSERT INTO `userpoint` VALUES ('Bob','Northern Airlines',60000,'111111');
INSERT INTO `userpoint` VALUES ('Bob','Shanghai Airlines',30000,'111111');
INSERT INTO `userpoint` VALUES ('Bob','Shenzhen Airlines',10000,'111111');
INSERT INTO `userpoint` VALUES ('Bob','Sichuan Airlines',50000,'111111');
INSERT INTO `userpoint` VALUES ('Bob','Wuhan Airlines',60000,'111111');
INSERT INTO `userpoint` VALUES ('Bob','Xiamen Airlines',30000,'111111');
INSERT INTO `userpoint` VALUES ('John','Air China',80000,'111111');
INSERT INTO `userpoint` VALUES ('John','Changan Airlines',70000,'111111');
INSERT INTO `userpoint` VALUES ('John','Eastern Airlines',60000,'111111');
INSERT INTO `userpoint` VALUES ('John','Northern Airlines',40000,'111111');
INSERT INTO `userpoint` VALUES ('John','Shanghai Airlines',50000,'111111');
INSERT INTO `userpoint` VALUES ('John','Shenzhen Airlines',40000,'111111');
INSERT INTO `userpoint` VALUES ('John','Sichuan Airlines',60000,'111111');
INSERT INTO `userpoint` VALUES ('John','Wuhan Airlines',20000,'111111');
INSERT INTO `userpoint` VALUES ('John','Xiamen Airlines',60000,'111111');
/*!40000 ALTER TABLE `userpoint` ENABLE KEYS */;
UNLOCK TABLES;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;