-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlodge.sql
336 lines (285 loc) · 11.6 KB
/
lodge.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
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Mar 22, 2017 at 05:37 PM
-- Server version: 10.1.13-MariaDB
-- PHP Version: 5.5.35
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
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: `lodge`
--
-- --------------------------------------------------------
--
-- Table structure for table `ldg_floor`
--
CREATE TABLE `ldg_floor` (
`floorId` tinyint(4) NOT NULL,
`floorCode` varchar(10) NOT NULL,
`floorName` varchar(50) NOT NULL,
`floorDescription` text NOT NULL,
`isDeleted` tinyint(4) NOT NULL DEFAULT '0',
`createdBy` int(11) NOT NULL,
`createdDtm` datetime NOT NULL,
`updatedBy` int(11) DEFAULT NULL,
`updatedDtm` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Floor Table';
--
-- Dumping data for table `ldg_floor`
--
INSERT INTO `ldg_floor` (`floorId`, `floorCode`, `floorName`, `floorDescription`, `isDeleted`, `createdBy`, `createdDtm`, `updatedBy`, `updatedDtm`) VALUES
(1, 'GROUND', 'Ground Floor', '<p>Ground Floor having <strong>6</strong> precious rooms and <strong>2</strong> toilet bathrooms.</p>', 0, 1, '2016-12-31 19:25:12', 1, '2017-01-04 18:03:23'),
(2, 'FIRST', 'First Floor', '<p>First Floor having <strong>20</strong> Deluxe Single Bed Rooms, <strong>4</strong> Toilets, <strong>4</strong> Bathrooms in each corner in common.</p>', 0, 1, '2017-01-04 18:01:16', 1, '2017-01-04 18:03:00'),
(3, 'SECOND', 'Second Floor', '<p>Second Floor having <strong>10</strong> double bed rooms with <strong>4</strong> Toilets and <strong>4</strong> Bathrooms in each corner in common.</p>', 0, 1, '2017-01-04 18:02:25', NULL, NULL);
-- --------------------------------------------------------
--
-- Table structure for table `ldg_lodge`
--
CREATE TABLE `ldg_lodge` (
`lodgeId` int(11) NOT NULL,
`lodgeName` varchar(128) NOT NULL,
`lodgeAddress` varchar(512) NOT NULL,
`lodgeCity` varchar(50) NOT NULL,
`lodgeState` varchar(50) NOT NULL,
`lodgeCountry` varchar(50) DEFAULT NULL,
`lodgePincode` varchar(10) DEFAULT NULL,
`isDeleted` tinyint(4) NOT NULL DEFAULT '0',
`createdBy` int(11) NOT NULL DEFAULT '0',
`createdDtm` datetime NOT NULL,
`updatedBy` int(11) DEFAULT NULL,
`updatedDtm` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Information of lodge';
-- --------------------------------------------------------
--
-- Table structure for table `ldg_reset_password`
--
CREATE TABLE `ldg_reset_password` (
`id` bigint(20) NOT NULL,
`email` varchar(128) NOT NULL,
`activation_id` varchar(32) NOT NULL,
`agent` varchar(512) NOT NULL,
`client_ip` varchar(32) NOT NULL,
`isDeleted` tinyint(4) NOT NULL DEFAULT '0',
`createdBy` bigint(20) NOT NULL DEFAULT '1',
`createdDtm` datetime NOT NULL,
`updatedBy` bigint(20) DEFAULT NULL,
`updatedDtm` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `ldg_roles`
--
CREATE TABLE `ldg_roles` (
`roleId` tinyint(4) NOT NULL,
`role` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Information of roles';
--
-- Dumping data for table `ldg_roles`
--
INSERT INTO `ldg_roles` (`roleId`, `role`) VALUES
(1, 'System Administrator'),
(2, 'Lodge Manager'),
(3, 'Booker');
-- --------------------------------------------------------
--
-- Table structure for table `ldg_rooms`
--
CREATE TABLE `ldg_rooms` (
`roomId` int(11) NOT NULL,
`roomNumber` varchar(50) NOT NULL,
`roomSizeId` int(11) NOT NULL COMMENT 'FK : ldg_room_sizes',
`floorId` tinyint(4) NOT NULL COMMENT 'FK : ldg_floor',
`isDeleted` tinyint(4) NOT NULL DEFAULT '0',
`createdBy` int(11) NOT NULL DEFAULT '0',
`createdDtm` datetime NOT NULL,
`updatedBy` int(11) DEFAULT NULL,
`updatedDtm` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Information of rooms';
--
-- Dumping data for table `ldg_rooms`
--
INSERT INTO `ldg_rooms` (`roomId`, `roomNumber`, `roomSizeId`, `floorId`, `isDeleted`, `createdBy`, `createdDtm`, `updatedBy`, `updatedDtm`) VALUES
(1, 'G101', 1, 1, 0, 1, '2017-01-10 17:26:22', NULL, NULL),
(2, 'G102', 1, 1, 0, 1, '2017-01-10 17:29:34', NULL, NULL),
(3, 'G103', 1, 1, 0, 1, '2017-01-10 17:29:43', NULL, NULL),
(4, 'G104', 2, 1, 0, 1, '2017-01-18 18:13:45', NULL, NULL),
(5, 'G105', 2, 1, 0, 1, '2017-01-18 18:15:22', NULL, NULL),
(6, 'G106', 3, 1, 0, 1, '2017-01-18 18:15:43', NULL, NULL),
(7, 'G107', 3, 1, 0, 1, '2017-01-18 18:15:52', NULL, NULL),
(8, 'G108', 4, 1, 0, 1, '2017-01-18 18:16:08', NULL, NULL),
(9, 'G109', 5, 1, 0, 1, '2017-01-18 18:16:51', NULL, NULL),
(10, 'G110', 4, 1, 0, 1, '2017-01-18 18:16:35', 1, '2017-02-11 18:46:23');
-- --------------------------------------------------------
--
-- Table structure for table `ldg_room_base_fare`
--
CREATE TABLE `ldg_room_base_fare` (
`bfId` bigint(20) NOT NULL,
guestFName varchar(50) not null,
guestLName varchar(50) not null,
gAddress varchar(100) not null,
gPhoneNo bigint(40) not null,
gEmail varchar(100) not null,
`sizeId` int(11) NOT NULL,
`baseFareHour` double NOT NULL,
`baseFareDay` double NOT NULL,
`serviceTax` double NOT NULL,
`serviceCharge` double NOT NULL,
`fareTotal` double NOT NULL,
`isDeleted` tinyint(4) NOT NULL DEFAULT '0',
`createdBy` int(11) NOT NULL,
`createdDtm` datetime NOT NULL,
`updatedBy` int(11) DEFAULT NULL,
`updatedDtm` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `ldg_room_base_fare`
--
INSERT INTO `ldg_room_base_fare` (`bfId`, 'guestFName', 'guestLName','gAddress','gPhoneNo','gEmail',`sizeId`, `baseFareHour`, `baseFareDay`, `serviceTax`, `serviceCharge`, `fareTotal`, `isDeleted`, `createdBy`, `createdDtm`, `updatedBy`, `updatedDtm`) VALUES
(1,'Olawale','Afeez','Oniru',08195021190,'[email protected]', 1, 40, 500, 15, 3.5, 592.5, 0, 1, '2017-02-11 19:14:24', 1, '2017-02-11 19:16:14'),
(2,'lawale','Afeez','Oniru',08195021190,'[email protected]', 2, 55, 700, 15, 3.5, 829.5, 0, 1, '2017-02-11 19:19:52', 1, '2017-02-11 19:25:38'),
(3, 'Ishola','Afeez','Oniru',08195021190,'[email protected]',3, 60, 800, 15, 3.5, 948, 0, 1, '2017-02-11 19:20:07', NULL, NULL),
(4,'Wale','Afeez','Oniru',08195021190,'[email protected]', 4, 70, 900, 15, 3.5, 1066.5, 0, 1, '2017-02-11 19:20:35', NULL, NULL),
(5, 'Ola','Afeez','Oniru',08195021190,'[email protected]',5, 100, 1100, 15, 3.5, 1303.5, 0, 1, '2017-02-11 19:20:52', NULL, NULL);
-- --------------------------------------------------------
--
-- Table structure for table `ldg_room_sizes`
--
CREATE TABLE `ldg_room_sizes` (
`sizeId` int(11) NOT NULL,
`sizeTitle` varchar(512) NOT NULL,
`sizeDescription` text NOT NULL,
`isDeleted` tinyint(4) NOT NULL DEFAULT '0',
`createdBy` int(11) NOT NULL DEFAULT '0',
`createdDtm` datetime NOT NULL,
`updatedBy` int(11) DEFAULT NULL,
`updatedDtm` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Information of room sizes';
--
-- Dumping data for table `ldg_room_sizes`
--
INSERT INTO `ldg_room_sizes` (`sizeId`, `sizeTitle`, `sizeDescription`, `isDeleted`, `createdBy`, `createdDtm`, `updatedBy`, `updatedDtm`) VALUES
(1, 'Deluxe Single Bed Room', '<ol>\r\n<li>Single Bed</li>\r\n<li>Toilet + Bathroom</li>\r\n<li>Hot Water : Morning 5am to 9am</li>\r\n</ol>', 0, 1, '2017-01-04 16:55:01', 1, '2017-01-04 18:06:17'),
(2, 'Deluxe Double Bed Room', '<ol>\r\n<li>Joint Double Bed</li>\r\n<li>Toilet + Bathroom</li>\r\n<li>Hot Water : Morning 5am to 9am</li>\r\n</ol>', 0, 1, '2017-01-04 18:05:53', 1, '2017-01-04 18:06:34'),
(3, 'Premium Double Bed Room', '<ol>\r\n<li>Two Single Beds</li>\r\n<li>Toilet + Bathroom</li>\r\n<li>Hot Water : Morning 5am to 9am</li>\r\n</ol>', 0, 1, '2017-01-04 18:07:56', 1, '2017-01-04 18:08:19'),
(4, 'AC Single Bed Room', '<ol>\r\n<li>Single Bed</li>\r\n<li>Toilet + Bathroom</li>\r\n<li>Hot Water : Morning 5am to 9am</li>\r\n<li>Air Conditioned Room</li>\r\n</ol>', 0, 1, '2017-01-04 18:09:09', 1, '2017-01-04 18:11:05'),
(5, 'AC Double Bed Room', '<ol>\r\n<li>Double Joint Bed</li>\r\n<li>Toilet + Bathroom</li>\r\n<li>Hot Water : Morning 5am to 9am</li>\r\n<li>Air Conditioned</li>\r\n</ol>', 0, 1, '2017-01-04 18:09:47', 1, '2017-01-04 18:11:16');
-- --------------------------------------------------------
--
-- Table structure for table `ldg_users`
--
CREATE TABLE `ldg_users` (
`userId` int(11) NOT NULL,
`userEmail` varchar(128) NOT NULL,
`userPassword` varchar(128) NOT NULL,
`userName` varchar(50) NOT NULL,
`userPhone` varchar(20) NOT NULL,
`userAddress` varchar(1024) NOT NULL,
`roleId` tinyint(4) NOT NULL,
`isDeleted` tinyint(4) NOT NULL DEFAULT '0',
`createdBy` int(11) NOT NULL DEFAULT '0',
`createdDtm` datetime NOT NULL,
`updatedBy` int(11) DEFAULT NULL,
`updatedDtm` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Information of administrative users';
--
-- Dumping data for table `ldg_users`
--
INSERT INTO `ldg_users` (`userId`, `userEmail`, `userPassword`, `userName`, `userPhone`, `userAddress`, `roleId`, `isDeleted`, `createdBy`, `createdDtm`, `updatedBy`, `updatedDtm`) VALUES
(1, '[email protected]', '$2y$10$W0JwINh/A4eadWvp1.AxkejudEgv8Wg5vUMCcX4MKtdoCimQieBdK', 'Kishor Mali', '9890098900', 'Pune India', 1, 0, 1, '2017-01-01 00:00:00', NULL, NULL);
--
-- Indexes for dumped tables
--
--
-- Indexes for table `ldg_floor`
--
ALTER TABLE `ldg_floor`
ADD PRIMARY KEY (`floorId`),
ADD UNIQUE KEY `floorCode` (`floorCode`);
--
-- Indexes for table `ldg_lodge`
--
ALTER TABLE `ldg_lodge`
ADD PRIMARY KEY (`lodgeId`);
--
-- Indexes for table `ldg_reset_password`
--
ALTER TABLE `ldg_reset_password`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `ldg_roles`
--
ALTER TABLE `ldg_roles`
ADD PRIMARY KEY (`roleId`);
--
-- Indexes for table `ldg_rooms`
--
ALTER TABLE `ldg_rooms`
ADD PRIMARY KEY (`roomId`);
--
-- Indexes for table `ldg_room_base_fare`
--
ALTER TABLE `ldg_room_base_fare`
ADD PRIMARY KEY (`bfId`);
--
-- Indexes for table `ldg_room_sizes`
--
ALTER TABLE `ldg_room_sizes`
ADD PRIMARY KEY (`sizeId`);
--
-- Indexes for table `ldg_users`
--
ALTER TABLE `ldg_users`
ADD PRIMARY KEY (`userId`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `ldg_floor`
--
ALTER TABLE `ldg_floor`
MODIFY `floorId` tinyint(4) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `ldg_lodge`
--
ALTER TABLE `ldg_lodge`
MODIFY `lodgeId` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `ldg_reset_password`
--
ALTER TABLE `ldg_reset_password`
MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=25;
--
-- AUTO_INCREMENT for table `ldg_roles`
--
ALTER TABLE `ldg_roles`
MODIFY `roleId` tinyint(4) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `ldg_rooms`
--
ALTER TABLE `ldg_rooms`
MODIFY `roomId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
--
-- AUTO_INCREMENT for table `ldg_room_base_fare`
--
ALTER TABLE `ldg_room_base_fare`
MODIFY `bfId` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `ldg_room_sizes`
--
ALTER TABLE `ldg_room_sizes`
MODIFY `sizeId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `ldg_users`
--
ALTER TABLE `ldg_users`
MODIFY `userId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
/*!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 */;