forked from chiuwingyan/house
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzu.sql
286 lines (256 loc) · 10.3 KB
/
zu.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
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
/*
Navicat MySQL Data Transfer
Source Server : chicken
Source Server Version : 50626
Source Host : localhost:3306
Source Database : zu
Target Server Type : MYSQL
Target Server Version : 50626
File Encoding : 65001
Date: 2017-10-10 21:56:34
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for apply
-- ----------------------------
DROP TABLE IF EXISTS `apply`;
CREATE TABLE `apply` (
`apply_id` int(11) NOT NULL AUTO_INCREMENT,
`house_id` varchar(255) NOT NULL,
`address` varchar(255) DEFAULT NULL,
`area` double(255,0) DEFAULT NULL,
`price` double(10,2) DEFAULT NULL,
`status` varchar(255) DEFAULT NULL,
`userlist_id` int(255) NOT NULL,
PRIMARY KEY (`apply_id`,`house_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of apply
-- ----------------------------
-- ----------------------------
-- Table structure for applyout
-- ----------------------------
DROP TABLE IF EXISTS `applyout`;
CREATE TABLE `applyout` (
`aoid` int(11) NOT NULL AUTO_INCREMENT,
`house_id` varchar(255) DEFAULT NULL,
`address` varchar(255) DEFAULT NULL,
`status` varchar(255) DEFAULT NULL,
`userlist_id` int(11) DEFAULT NULL,
PRIMARY KEY (`aoid`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of applyout
-- ----------------------------
INSERT INTO `applyout` VALUES ('3', 'b1', '桃源居', '已拒绝', '10');
INSERT INTO `applyout` VALUES ('6', 'k2', '贝岗街18号', '已拒绝', '15');
-- ----------------------------
-- Table structure for checkout
-- ----------------------------
DROP TABLE IF EXISTS `checkout`;
CREATE TABLE `checkout` (
`cid` int(11) NOT NULL AUTO_INCREMENT,
`house_id` varchar(255) DEFAULT NULL,
`address` varchar(255) DEFAULT NULL,
`status` varchar(255) DEFAULT NULL,
`userlist_id` int(11) DEFAULT NULL,
PRIMARY KEY (`cid`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of checkout
-- ----------------------------
INSERT INTO `checkout` VALUES ('2', 'k2', '贝岗街18号', '已退租', '15');
INSERT INTO `checkout` VALUES ('3', 'c1', '广药1-364', '已退租', '10');
-- ----------------------------
-- Table structure for hetong
-- ----------------------------
DROP TABLE IF EXISTS `hetong`;
CREATE TABLE `hetong` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`chuzu` varchar(255) DEFAULT NULL,
`chuzu_idcard` varchar(255) DEFAULT NULL,
`zuke` varchar(255) DEFAULT NULL,
`zuke_idcard` varchar(255) DEFAULT NULL,
`fromdate` varchar(255) DEFAULT NULL,
`todate` varchar(255) DEFAULT NULL,
`price` double(10,2) DEFAULT NULL,
`address` varchar(255) DEFAULT NULL,
`house_id` varchar(255) DEFAULT NULL,
`payday` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of hetong
-- ----------------------------
INSERT INTO `hetong` VALUES ('5', '张三', '440411199208018201', '李四', '440421199509088888', '2017-09-01', '2018-09-14', '900.00', '菊花园', 'c3', '2');
-- ----------------------------
-- Table structure for houselist
-- ----------------------------
DROP TABLE IF EXISTS `houselist`;
CREATE TABLE `houselist` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`houseid` varchar(255) NOT NULL,
`address` varchar(255) NOT NULL,
`area` double DEFAULT NULL,
`price` double(10,2) DEFAULT NULL,
`status` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`,`houseid`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of houselist
-- ----------------------------
INSERT INTO `houselist` VALUES ('16', 'c3', '菊花园1-364', '60', '700.00', '已租赁');
INSERT INTO `houselist` VALUES ('17', 'k1', '东风街13号', '63.2', '1300.00', '已租赁');
INSERT INTO `houselist` VALUES ('20', 'b5', '穗石村18号', '60', '700.00', '未租赁');
INSERT INTO `houselist` VALUES ('21', 'k8', '穗石村1号', '66', '800.00', '未租赁');
-- ----------------------------
-- Table structure for paid
-- ----------------------------
DROP TABLE IF EXISTS `paid`;
CREATE TABLE `paid` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`house_id` varchar(255) DEFAULT NULL,
`address` varchar(255) DEFAULT NULL,
`price` double(10,2) DEFAULT NULL,
`date` date DEFAULT NULL,
`paydate` date DEFAULT NULL,
`name` varchar(255) DEFAULT NULL,
`userlist_id` int(11) DEFAULT NULL,
`status` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of paid
-- ----------------------------
INSERT INTO `paid` VALUES ('5', 'c1', '广药1-364', '500.00', '2017-09-14', '2017-09-27', '赵颖欣', '10', '租金已缴');
INSERT INTO `paid` VALUES ('6', 'c3', '菊花园1-364', '700.00', '2017-09-30', '2017-09-28', '李四', '12', '租金已缴');
INSERT INTO `paid` VALUES ('7', 'c2', '碧桂园1-364', '4365.00', '2017-10-31', '2017-10-08', '张三', '14', '租金已缴');
INSERT INTO `paid` VALUES ('8', 'k2', '贝岗街18号', '700.00', '2017-10-31', '2017-10-10', '张思', '15', '租金已缴');
INSERT INTO `paid` VALUES ('9', 'c1', '广药1-364', '5000.00', '2017-10-31', '2017-10-10', '赵颖欣', '10', '租金已缴');
-- ----------------------------
-- Table structure for schedule
-- ----------------------------
DROP TABLE IF EXISTS `schedule`;
CREATE TABLE `schedule` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`date` varchar(255) DEFAULT NULL,
`content` text,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of schedule
-- ----------------------------
INSERT INTO `schedule` VALUES ('2', '2017-09-08', '收数');
INSERT INTO `schedule` VALUES ('3', '2017-09-20', '今天是收租日');
-- ----------------------------
-- Table structure for solve
-- ----------------------------
DROP TABLE IF EXISTS `solve`;
CREATE TABLE `solve` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`house_id` varchar(255) DEFAULT NULL,
`address` varchar(255) DEFAULT NULL,
`date` date DEFAULT NULL,
`detail` text,
`name` varchar(255) DEFAULT NULL,
`userlist_id` int(11) DEFAULT NULL,
`status` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of solve
-- ----------------------------
INSERT INTO `solve` VALUES ('4', 'c1', '广药1-364', '2017-09-08', 'kk', '赵颖欣', '10', '已处理');
INSERT INTO `solve` VALUES ('5', 'c3', '菊花园1-364', '2017-09-28', '天花板漏水', '李四', '12', '已处理');
INSERT INTO `solve` VALUES ('6', 'c2', '碧桂园1-364', '2017-10-08', '窗户坏了', '张三', '14', '已处理');
INSERT INTO `solve` VALUES ('7', 'k2', '贝岗街18号', '2017-10-10', '天花板漏水', '张思', '15', '已处理');
INSERT INTO `solve` VALUES ('8', 'c1', '广药1-364', '2017-10-09', '空调漏水', '赵颖欣', '10', '已处理');
-- ----------------------------
-- Table structure for topaid
-- ----------------------------
DROP TABLE IF EXISTS `topaid`;
CREATE TABLE `topaid` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`house_id` varchar(255) DEFAULT NULL,
`address` varchar(255) DEFAULT NULL,
`price` double(10,2) DEFAULT NULL,
`date` date DEFAULT NULL,
`name` varchar(255) DEFAULT NULL,
`userlist_id` int(11) DEFAULT NULL,
`status` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of topaid
-- ----------------------------
-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(255) DEFAULT NULL,
`password` varchar(255) DEFAULT NULL,
`type` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of user
-- ----------------------------
INSERT INTO `user` VALUES ('1', 'admin', '123456', 'admin');
INSERT INTO `user` VALUES ('2', '赵颖欣', '12345', 'zuke');
INSERT INTO `user` VALUES ('3', 'zyx', '12345', 'zuke');
INSERT INTO `user` VALUES ('5', 'cwy', '12345', 'zuke');
-- ----------------------------
-- Table structure for userlist
-- ----------------------------
DROP TABLE IF EXISTS `userlist`;
CREATE TABLE `userlist` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`idcard` varchar(255) NOT NULL,
`phone` varchar(255) DEFAULT NULL,
`user_id` int(11) NOT NULL,
PRIMARY KEY (`id`,`idcard`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of userlist
-- ----------------------------
INSERT INTO `userlist` VALUES ('12', '李四', '440421199509088888', '18826107777', '3');
INSERT INTO `userlist` VALUES ('15', '张思', '441601199312214414', '159192134000', '5');
-- ----------------------------
-- Table structure for wrong
-- ----------------------------
DROP TABLE IF EXISTS `wrong`;
CREATE TABLE `wrong` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`house_id` varchar(255) DEFAULT NULL,
`address` varchar(255) DEFAULT NULL,
`date` date DEFAULT NULL,
`detail` text,
`name` varchar(255) DEFAULT NULL,
`userlist_id` int(11) DEFAULT NULL,
`status` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of wrong
-- ----------------------------
-- ----------------------------
-- Table structure for zulist
-- ----------------------------
DROP TABLE IF EXISTS `zulist`;
CREATE TABLE `zulist` (
`zid` int(11) NOT NULL AUTO_INCREMENT,
`house_id` varchar(255) NOT NULL,
`price` double(10,2) DEFAULT NULL,
`address` varchar(255) DEFAULT NULL,
`userlist_id` int(11) NOT NULL,
`contract_id` int(11) NOT NULL,
PRIMARY KEY (`zid`,`house_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of zulist
-- ----------------------------
INSERT INTO `zulist` VALUES ('7', 'c3', '700.00', '菊花园1-364', '12', '5');
SET FOREIGN_KEY_CHECKS=1;