-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhotelms.sql
576 lines (486 loc) · 20 KB
/
hotelms.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
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 28, 2023 at 03:51 AM
-- Server version: 10.4.32-MariaDB
-- PHP Version: 8.2.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!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 utf8mb4 */;
--
-- Database: `hotelms`
--
-- --------------------------------------------------------
--
-- Table structure for table `booking`
--
CREATE TABLE `booking` (
`booking_id` int(10) NOT NULL,
`customer_id` int(10) NOT NULL,
`room_id` int(10) NOT NULL,
`booking_date` timestamp NOT NULL DEFAULT current_timestamp(),
`check_in` varchar(100) DEFAULT NULL,
`check_out` varchar(100) NOT NULL,
`total_price` int(10) NOT NULL,
`remaining_price` int(10) NOT NULL,
`payment_status` tinyint(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
--
-- Dumping data for table `booking`
--
INSERT INTO `booking` (`booking_id`, `customer_id`, `room_id`, `booking_date`, `check_in`, `check_out`, `total_price`, `remaining_price`, `payment_status`) VALUES
(1, 1, 5, '2017-11-13 05:45:17', '13-11-2017', '15-11-2017', 3000, 0, 1),
(2, 2, 2, '2017-11-13 05:46:04', '13-11-2017', '16-11-2017', 6000, 0, 1),
(3, 3, 2, '2017-11-11 06:49:19', '11-11-2017', '14-11-2017', 6000, 0, 1),
(4, 4, 7, '2017-11-09 06:50:24', '11-11-2017', '15-11-2017', 10000, 0, 1),
(5, 5, 13, '2017-11-17 06:59:10', '17-11-2017', '20-11-2017', 12000, 0, 1),
(6, 6, 9, '2021-04-08 09:45:56', '08-04-2021', '10-04-2021', 3000, 3000, 0),
(7, 7, 14, '2021-04-08 17:56:41', '08-04-2021', '10-04-2021', 16500, 11500, 0),
(8, 8, 22, '2021-04-09 08:32:57', '09-04-2021', '13-04-2021', 34500, 0, 1),
(9, 9, 3, '2023-12-03 14:32:27', '14-12-2023', '16-12-2023', 6000, 0, 1),
(10, 10, 27, '2023-12-03 14:36:18', '14-12-2023', '16-12-2023', 0, 0, 0),
(11, 11, 18, '2023-12-06 04:38:14', '23-12-2023', '25-12-2023', 19500, 14955, 0),
(12, 12, 19, '2023-12-06 06:32:36', '27-12-2023', '30-12-2023', 26000, 0, 1),
(13, 13, 21, '2023-12-06 06:35:52', '28-12-2023', '29-12-2023', 13800, 0, 1),
(14, 14, 10, '2023-12-21 08:57:05', '22-12-2023', '26-12-2023', 7500, 7500, 0),
(15, 15, 4, '2023-12-21 09:12:41', '22-12-2023', '26-12-2023', 15000, 15000, 0),
(16, 16, 12, '2023-12-21 09:22:59', '22-12-2023', '23-12-2023', 6000, 6000, 0),
(17, 19, 5, '2023-12-27 05:08:59', '27-12-2023', '28-12-2023', 2000, 0, 1),
(18, 20, 2, '2023-12-27 05:32:40', '27-12-2023', '28-12-2023', 3000, 3000, 0),
(19, 21, 7, '2023-12-27 05:58:23', '27-12-2023', '28-12-2023', 4000, 0, 1);
-- --------------------------------------------------------
--
-- Table structure for table `complaint`
--
CREATE TABLE `complaint` (
`id` int(11) NOT NULL,
`complainant_name` varchar(100) NOT NULL,
`complaint_type` varchar(100) NOT NULL,
`complaint` varchar(200) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
`resolve_status` tinyint(1) NOT NULL,
`resolve_date` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`budget` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
--
-- Dumping data for table `complaint`
--
INSERT INTO `complaint` (`id`, `complainant_name`, `complaint_type`, `complaint`, `created_at`, `resolve_status`, `resolve_date`, `budget`) VALUES
(1, 'Janice Alexander\n', 'Room Windows', 'Doesnot operate properly', '2020-07-16 06:51:24', 1, '2020-07-17 06:51:58', 3600),
(2, 'Robert Peter\n', 'Air Conditioner', 'Sensor Problems', '2020-10-01 06:51:44', 1, '2020-10-03 07:06:02', 7950),
(3, 'Jason J Pirkle\n', 'Bad Smells', 'Some odd smells around room areas', '2018-04-01 07:01:17', 1, '2018-04-01 07:01:52', 500),
(5, 'Will Williams', 'Faulty Electronics', 'Due to some weird reasons, the electronics are not working as it should; some voltage problems too - M-135', '2021-04-09 08:38:19', 1, '2021-04-09 08:38:39', 2500);
-- --------------------------------------------------------
--
-- Table structure for table `customer`
--
CREATE TABLE `customer` (
`customer_id` int(10) NOT NULL,
`customer_name` varchar(100) NOT NULL,
`contact_no` bigint(20) NOT NULL,
`email` varchar(100) NOT NULL,
`id_card_type_id` int(10) NOT NULL,
`id_card_no` varchar(20) NOT NULL,
`address` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
--
-- Dumping data for table `customer`
--
INSERT INTO `customer` (`customer_id`, `customer_name`, `contact_no`, `email`, `id_card_type_id`, `id_card_no`, `address`) VALUES
(1, 'Billy S. Burke', 7540001240, '[email protected]', 1, '422510099122', '3166 Rockford Road'),
(2, 'John Mitchell', 2870214970, '[email protected]', 2, '422510099122', '1954 Armory Road'),
(3, 'Beatriz M. Matthews', 1247778460, '[email protected]', 1, '422510099122', '4879 Shearwood Forest Drive'),
(4, 'Kevin Johnson', 1478546500, '[email protected]', 3, '0', '926 Richland Avenue\n'),
(5, 'Dwayne Scott', 2671249780, '[email protected]', 1, '422510099122', '4698 Columbia Road\n'),
(6, 'Bruno Denn', 1245554780, '[email protected]', 4, 'AASS 12454784541', '4764 Warner Street\n'),
(7, 'Ric Austin', 2450006974, '[email protected]', 1, '457896000002', '1680 Brownton Road'),
(8, 'Andrew Stuartt', 2457778450, '[email protected]', 1, '147000245810', '766 Lodgeville Road'),
(9, 'SAFNI mj', 778759392, '[email protected]', 1, '200107603121', '108, ALK. Lane,, Amanulla Road,'),
(10, 'SAFNI mj', 778759392, '[email protected]', 1, '20010760121', '108, ALK. Lane,, Amanulla Road,'),
(11, 'SAFNI mj', 778759392, '[email protected]', 1, '45454545454545', '108, ALK. Lane,, Amanulla Road,'),
(12, 'SAFNI mj', 778759392, '[email protected]', 1, '45646464646', '108, ALK. Lane,, Amanulla Road,'),
(13, 'SAFNI mj', 778759392, '[email protected]', 1, '654645664555', '108, ALK. Lane,, Amanulla Road,'),
(14, 'Kumuthan Apilas', 776259369, '[email protected]', 1, '56181651816518119', 'lhiubg87g87g87'),
(15, 'Kumuthan Apilas', 776259369, '[email protected]', 1, '56181651816518119', 'lhiubg87g87g87'),
(16, 'sidfjsdofsfdasf PI', 7787566232312, '[email protected]', 1, '10102202222444', 'JSHDGJSHDFJSDF'),
(19, 'abilashan yogarasa', 756601349, '[email protected]', 1, '200013204107', 'batticaloa'),
(20, 'sharmila sharu', 1234567891, '[email protected]', 1, '200181104351', 'batticaloa'),
(21, 'mjdsfhk jsfh', 7785656566, '[email protected]', 1, '200107603121', 'batti');
-- --------------------------------------------------------
--
-- Table structure for table `emp_history`
--
CREATE TABLE `emp_history` (
`id` int(11) NOT NULL,
`emp_id` int(11) NOT NULL,
`shift_id` int(11) NOT NULL,
`from_date` timestamp NOT NULL DEFAULT current_timestamp(),
`to_date` timestamp NULL DEFAULT NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
--
-- Dumping data for table `emp_history`
--
INSERT INTO `emp_history` (`id`, `emp_id`, `shift_id`, `from_date`, `to_date`, `created_at`) VALUES
(1, 1, 1, '2017-11-13 05:39:06', '2017-11-15 02:22:26', '2017-11-13 05:39:06'),
(2, 2, 3, '2017-11-13 05:39:39', '2017-11-15 02:22:43', '2017-11-13 05:39:39'),
(3, 3, 1, '2017-11-13 05:40:18', '2017-11-15 02:22:49', '2017-11-13 05:40:18'),
(4, 4, 1, '2017-11-13 05:40:56', '2017-11-15 02:22:35', '2017-11-13 05:40:56'),
(5, 5, 1, '2017-11-13 05:41:31', NULL, '2017-11-13 05:41:31'),
(6, 6, 3, '2017-11-13 05:42:03', NULL, '2017-11-13 05:42:03'),
(7, 7, 4, '2017-11-13 05:42:35', '2017-11-18 02:35:02', '2017-11-13 05:42:35'),
(8, 8, 3, '2017-11-13 05:43:13', '2017-11-18 02:32:26', '2017-11-13 05:43:13'),
(9, 9, 2, '2017-11-13 05:43:49', NULL, '2017-11-13 05:43:49'),
(10, 10, 1, '2017-11-13 06:30:45', '2017-11-18 02:34:28', '2017-11-13 06:30:45'),
(11, 1, 2, '2017-11-15 06:52:26', '2017-11-17 02:23:05', '2017-11-15 06:52:26'),
(12, 4, 3, '2017-11-15 06:52:35', NULL, '2017-11-15 06:52:35'),
(13, 2, 3, '2017-11-15 06:52:43', NULL, '2017-11-15 06:52:43'),
(14, 3, 3, '2017-11-15 06:52:49', NULL, '2017-11-15 06:52:49'),
(15, 1, 3, '2017-11-17 06:53:05', NULL, '2017-11-17 06:53:05'),
(16, 8, 1, '2017-11-18 07:02:26', NULL, '2017-11-18 07:02:26'),
(17, 11, 2, '2017-11-18 07:04:03', NULL, '2017-11-18 07:04:03'),
(18, 10, 2, '2017-11-18 07:04:28', NULL, '2017-11-18 07:04:28'),
(19, 7, 2, '2017-11-18 07:05:02', NULL, '2017-11-18 07:05:02'),
(20, 12, 1, '2021-04-08 17:54:22', NULL, '2021-04-08 17:54:22'),
(21, 13, 2, '2021-04-09 08:35:27', NULL, '2021-04-09 08:35:27');
-- --------------------------------------------------------
--
-- Table structure for table `id_card_type`
--
CREATE TABLE `id_card_type` (
`id_card_type_id` int(10) NOT NULL,
`id_card_type` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
--
-- Dumping data for table `id_card_type`
--
INSERT INTO `id_card_type` (`id_card_type_id`, `id_card_type`) VALUES
(1, 'National Identity Card'),
(2, 'Passport No'),
(3, 'Nuwara Travels ID'),
(4, 'Driving License');
-- --------------------------------------------------------
--
-- Table structure for table `room`
--
CREATE TABLE `room` (
`room_id` int(10) NOT NULL,
`room_type_id` int(10) NOT NULL,
`room_no` varchar(10) NOT NULL,
`status` tinyint(1) DEFAULT NULL,
`check_in_status` tinyint(1) NOT NULL,
`check_out_status` tinyint(1) NOT NULL,
`deleteStatus` tinyint(1) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
--
-- Dumping data for table `room`
--
INSERT INTO `room` (`room_id`, `room_type_id`, `room_no`, `status`, `check_in_status`, `check_out_status`, `deleteStatus`) VALUES
(1, 2, 'A-101', NULL, 0, 0, 1),
(2, 2, 'A-102', 1, 0, 1, 0),
(3, 3, 'A-103', NULL, 0, 1, 1),
(4, 4, 'A-104', 1, 0, 0, 0),
(5, 1, 'B-101', NULL, 0, 1, 0),
(6, 2, 'B-102', NULL, 0, 0, 1),
(7, 3, 'B-103', NULL, 0, 1, 0),
(8, 4, 'B-104', NULL, 0, 0, 1),
(9, 1, 'C-101', 1, 0, 0, 0),
(10, 2, 'C-102', 1, 0, 0, 0),
(11, 3, 'C-103', NULL, 0, 0, 1),
(12, 4, 'C-104', 1, 0, 0, 0),
(13, 4, 'D-101', NULL, 0, 1, 1),
(14, 5, 'K-699', 1, 1, 0, 0),
(15, 5, 'K-799', NULL, 0, 0, 0),
(16, 5, 'K-899', NULL, 0, 0, 0),
(17, 6, 'M-333', NULL, 0, 0, 0),
(18, 6, 'M-444', 1, 1, 0, 0),
(19, 6, 'M-555', NULL, 0, 1, 0),
(20, 9, 'P-696', NULL, 0, 0, 0),
(21, 10, 'M-966', NULL, 0, 1, 0),
(22, 10, 'M-869', NULL, 0, 1, 0),
(23, 8, 'Z-666', NULL, 0, 0, 0),
(24, 7, 'X-969', NULL, 0, 0, 0),
(25, 8, 'Z-111', NULL, 0, 0, 0),
(26, 6, 'M-135', NULL, 0, 0, 0),
(27, 2, 'B-107', 1, 0, 0, 0);
-- --------------------------------------------------------
--
-- Table structure for table `room_type`
--
CREATE TABLE `room_type` (
`room_type_id` int(10) NOT NULL,
`room_type` varchar(100) NOT NULL,
`price` int(10) NOT NULL,
`max_person` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
--
-- Dumping data for table `room_type`
--
INSERT INTO `room_type` (`room_type_id`, `room_type`, `price`, `max_person`) VALUES
(1, 'Single', 1000, 1),
(2, 'Double', 1500, 2),
(3, 'Triple', 2000, 3),
(4, 'Family', 3000, 2),
(5, 'King Sized', 5500, 4),
(6, 'Master Suite', 6500, 6),
(7, 'Mini-Suite', 3600, 3),
(8, 'Connecting Rooms', 8000, 6),
(9, 'Presidential Suite', 21000, 4),
(10, 'Murphy Room', 6900, 3);
-- --------------------------------------------------------
--
-- Table structure for table `shift`
--
CREATE TABLE `shift` (
`shift_id` int(10) NOT NULL,
`shift` varchar(100) NOT NULL,
`shift_timing` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
--
-- Dumping data for table `shift`
--
INSERT INTO `shift` (`shift_id`, `shift`, `shift_timing`) VALUES
(1, 'Morning', '5:00 AM - 10:00 AM'),
(2, 'Day', '10:00 AM - 4:00PM'),
(3, 'Evening', '4:00 PM - 10:00 PM'),
(4, 'Night', '10:00PM - 5:00AM');
-- --------------------------------------------------------
--
-- Table structure for table `staff`
--
CREATE TABLE `staff` (
`emp_id` int(11) NOT NULL,
`emp_name` varchar(100) NOT NULL,
`staff_type_id` int(11) NOT NULL,
`shift_id` int(11) NOT NULL,
`id_card_type` int(11) NOT NULL,
`id_card_no` varchar(20) NOT NULL,
`address` varchar(100) NOT NULL,
`contact_no` bigint(20) NOT NULL,
`salary` bigint(20) NOT NULL,
`joining_date` timestamp NOT NULL DEFAULT current_timestamp(),
`updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
--
-- Dumping data for table `staff`
--
INSERT INTO `staff` (`emp_id`, `emp_name`, `staff_type_id`, `shift_id`, `id_card_type`, `id_card_no`, `address`, `contact_no`, `salary`, `joining_date`, `updated_at`) VALUES
(1, 'Joseph Bow', 1, 3, 1, '422510099122', '4516 Spruce Drive\n', 3479454777, 21000, '2020-11-13 05:39:06', '2021-04-08 17:36:16'),
(2, 'Cleta Landon', 3, 3, 1, '422510099122', '2555 Hillside Drive', 1479994500, 12500, '2021-04-07 20:21:00', '2021-04-08 17:36:23'),
(3, 'Gerald White', 2, 3, 1, '422510099122', 'Ap #897-1459 Quam Avenue', 976543111, 25000, '2019-11-13 05:40:18', '2021-04-08 17:36:27'),
(4, 'Frank J. Welch', 2, 3, 2, '0', '2272 Sun Valley Road\n', 7451112450, 31000, '2017-11-13 05:40:55', '2021-04-08 17:36:33'),
(5, 'Gary Johnson', 4, 1, 1, '12345341212', '458 Chandler Drive\n', 4578884500, 28000, '2018-11-13 05:41:31', '2021-04-08 17:36:42'),
(6, 'Miguel M. Miller', 3, 3, 3, '0', 'Ap #897-1459 Quam Avenue', 8520000000, 40000, '2017-11-13 05:42:03', '2021-04-08 17:36:47'),
(7, 'Clement L. Brainerd\n', 2, 2, 1, '422510099122', '4381 Gateway Road\n', 4547778450, 40000, '2017-11-13 05:42:35', '2021-04-08 17:36:51'),
(8, 'Randall Leclair', 1, 1, 4, '0', '1724 Round Table Drive\n', 1457845554, 15000, '2020-11-13 05:43:13', '2021-04-08 17:36:56'),
(9, 'Fredrick A. Wile', 3, 2, 4, '0', '3431 Joyce Street\n', 7145554500, 20000, '2020-11-13 05:43:49', '2021-04-08 17:36:59'),
(10, 'Brent Tatro', 5, 2, 1, '422510099122', '1616 Coventry Court\n', 3475468569, 24000, '2019-11-13 06:30:45', '2021-04-08 17:37:07'),
(11, 'Charles Miller', 3, 2, 1, '0', '382 Byers Lane\n', 7869696969, 20000, '2019-11-18 07:04:03', '2021-04-08 17:37:10'),
(12, 'John Doe', 2, 1, 4, 'AD69 14579500002', '3714 Duffy Street', 1475550036, 13500, '2021-04-08 17:54:22', '2021-04-08 17:54:22'),
(13, 'Brent Dixon', 9, 2, 1, '457854555012', '1821 Harry Place', 7457778560, 65500, '2021-04-09 08:35:27', '2021-04-09 08:35:27');
-- --------------------------------------------------------
--
-- Table structure for table `staff_type`
--
CREATE TABLE `staff_type` (
`staff_type_id` int(10) NOT NULL,
`staff_type` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
--
-- Dumping data for table `staff_type`
--
INSERT INTO `staff_type` (`staff_type_id`, `staff_type`) VALUES
(1, 'Manager'),
(2, 'Housekeeping Manager'),
(3, 'Front Desk Receptionist'),
(4, 'Cheif'),
(5, 'Waiter'),
(6, 'Room Attendant'),
(7, 'Concierge'),
(8, 'Hotel Maintenance Engineer'),
(9, 'Hotel Sales Manager');
-- --------------------------------------------------------
--
-- Table structure for table `user`
--
CREATE TABLE `user` (
`id` int(11) NOT NULL,
`name` varchar(100) NOT NULL,
`username` varchar(15) NOT NULL,
`email` varchar(100) NOT NULL,
`password` varchar(100) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
--
-- Dumping data for table `user`
--
INSERT INTO `user` (`id`, `name`, `username`, `email`, `password`, `created_at`) VALUES
(2, 'Christine', 'christine', '[email protected]', 'fb1e75090b96d2e0abec0ec980c2f392', '2015-11-12 12:49:22'),
(3, 'Harry Denn', 'harryden', '[email protected]', 'd0a512f262ed34abed0c45cefe08c429', '2016-04-01 12:49:22');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `booking`
--
ALTER TABLE `booking`
ADD PRIMARY KEY (`booking_id`),
ADD KEY `customer_id` (`customer_id`),
ADD KEY `room_id` (`room_id`);
--
-- Indexes for table `complaint`
--
ALTER TABLE `complaint`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `customer`
--
ALTER TABLE `customer`
ADD PRIMARY KEY (`customer_id`),
ADD KEY `customer_id_type` (`id_card_type_id`);
--
-- Indexes for table `emp_history`
--
ALTER TABLE `emp_history`
ADD PRIMARY KEY (`id`),
ADD KEY `emp_id` (`emp_id`),
ADD KEY `shift_id` (`shift_id`);
--
-- Indexes for table `id_card_type`
--
ALTER TABLE `id_card_type`
ADD PRIMARY KEY (`id_card_type_id`);
--
-- Indexes for table `room`
--
ALTER TABLE `room`
ADD PRIMARY KEY (`room_id`),
ADD KEY `room_type_id` (`room_type_id`);
--
-- Indexes for table `room_type`
--
ALTER TABLE `room_type`
ADD PRIMARY KEY (`room_type_id`);
--
-- Indexes for table `shift`
--
ALTER TABLE `shift`
ADD PRIMARY KEY (`shift_id`);
--
-- Indexes for table `staff`
--
ALTER TABLE `staff`
ADD PRIMARY KEY (`emp_id`),
ADD KEY `id_card_type` (`id_card_type`),
ADD KEY `shift_id` (`shift_id`),
ADD KEY `staff_type_id` (`staff_type_id`);
--
-- Indexes for table `staff_type`
--
ALTER TABLE `staff_type`
ADD PRIMARY KEY (`staff_type_id`);
--
-- Indexes for table `user`
--
ALTER TABLE `user`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `booking`
--
ALTER TABLE `booking`
MODIFY `booking_id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20;
--
-- AUTO_INCREMENT for table `complaint`
--
ALTER TABLE `complaint`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `customer`
--
ALTER TABLE `customer`
MODIFY `customer_id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22;
--
-- AUTO_INCREMENT for table `emp_history`
--
ALTER TABLE `emp_history`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22;
--
-- AUTO_INCREMENT for table `id_card_type`
--
ALTER TABLE `id_card_type`
MODIFY `id_card_type_id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `room`
--
ALTER TABLE `room`
MODIFY `room_id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=28;
--
-- AUTO_INCREMENT for table `room_type`
--
ALTER TABLE `room_type`
MODIFY `room_type_id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
--
-- AUTO_INCREMENT for table `shift`
--
ALTER TABLE `shift`
MODIFY `shift_id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `staff`
--
ALTER TABLE `staff`
MODIFY `emp_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;
--
-- AUTO_INCREMENT for table `staff_type`
--
ALTER TABLE `staff_type`
MODIFY `staff_type_id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;
--
-- AUTO_INCREMENT for table `user`
--
ALTER TABLE `user`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `booking`
--
ALTER TABLE `booking`
ADD CONSTRAINT `booking_ibfk_1` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`),
ADD CONSTRAINT `booking_ibfk_2` FOREIGN KEY (`room_id`) REFERENCES `room` (`room_id`);
--
-- Constraints for table `customer`
--
ALTER TABLE `customer`
ADD CONSTRAINT `customer_ibfk_1` FOREIGN KEY (`id_card_type_id`) REFERENCES `id_card_type` (`id_card_type_id`);
--
-- Constraints for table `emp_history`
--
ALTER TABLE `emp_history`
ADD CONSTRAINT `emp_history_ibfk_1` FOREIGN KEY (`emp_id`) REFERENCES `staff` (`emp_id`),
ADD CONSTRAINT `emp_history_ibfk_2` FOREIGN KEY (`shift_id`) REFERENCES `shift` (`shift_id`);
--
-- Constraints for table `room`
--
ALTER TABLE `room`
ADD CONSTRAINT `room_ibfk_1` FOREIGN KEY (`room_type_id`) REFERENCES `room_type` (`room_type_id`);
--
-- Constraints for table `staff`
--
ALTER TABLE `staff`
ADD CONSTRAINT `staff_ibfk_1` FOREIGN KEY (`id_card_type`) REFERENCES `id_card_type` (`id_card_type_id`),
ADD CONSTRAINT `staff_ibfk_2` FOREIGN KEY (`shift_id`) REFERENCES `shift` (`shift_id`),
ADD CONSTRAINT `staff_ibfk_3` FOREIGN KEY (`staff_type_id`) REFERENCES `staff_type` (`staff_type_id`);
COMMIT;
/*!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 */;