· 7 years ago · Nov 14, 2018, 12:22 PM
1-- MySQL dump 10.13 Distrib 8.0.12, for Win64 (x86_64)
2--
3-- Host: 13.58.76.163 Database: pos_main
4-- ------------------------------------------------------
5-- Server version 5.7.24-0ubuntu0.16.04.1
6
7/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
8/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
9/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
10 SET NAMES utf8 ;
11/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
12/*!40103 SET TIME_ZONE='+00:00' */;
13/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
14/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
15/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
16/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
17
18--
19-- Table structure for table `addon_item_order`
20--
21
22DROP TABLE IF EXISTS `addon_item_order`;
23/*!40101 SET @saved_cs_client = @@character_set_client */;
24 SET character_set_client = utf8mb4 ;
25CREATE TABLE `addon_item_order` (
26 `order_item_id` int(11) NOT NULL,
27 `item_id` int(11) NOT NULL,
28 `quantity` int(11) DEFAULT NULL,
29 `comments` varchar(45) DEFAULT NULL,
30 PRIMARY KEY (`order_item_id`,`item_id`),
31 KEY `fk_7_idx` (`item_id`),
32 CONSTRAINT `fk_6` FOREIGN KEY (`order_item_id`) REFERENCES `order_item` (`order_item_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
33 CONSTRAINT `fk_7` FOREIGN KEY (`item_id`) REFERENCES `item` (`item_id`) ON DELETE NO ACTION ON UPDATE NO ACTION
34) ENGINE=InnoDB DEFAULT CHARSET=latin1;
35/*!40101 SET character_set_client = @saved_cs_client */;
36
37--
38-- Dumping data for table `addon_item_order`
39--
40
41LOCK TABLES `addon_item_order` WRITE;
42/*!40000 ALTER TABLE `addon_item_order` DISABLE KEYS */;
43INSERT INTO `addon_item_order` (`order_item_id`, `item_id`, `quantity`, `comments`) VALUES (2,2,1,NULL);
44/*!40000 ALTER TABLE `addon_item_order` ENABLE KEYS */;
45UNLOCK TABLES;
46
47--
48-- Table structure for table `bill_types`
49--
50
51DROP TABLE IF EXISTS `bill_types`;
52/*!40101 SET @saved_cs_client = @@character_set_client */;
53 SET character_set_client = utf8mb4 ;
54CREATE TABLE `bill_types` (
55 `bill_type_id` int(11) NOT NULL AUTO_INCREMENT,
56 `bill_type` varchar(45) NOT NULL,
57 `description` text,
58 PRIMARY KEY (`bill_type_id`),
59 UNIQUE KEY `bill_type_UNIQUE` (`bill_type`),
60 UNIQUE KEY `bill_type_id_UNIQUE` (`bill_type_id`)
61) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
62/*!40101 SET character_set_client = @saved_cs_client */;
63
64--
65-- Dumping data for table `bill_types`
66--
67
68LOCK TABLES `bill_types` WRITE;
69/*!40000 ALTER TABLE `bill_types` DISABLE KEYS */;
70INSERT INTO `bill_types` (`bill_type_id`, `bill_type`, `description`) VALUES (1,'Cash','Pay by Cash'),(2,'Card','Credit/Debit Card'),(3,'No Cash','No Cash');
71/*!40000 ALTER TABLE `bill_types` ENABLE KEYS */;
72UNLOCK TABLES;
73
74--
75-- Table structure for table `billing`
76--
77
78DROP TABLE IF EXISTS `billing`;
79/*!40101 SET @saved_cs_client = @@character_set_client */;
80 SET character_set_client = utf8mb4 ;
81CREATE TABLE `billing` (
82 `bill_id` int(11) NOT NULL AUTO_INCREMENT,
83 `order_id` varchar(45) DEFAULT NULL,
84 `total_amount` varchar(45) DEFAULT NULL,
85 `tax` varchar(45) DEFAULT NULL,
86 `without_tax` varchar(45) DEFAULT NULL,
87 `bill_type_id` int(11) DEFAULT NULL,
88 `employee_id` int(11) DEFAULT NULL,
89 PRIMARY KEY (`bill_id`),
90 UNIQUE KEY `bill_id_UNIQUE` (`bill_id`),
91 KEY `employee_id_fk_idx` (`employee_id`),
92 KEY `bill_type_id_fk_idx` (`bill_type_id`),
93 CONSTRAINT `bill_type_id_fk` FOREIGN KEY (`bill_type_id`) REFERENCES `bill_types` (`bill_type_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
94 CONSTRAINT `employee_id_fk` FOREIGN KEY (`employee_id`) REFERENCES `employee` (`employee_id`) ON UPDATE CASCADE
95) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
96/*!40101 SET character_set_client = @saved_cs_client */;
97
98--
99-- Dumping data for table `billing`
100--
101
102LOCK TABLES `billing` WRITE;
103/*!40000 ALTER TABLE `billing` DISABLE KEYS */;
104INSERT INTO `billing` (`bill_id`, `order_id`, `total_amount`, `tax`, `without_tax`, `bill_type_id`, `employee_id`) VALUES (1,'9','90',NULL,NULL,NULL,NULL),(2,'10','74',NULL,NULL,NULL,NULL),(3,'12','180',NULL,NULL,NULL,NULL),(4,'13','62',NULL,NULL,1,NULL);
105/*!40000 ALTER TABLE `billing` ENABLE KEYS */;
106UNLOCK TABLES;
107
108--
109-- Table structure for table `category`
110--
111
112DROP TABLE IF EXISTS `category`;
113/*!40101 SET @saved_cs_client = @@character_set_client */;
114 SET character_set_client = utf8mb4 ;
115CREATE TABLE `category` (
116 `category_id` int(11) NOT NULL AUTO_INCREMENT,
117 `category_name` varchar(45) NOT NULL,
118 `category_desc` text,
119 PRIMARY KEY (`category_id`),
120 UNIQUE KEY `category_id_UNIQUE` (`category_id`),
121 UNIQUE KEY `category_name_UNIQUE` (`category_name`)
122) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;
123/*!40101 SET character_set_client = @saved_cs_client */;
124
125--
126-- Dumping data for table `category`
127--
128
129LOCK TABLES `category` WRITE;
130/*!40000 ALTER TABLE `category` DISABLE KEYS */;
131INSERT INTO `category` (`category_id`, `category_name`, `category_desc`) VALUES (1,'Pizza','Pizza Category'),(7,'Pasta','Discover the real pizza'),(8,'Cake','Baked fresh for you'),(9,'Burger','Have it your way'),(10,'Cookie','Cookie Monsters');
132/*!40000 ALTER TABLE `category` ENABLE KEYS */;
133UNLOCK TABLES;
134
135--
136-- Table structure for table `customer`
137--
138
139DROP TABLE IF EXISTS `customer`;
140/*!40101 SET @saved_cs_client = @@character_set_client */;
141 SET character_set_client = utf8mb4 ;
142CREATE TABLE `customer` (
143 `customer_id` int(11) NOT NULL AUTO_INCREMENT,
144 `name` varchar(45) NOT NULL,
145 `email` varchar(45) DEFAULT NULL,
146 `mobileno` bigint(20) unsigned NOT NULL,
147 PRIMARY KEY (`customer_id`),
148 UNIQUE KEY `mobileno_UNIQUE` (`mobileno`),
149 UNIQUE KEY `email_UNIQUE` (`email`)
150) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;
151/*!40101 SET character_set_client = @saved_cs_client */;
152
153--
154-- Dumping data for table `customer`
155--
156
157LOCK TABLES `customer` WRITE;
158/*!40000 ALTER TABLE `customer` DISABLE KEYS */;
159INSERT INTO `customer` (`customer_id`, `name`, `email`, `mobileno`) VALUES (1,'Vinoth','Vinoth@gmail.com',9876543210),(7,'Vinoth','naveen@gmail.com',9468776032);
160/*!40000 ALTER TABLE `customer` ENABLE KEYS */;
161UNLOCK TABLES;
162
163--
164-- Table structure for table `dontuse_location`
165--
166
167DROP TABLE IF EXISTS `dontuse_location`;
168/*!40101 SET @saved_cs_client = @@character_set_client */;
169 SET character_set_client = utf8mb4 ;
170CREATE TABLE `dontuse_location` (
171 `location_id` int(11) NOT NULL AUTO_INCREMENT,
172 `type` varchar(45) DEFAULT NULL,
173 `name` varchar(45) DEFAULT NULL,
174 `addressline1` varchar(45) DEFAULT NULL,
175 `addressline2` varchar(45) DEFAULT NULL,
176 `locality` varchar(45) DEFAULT NULL,
177 `city` varchar(45) DEFAULT NULL,
178 `state` varchar(45) DEFAULT NULL,
179 `country` varchar(45) DEFAULT NULL,
180 `latitude` varchar(45) DEFAULT NULL,
181 `longitude` varchar(45) DEFAULT NULL,
182 PRIMARY KEY (`location_id`)
183) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
184/*!40101 SET character_set_client = @saved_cs_client */;
185
186--
187-- Dumping data for table `dontuse_location`
188--
189
190LOCK TABLES `dontuse_location` WRITE;
191/*!40000 ALTER TABLE `dontuse_location` DISABLE KEYS */;
192INSERT INTO `dontuse_location` (`location_id`, `type`, `name`, `addressline1`, `addressline2`, `locality`, `city`, `state`, `country`, `latitude`, `longitude`) VALUES (1,'Self','Table1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
193/*!40000 ALTER TABLE `dontuse_location` ENABLE KEYS */;
194UNLOCK TABLES;
195
196--
197-- Table structure for table `employee`
198--
199
200DROP TABLE IF EXISTS `employee`;
201/*!40101 SET @saved_cs_client = @@character_set_client */;
202 SET character_set_client = utf8mb4 ;
203CREATE TABLE `employee` (
204 `employee_id` int(11) NOT NULL AUTO_INCREMENT,
205 `name` varchar(45) DEFAULT NULL,
206 `pending_orders` varchar(45) DEFAULT NULL,
207 `availability` varchar(45) DEFAULT NULL,
208 `aadhaar_number` varchar(16) DEFAULT NULL,
209 PRIMARY KEY (`employee_id`),
210 UNIQUE KEY `aadhaar_number_UNIQUE` (`aadhaar_number`)
211) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
212/*!40101 SET character_set_client = @saved_cs_client */;
213
214--
215-- Dumping data for table `employee`
216--
217
218LOCK TABLES `employee` WRITE;
219/*!40000 ALTER TABLE `employee` DISABLE KEYS */;
220INSERT INTO `employee` (`employee_id`, `name`, `pending_orders`, `availability`, `aadhaar_number`) VALUES (1,'Naveen','3','Y',NULL),(3,'kamal','0','1',NULL);
221/*!40000 ALTER TABLE `employee` ENABLE KEYS */;
222UNLOCK TABLES;
223
224--
225-- Table structure for table `employee_item_assoc`
226--
227
228DROP TABLE IF EXISTS `employee_item_assoc`;
229/*!40101 SET @saved_cs_client = @@character_set_client */;
230 SET character_set_client = utf8mb4 ;
231CREATE TABLE `employee_item_assoc` (
232 `employee_id` int(11) NOT NULL,
233 `item_id` int(11) NOT NULL,
234 PRIMARY KEY (`employee_id`,`item_id`),
235 KEY `fk_9_idx` (`item_id`),
236 CONSTRAINT `fk_10` FOREIGN KEY (`employee_id`) REFERENCES `employee` (`employee_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
237 CONSTRAINT `fk_9` FOREIGN KEY (`item_id`) REFERENCES `item` (`item_id`) ON DELETE NO ACTION ON UPDATE NO ACTION
238) ENGINE=InnoDB DEFAULT CHARSET=latin1;
239/*!40101 SET character_set_client = @saved_cs_client */;
240
241--
242-- Dumping data for table `employee_item_assoc`
243--
244
245LOCK TABLES `employee_item_assoc` WRITE;
246/*!40000 ALTER TABLE `employee_item_assoc` DISABLE KEYS */;
247INSERT INTO `employee_item_assoc` (`employee_id`, `item_id`) VALUES (1,1);
248/*!40000 ALTER TABLE `employee_item_assoc` ENABLE KEYS */;
249UNLOCK TABLES;
250
251--
252-- Table structure for table `item`
253--
254
255DROP TABLE IF EXISTS `item`;
256/*!40101 SET @saved_cs_client = @@character_set_client */;
257 SET character_set_client = utf8mb4 ;
258CREATE TABLE `item` (
259 `item_id` int(11) NOT NULL AUTO_INCREMENT,
260 `type` varchar(45) DEFAULT NULL,
261 `name` varchar(45) NOT NULL,
262 `category_id` int(11) NOT NULL,
263 `description` text,
264 `price` float NOT NULL DEFAULT '0',
265 `unit_price` float DEFAULT NULL,
266 `available_quantity` int(11) NOT NULL DEFAULT '0',
267 `pic_filename` varchar(255) DEFAULT NULL,
268 `tax` float DEFAULT NULL,
269 `status` tinyint(4) NOT NULL DEFAULT '0',
270 PRIMARY KEY (`item_id`),
271 KEY `category_id_fk_idx` (`category_id`),
272 CONSTRAINT `category_id_fk` FOREIGN KEY (`category_id`) REFERENCES `category` (`category_id`) ON UPDATE CASCADE
273) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=latin1;
274/*!40101 SET character_set_client = @saved_cs_client */;
275
276--
277-- Dumping data for table `item`
278--
279
280LOCK TABLES `item` WRITE;
281/*!40000 ALTER TABLE `item` DISABLE KEYS */;
282INSERT INTO `item` (`item_id`, `type`, `name`, `category_id`, `description`, `price`, `unit_price`, `available_quantity`, `pic_filename`, `tax`, `status`) VALUES (1,'Pizza','Barbeque chicken-Medium',1,'description 1',50,NULL,100,NULL,8,1),(2,'Cheese','Extra Cheese',1,'description 2',40,NULL,30,NULL,8,1),(3,'Pizza','Barbeque chicken-Medium',1,'description 3',75,NULL,90,NULL,8,1),(4,'item type sample','item name sample',1,'item desc sample',45,NULL,50,NULL,8,1),(6,'Test','Pasta',7,'pasta',12,NULL,14,NULL,5,0),(7,'test cake','Cake 1',8,'cake',12,NULL,14,NULL,125,0),(8,'test brugger','Burger',9,'test',50,NULL,14,NULL,5,0),(9,'cookie','Cookie',10,'test',1,NULL,423,NULL,5,0);
283/*!40000 ALTER TABLE `item` ENABLE KEYS */;
284UNLOCK TABLES;
285
286--
287-- Table structure for table `login_info`
288--
289
290DROP TABLE IF EXISTS `login_info`;
291/*!40101 SET @saved_cs_client = @@character_set_client */;
292 SET character_set_client = utf8mb4 ;
293CREATE TABLE `login_info` (
294 `employee_id` int(11) NOT NULL,
295 `category` varchar(45) DEFAULT NULL,
296 `password` varchar(45) NOT NULL,
297 `is_active` varchar(45) DEFAULT NULL,
298 `reference_id` int(11) DEFAULT NULL,
299 `username` varchar(45) NOT NULL,
300 `email` varchar(45) DEFAULT NULL,
301 PRIMARY KEY (`employee_id`),
302 UNIQUE KEY `password_UNIQUE` (`password`),
303 UNIQUE KEY `login_name_UNIQUE` (`username`),
304 UNIQUE KEY `employee_id_UNIQUE` (`employee_id`),
305 UNIQUE KEY `email_UNIQUE` (`email`),
306 KEY `emp_id_fk_idx` (`employee_id`),
307 CONSTRAINT `emp_id_fk` FOREIGN KEY (`employee_id`) REFERENCES `employee` (`employee_id`) ON DELETE NO ACTION ON UPDATE NO ACTION
308) ENGINE=InnoDB DEFAULT CHARSET=latin1;
309/*!40101 SET character_set_client = @saved_cs_client */;
310
311--
312-- Dumping data for table `login_info`
313--
314
315LOCK TABLES `login_info` WRITE;
316/*!40000 ALTER TABLE `login_info` DISABLE KEYS */;
317INSERT INTO `login_info` (`employee_id`, `category`, `password`, `is_active`, `reference_id`, `username`, `email`) VALUES (1,'Employee','jG6VjgkGKJ8gdDHF772','Y',5000,'naveen',NULL),(3,'Employee','password','Y',NULL,'kamal','kamal@dotworld.in');
318/*!40000 ALTER TABLE `login_info` ENABLE KEYS */;
319UNLOCK TABLES;
320
321--
322-- Table structure for table `order_item`
323--
324
325DROP TABLE IF EXISTS `order_item`;
326/*!40101 SET @saved_cs_client = @@character_set_client */;
327 SET character_set_client = utf8mb4 ;
328CREATE TABLE `order_item` (
329 `order_item_id` int(11) NOT NULL AUTO_INCREMENT,
330 `order_id` int(11) DEFAULT NULL,
331 `item_id` int(11) DEFAULT NULL,
332 `assigned_to` int(11) DEFAULT NULL,
333 `estimated_completion` date DEFAULT NULL,
334 `special_instructions` varchar(45) DEFAULT NULL,
335 PRIMARY KEY (`order_item_id`),
336 KEY `fk_3_idx` (`assigned_to`),
337 KEY `fk_4` (`order_id`),
338 KEY `fk_5` (`item_id`),
339 CONSTRAINT `fk_3` FOREIGN KEY (`assigned_to`) REFERENCES `employee` (`employee_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
340 CONSTRAINT `fk_4` FOREIGN KEY (`order_id`) REFERENCES `orders` (`order_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
341 CONSTRAINT `fk_5` FOREIGN KEY (`item_id`) REFERENCES `item` (`item_id`) ON DELETE NO ACTION ON UPDATE NO ACTION
342) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=latin1;
343/*!40101 SET character_set_client = @saved_cs_client */;
344
345--
346-- Dumping data for table `order_item`
347--
348
349LOCK TABLES `order_item` WRITE;
350/*!40000 ALTER TABLE `order_item` DISABLE KEYS */;
351INSERT INTO `order_item` (`order_item_id`, `order_id`, `item_id`, `assigned_to`, `estimated_completion`, `special_instructions`) VALUES (2,2,1,1,'2018-10-28','Need spicy and less salty'),(3,7,1,NULL,NULL,NULL),(4,7,2,NULL,NULL,NULL),(5,8,1,NULL,NULL,NULL),(6,8,2,NULL,NULL,NULL),(7,9,1,NULL,NULL,NULL),(8,9,2,NULL,NULL,NULL),(9,10,1,NULL,NULL,NULL),(10,10,6,NULL,NULL,NULL),(11,12,1,NULL,NULL,NULL),(12,12,2,NULL,NULL,NULL),(13,12,8,NULL,NULL,NULL),(14,13,6,NULL,NULL,NULL),(15,13,1,NULL,NULL,NULL);
352/*!40000 ALTER TABLE `order_item` ENABLE KEYS */;
353UNLOCK TABLES;
354
355--
356-- Table structure for table `orders`
357--
358
359DROP TABLE IF EXISTS `orders`;
360/*!40101 SET @saved_cs_client = @@character_set_client */;
361 SET character_set_client = utf8mb4 ;
362CREATE TABLE `orders` (
363 `order_id` int(11) NOT NULL AUTO_INCREMENT,
364 `customer_id` int(11) NOT NULL,
365 `table_id` int(11) DEFAULT NULL,
366 `cost` double DEFAULT NULL,
367 `tax` double DEFAULT NULL,
368 `discount` double DEFAULT NULL,
369 `created_time` timestamp NULL DEFAULT NULL,
370 `order_status_type_id` int(11) NOT NULL DEFAULT '1',
371 PRIMARY KEY (`order_id`),
372 KEY `fk_1_idx` (`customer_id`),
373 KEY `table_id_fk2_idx` (`table_id`),
374 KEY `fk_2_idx` (`order_status_type_id`),
375 CONSTRAINT `fk_1` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
376 CONSTRAINT `fk_2` FOREIGN KEY (`order_status_type_id`) REFERENCES `orders_status_type` (`orders_status_type_id`) ON UPDATE CASCADE,
377 CONSTRAINT `table_id_fk` FOREIGN KEY (`table_id`) REFERENCES `table_details` (`table_id`) ON DELETE NO ACTION ON UPDATE NO ACTION
378) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=latin1;
379/*!40101 SET character_set_client = @saved_cs_client */;
380
381--
382-- Dumping data for table `orders`
383--
384
385LOCK TABLES `orders` WRITE;
386/*!40000 ALTER TABLE `orders` DISABLE KEYS */;
387INSERT INTO `orders` (`order_id`, `customer_id`, `table_id`, `cost`, `tax`, `discount`, `created_time`, `order_status_type_id`) VALUES (2,1,1,560.45,34.22,54,'2018-10-28 00:00:00',1),(6,1,1,112,0,0,'2018-11-13 19:33:21',1),(7,1,1,180,0,0,'2018-11-13 19:39:37',1),(8,1,1,180,0,0,'2018-11-13 19:43:41',1),(9,1,1,90,0,0,'2018-11-13 19:58:34',1),(10,1,1,74,0,0,'2018-11-13 20:22:38',1),(11,1,1,0,0,0,'2018-11-13 23:22:36',1),(12,1,1,180,0,0,'2018-11-14 00:57:41',1),(13,1,1,62,0,0,'2018-11-14 01:01:21',1);
388/*!40000 ALTER TABLE `orders` ENABLE KEYS */;
389UNLOCK TABLES;
390
391--
392-- Table structure for table `orders_status_type`
393--
394
395DROP TABLE IF EXISTS `orders_status_type`;
396/*!40101 SET @saved_cs_client = @@character_set_client */;
397 SET character_set_client = utf8mb4 ;
398CREATE TABLE `orders_status_type` (
399 `orders_status_type_id` int(11) NOT NULL AUTO_INCREMENT,
400 `orders_status_type` varchar(15) NOT NULL,
401 `description` varchar(15) DEFAULT NULL,
402 PRIMARY KEY (`orders_status_type_id`),
403 UNIQUE KEY `orders_status_type_UNIQUE` (`orders_status_type`)
404) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
405/*!40101 SET character_set_client = @saved_cs_client */;
406
407--
408-- Dumping data for table `orders_status_type`
409--
410
411LOCK TABLES `orders_status_type` WRITE;
412/*!40000 ALTER TABLE `orders_status_type` DISABLE KEYS */;
413INSERT INTO `orders_status_type` (`orders_status_type_id`, `orders_status_type`, `description`) VALUES (1,'New','Order Placed'),(2,'Accepted','Order Accepted'),(3,'Unbilled','Order unbilled'),(4,'Closed','Order closed');
414/*!40000 ALTER TABLE `orders_status_type` ENABLE KEYS */;
415UNLOCK TABLES;
416
417--
418-- Table structure for table `resource`
419--
420
421DROP TABLE IF EXISTS `resource`;
422/*!40101 SET @saved_cs_client = @@character_set_client */;
423 SET character_set_client = utf8mb4 ;
424CREATE TABLE `resource` (
425 `resource_id` int(11) NOT NULL AUTO_INCREMENT,
426 `category` varchar(45) DEFAULT NULL,
427 `url` varchar(45) DEFAULT NULL,
428 `name` varchar(45) DEFAULT NULL,
429 PRIMARY KEY (`resource_id`)
430) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
431/*!40101 SET character_set_client = @saved_cs_client */;
432
433--
434-- Dumping data for table `resource`
435--
436
437LOCK TABLES `resource` WRITE;
438/*!40000 ALTER TABLE `resource` DISABLE KEYS */;
439INSERT INTO `resource` (`resource_id`, `category`, `url`, `name`) VALUES (1,'Menu',NULL,'My Order');
440/*!40000 ALTER TABLE `resource` ENABLE KEYS */;
441UNLOCK TABLES;
442
443--
444-- Table structure for table `roles`
445--
446
447DROP TABLE IF EXISTS `roles`;
448/*!40101 SET @saved_cs_client = @@character_set_client */;
449 SET character_set_client = utf8mb4 ;
450CREATE TABLE `roles` (
451 `role_id` int(11) NOT NULL AUTO_INCREMENT,
452 `role_name` varchar(45) NOT NULL,
453 `role_description` text,
454 PRIMARY KEY (`role_id`),
455 UNIQUE KEY `role_name_UNIQUE` (`role_name`),
456 UNIQUE KEY `role_id_UNIQUE` (`role_id`)
457) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;
458/*!40101 SET character_set_client = @saved_cs_client */;
459
460--
461-- Dumping data for table `roles`
462--
463
464LOCK TABLES `roles` WRITE;
465/*!40000 ALTER TABLE `roles` DISABLE KEYS */;
466INSERT INTO `roles` (`role_id`, `role_name`, `role_description`) VALUES (1,'admin','Administrator of the app, not need to be the owner'),(2,'owner','Owner of the restaurent'),(3,'staff','Employee'),(4,'item','full access to items'),(5,'item_read','read access to items'),(6,'item_write','write/modify access to items'),(7,'item_delete','delete access to items'),(8,'category_delete','delete access to category'),(9,'category_read','read access to category'),(10,'category_write','write/modify access to category');
467/*!40000 ALTER TABLE `roles` ENABLE KEYS */;
468UNLOCK TABLES;
469
470--
471-- Table structure for table `table_details`
472--
473
474DROP TABLE IF EXISTS `table_details`;
475/*!40101 SET @saved_cs_client = @@character_set_client */;
476 SET character_set_client = utf8mb4 ;
477CREATE TABLE `table_details` (
478 `table_id` int(11) NOT NULL AUTO_INCREMENT,
479 `table_name` varchar(35) NOT NULL,
480 `capacity` int(11) NOT NULL,
481 `available_seat` int(11) DEFAULT NULL,
482 `occupied_status` varchar(1) DEFAULT NULL,
483 PRIMARY KEY (`table_id`)
484) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;
485/*!40101 SET character_set_client = @saved_cs_client */;
486
487--
488-- Dumping data for table `table_details`
489--
490
491LOCK TABLES `table_details` WRITE;
492/*!40000 ALTER TABLE `table_details` DISABLE KEYS */;
493INSERT INTO `table_details` (`table_id`, `table_name`, `capacity`, `available_seat`, `occupied_status`) VALUES (1,'Table 1',4,4,'A'),(2,'Table 2',4,0,'O'),(3,'Table 3',6,2,'O'),(4,'Table 4',2,2,'A'),(5,'Table 5',6,6,'A');
494/*!40000 ALTER TABLE `table_details` ENABLE KEYS */;
495UNLOCK TABLES;
496
497--
498-- Table structure for table `user_roles`
499--
500
501DROP TABLE IF EXISTS `user_roles`;
502/*!40101 SET @saved_cs_client = @@character_set_client */;
503 SET character_set_client = utf8mb4 ;
504CREATE TABLE `user_roles` (
505 `employee_id` int(11) NOT NULL,
506 `role_id` int(11) NOT NULL,
507 KEY `fk1_user_id_idx` (`employee_id`),
508 KEY `fk2_role_id_idx` (`role_id`),
509 CONSTRAINT `fk1_user_id` FOREIGN KEY (`employee_id`) REFERENCES `login_info` (`employee_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
510 CONSTRAINT `fk2_role_id` FOREIGN KEY (`role_id`) REFERENCES `roles` (`role_id`) ON DELETE NO ACTION ON UPDATE NO ACTION
511) ENGINE=InnoDB DEFAULT CHARSET=latin1;
512/*!40101 SET character_set_client = @saved_cs_client */;
513
514--
515-- Dumping data for table `user_roles`
516--
517
518LOCK TABLES `user_roles` WRITE;
519/*!40000 ALTER TABLE `user_roles` DISABLE KEYS */;
520INSERT INTO `user_roles` (`employee_id`, `role_id`) VALUES (1,1),(1,2);
521/*!40000 ALTER TABLE `user_roles` ENABLE KEYS */;
522UNLOCK TABLES;
523
524--
525-- Dumping routines for database 'pos_main'
526--
527/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
528
529/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
530/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
531/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
532/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
533/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
534/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
535/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
536
537-- Dump completed on 2018-11-14 13:12:15