· 5 years ago · Apr 02, 2020, 11:44 AM
1-- MySQL dump 10.13 Distrib 8.0.19, for macos10.15 (x86_64)
2--
3-- Host: localhost Database: db_client_belal
4-- ------------------------------------------------------
5-- Server version 5.7.29
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/*!50503 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 `AppProductStatuses`
20--
21
22DROP TABLE IF EXISTS `AppProductStatuses`;
23/*!40101 SET @saved_cs_client = @@character_set_client */;
24/*!50503 SET character_set_client = utf8mb4 */;
25CREATE TABLE `AppProductStatuses` (
26 `name` varchar(255) DEFAULT '',
27 `sku` varchar(255) DEFAULT '',
28 `error` varchar(255) DEFAULT '',
29 `appId` int(11) DEFAULT NULL,
30 `externalProductId` varchar(255) DEFAULT '',
31 `internalProductId` int(11) DEFAULT NULL,
32 `externalId` varchar(255) DEFAULT '',
33 `type` enum('Product','Variant') DEFAULT NULL,
34 `status` enum('Linked','UnLinked','Not_Found') DEFAULT NULL,
35 `id` int(11) NOT NULL AUTO_INCREMENT,
36 `createdAt` datetime DEFAULT NULL,
37 `updatedAt` datetime DEFAULT NULL,
38 `deletedAt` datetime DEFAULT NULL,
39 PRIMARY KEY (`id`)
40) ENGINE=InnoDB DEFAULT CHARSET=utf8;
41/*!40101 SET character_set_client = @saved_cs_client */;
42
43--
44-- Table structure for table `AppProducts`
45--
46
47DROP TABLE IF EXISTS `AppProducts`;
48/*!40101 SET @saved_cs_client = @@character_set_client */;
49/*!50503 SET character_set_client = utf8mb4 */;
50CREATE TABLE `AppProducts` (
51 `externalId` int(11) DEFAULT NULL,
52 `appId` int(11) DEFAULT NULL,
53 `sku` varchar(255) DEFAULT '',
54 `type` varchar(255) DEFAULT '',
55 `payload` text,
56 `id` int(11) NOT NULL AUTO_INCREMENT,
57 `createdAt` datetime DEFAULT NULL,
58 `updatedAt` datetime DEFAULT NULL,
59 `deletedAt` datetime DEFAULT NULL,
60 PRIMARY KEY (`id`)
61) ENGINE=InnoDB DEFAULT CHARSET=utf8;
62/*!40101 SET character_set_client = @saved_cs_client */;
63
64--
65-- Table structure for table `AppSubscriptionAttributes`
66--
67
68DROP TABLE IF EXISTS `AppSubscriptionAttributes`;
69/*!40101 SET @saved_cs_client = @@character_set_client */;
70/*!50503 SET character_set_client = utf8mb4 */;
71CREATE TABLE `AppSubscriptionAttributes` (
72 `name` varchar(255) DEFAULT '',
73 `value` varchar(255) DEFAULT '',
74 `id` int(11) NOT NULL AUTO_INCREMENT,
75 `merchantAppSubscriptionId` int(11) DEFAULT NULL,
76 `createdAt` datetime DEFAULT NULL,
77 `updatedAt` datetime DEFAULT NULL,
78 `deletedAt` datetime DEFAULT NULL,
79 PRIMARY KEY (`id`),
80 KEY `appsubscriptionattributes_merchantappsubscription_fkey_constrain` (`merchantAppSubscriptionId`),
81 CONSTRAINT `appsubscriptionattributes_merchantappsubscription_fkey_constrain` FOREIGN KEY (`merchantAppSubscriptionId`) REFERENCES `MerchantAppSubscriptions` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
82) ENGINE=InnoDB DEFAULT CHARSET=utf8;
83/*!40101 SET character_set_client = @saved_cs_client */;
84
85--
86-- Table structure for table `AppVariants`
87--
88
89DROP TABLE IF EXISTS `AppVariants`;
90/*!40101 SET @saved_cs_client = @@character_set_client */;
91/*!50503 SET character_set_client = utf8mb4 */;
92CREATE TABLE `AppVariants` (
93 `externalId` int(11) DEFAULT NULL,
94 `appId` int(11) DEFAULT NULL,
95 `sku` varchar(255) DEFAULT '',
96 `payload` text,
97 `id` int(11) NOT NULL AUTO_INCREMENT,
98 `appProductId` int(11) DEFAULT NULL,
99 `createdAt` datetime DEFAULT NULL,
100 `updatedAt` datetime DEFAULT NULL,
101 `deletedAt` datetime DEFAULT NULL,
102 PRIMARY KEY (`id`),
103 KEY `appvariant_appproduct_fkey_constrain` (`appProductId`),
104 CONSTRAINT `appvariant_appproduct_fkey_constrain` FOREIGN KEY (`appProductId`) REFERENCES `AppProducts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
105) ENGINE=InnoDB DEFAULT CHARSET=utf8;
106/*!40101 SET character_set_client = @saved_cs_client */;
107
108--
109-- Table structure for table `Brands`
110--
111
112DROP TABLE IF EXISTS `Brands`;
113/*!40101 SET @saved_cs_client = @@character_set_client */;
114/*!50503 SET character_set_client = utf8mb4 */;
115CREATE TABLE `Brands` (
116 `name` varchar(255) DEFAULT '',
117 `id` int(11) NOT NULL AUTO_INCREMENT,
118 `createdAt` datetime DEFAULT NULL,
119 `updatedAt` datetime DEFAULT NULL,
120 `deletedAt` datetime DEFAULT NULL,
121 PRIMARY KEY (`id`)
122) ENGINE=InnoDB DEFAULT CHARSET=utf8;
123/*!40101 SET character_set_client = @saved_cs_client */;
124
125--
126-- Table structure for table `Customers`
127--
128
129DROP TABLE IF EXISTS `Customers`;
130/*!40101 SET @saved_cs_client = @@character_set_client */;
131/*!50503 SET character_set_client = utf8mb4 */;
132CREATE TABLE `Customers` (
133 `name` varchar(255) DEFAULT '',
134 `mobileNumber` varchar(255) DEFAULT '',
135 `email` varchar(255) DEFAULT '',
136 `shippingAddress` text,
137 `billingAddress` text,
138 `shippingToAddress` text,
139 `id` int(11) NOT NULL AUTO_INCREMENT,
140 `createdAt` datetime DEFAULT NULL,
141 `updatedAt` datetime DEFAULT NULL,
142 `deletedAt` datetime DEFAULT NULL,
143 PRIMARY KEY (`id`)
144) ENGINE=InnoDB DEFAULT CHARSET=utf8;
145/*!40101 SET character_set_client = @saved_cs_client */;
146
147--
148-- Table structure for table `ErrorLogs`
149--
150
151DROP TABLE IF EXISTS `ErrorLogs`;
152/*!40101 SET @saved_cs_client = @@character_set_client */;
153/*!50503 SET character_set_client = utf8mb4 */;
154CREATE TABLE `ErrorLogs` (
155 `appId` int(11) DEFAULT NULL,
156 `time` datetime DEFAULT NULL,
157 `action` varchar(255) DEFAULT '',
158 `object` varchar(255) DEFAULT '',
159 `message` varchar(255) DEFAULT '',
160 `id` int(11) NOT NULL AUTO_INCREMENT,
161 `createdAt` datetime DEFAULT NULL,
162 `updatedAt` datetime DEFAULT NULL,
163 `deletedAt` datetime DEFAULT NULL,
164 PRIMARY KEY (`id`)
165) ENGINE=InnoDB DEFAULT CHARSET=utf8;
166/*!40101 SET character_set_client = @saved_cs_client */;
167
168--
169-- Table structure for table `Files`
170--
171
172DROP TABLE IF EXISTS `Files`;
173/*!40101 SET @saved_cs_client = @@character_set_client */;
174/*!50503 SET character_set_client = utf8mb4 */;
175CREATE TABLE `Files` (
176 `s3TmpVersion` varchar(255) DEFAULT '',
177 `s3TmpKey` varchar(255) DEFAULT '',
178 `link` varchar(255) DEFAULT '',
179 `linkVersion` varchar(255) DEFAULT '',
180 `uuid` varchar(255) DEFAULT '',
181 `type` varchar(255) DEFAULT '',
182 `id` int(11) NOT NULL AUTO_INCREMENT,
183 `createdAt` datetime DEFAULT NULL,
184 `updatedAt` datetime DEFAULT NULL,
185 `deletedAt` datetime DEFAULT NULL,
186 PRIMARY KEY (`id`)
187) ENGINE=InnoDB DEFAULT CHARSET=utf8;
188/*!40101 SET character_set_client = @saved_cs_client */;
189
190--
191-- Table structure for table `MerchantAppSubscriptions`
192--
193
194DROP TABLE IF EXISTS `MerchantAppSubscriptions`;
195/*!40101 SET @saved_cs_client = @@character_set_client */;
196/*!50503 SET character_set_client = utf8mb4 */;
197CREATE TABLE `MerchantAppSubscriptions` (
198 `webHookKey` varchar(255) DEFAULT '',
199 `appId` int(11) DEFAULT NULL,
200 `id` int(11) NOT NULL AUTO_INCREMENT,
201 `stockLocationId` int(11) DEFAULT NULL,
202 `createdAt` datetime DEFAULT NULL,
203 `updatedAt` datetime DEFAULT NULL,
204 `deletedAt` datetime DEFAULT NULL,
205 PRIMARY KEY (`id`),
206 KEY `merchantappsubscription_stocklocation_fkey_constrain` (`stockLocationId`),
207 CONSTRAINT `merchantappsubscription_stocklocation_fkey_constrain` FOREIGN KEY (`stockLocationId`) REFERENCES `StockLocations` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
208) ENGINE=InnoDB DEFAULT CHARSET=utf8;
209/*!40101 SET character_set_client = @saved_cs_client */;
210
211--
212-- Table structure for table `OrderItems`
213--
214
215DROP TABLE IF EXISTS `OrderItems`;
216/*!40101 SET @saved_cs_client = @@character_set_client */;
217/*!50503 SET character_set_client = utf8mb4 */;
218CREATE TABLE `OrderItems` (
219 `quantity` int(11) DEFAULT NULL,
220 `pricePerItem` double DEFAULT NULL,
221 `discount` double DEFAULT NULL,
222 `id` int(11) NOT NULL AUTO_INCREMENT,
223 `orderId` int(11) DEFAULT NULL,
224 `productVariantId` int(11) DEFAULT NULL,
225 `createdAt` datetime DEFAULT NULL,
226 `updatedAt` datetime DEFAULT NULL,
227 `deletedAt` datetime DEFAULT NULL,
228 PRIMARY KEY (`id`),
229 KEY `orderitem_order_fkey_constrain` (`orderId`),
230 KEY `orderitem_productvariant_fkey_constrain` (`productVariantId`),
231 CONSTRAINT `orderitem_order_fkey_constrain` FOREIGN KEY (`orderId`) REFERENCES `Orders` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
232 CONSTRAINT `orderitem_productvariant_fkey_constrain` FOREIGN KEY (`productVariantId`) REFERENCES `ProductVariants` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
233) ENGINE=InnoDB DEFAULT CHARSET=utf8;
234/*!40101 SET character_set_client = @saved_cs_client */;
235
236--
237-- Table structure for table `Orders`
238--
239
240DROP TABLE IF EXISTS `Orders`;
241/*!40101 SET @saved_cs_client = @@character_set_client */;
242/*!50503 SET character_set_client = utf8mb4 */;
243CREATE TABLE `Orders` (
244 `channel` varchar(255) DEFAULT '',
245 `receivedAt` datetime DEFAULT NULL,
246 `orderNumber` varchar(255) DEFAULT '',
247 `paymentMethod` enum('CASH','CREDIT_CARD') DEFAULT NULL,
248 `shippingMethod` varchar(255) DEFAULT '',
249 `vatAmount` double DEFAULT NULL,
250 `shippingFee` double DEFAULT NULL,
251 `comments` text,
252 `status` enum('Submitted','Pending','Accepted','InProcessing','Canceled','Shipped','Delivered') DEFAULT NULL,
253 `shipmentDate` datetime DEFAULT NULL,
254 `reference` varchar(255) DEFAULT '',
255 `id` int(11) NOT NULL AUTO_INCREMENT,
256 `customerId` int(11) DEFAULT NULL,
257 `createdAt` datetime DEFAULT NULL,
258 `updatedAt` datetime DEFAULT NULL,
259 `deletedAt` datetime DEFAULT NULL,
260 PRIMARY KEY (`id`),
261 KEY `order_customer_fkey_constrain` (`customerId`),
262 CONSTRAINT `order_customer_fkey_constrain` FOREIGN KEY (`customerId`) REFERENCES `Customers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
263) ENGINE=InnoDB DEFAULT CHARSET=utf8;
264/*!40101 SET character_set_client = @saved_cs_client */;
265
266--
267-- Table structure for table `ProductPackSizes`
268--
269
270DROP TABLE IF EXISTS `ProductPackSizes`;
271/*!40101 SET @saved_cs_client = @@character_set_client */;
272/*!50503 SET character_set_client = utf8mb4 */;
273CREATE TABLE `ProductPackSizes` (
274 `label` varchar(255) DEFAULT '',
275 `quantity` int(11) DEFAULT NULL,
276 `id` int(11) NOT NULL AUTO_INCREMENT,
277 `productId` int(11) DEFAULT NULL,
278 `createdAt` datetime DEFAULT NULL,
279 `updatedAt` datetime DEFAULT NULL,
280 `deletedAt` datetime DEFAULT NULL,
281 PRIMARY KEY (`id`),
282 KEY `productpacksize_product_fkey_constrain` (`productId`),
283 CONSTRAINT `productpacksize_product_fkey_constrain` FOREIGN KEY (`productId`) REFERENCES `Products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
284) ENGINE=InnoDB DEFAULT CHARSET=utf8;
285/*!40101 SET character_set_client = @saved_cs_client */;
286
287--
288-- Table structure for table `ProductStatuses`
289--
290
291DROP TABLE IF EXISTS `ProductStatuses`;
292/*!40101 SET @saved_cs_client = @@character_set_client */;
293/*!50503 SET character_set_client = utf8mb4 */;
294CREATE TABLE `ProductStatuses` (
295 `name` varchar(255) DEFAULT '',
296 `description` varchar(255) DEFAULT '',
297 `id` int(11) NOT NULL AUTO_INCREMENT,
298 `createdAt` datetime DEFAULT NULL,
299 `updatedAt` datetime DEFAULT NULL,
300 `deletedAt` datetime DEFAULT NULL,
301 PRIMARY KEY (`id`)
302) ENGINE=InnoDB DEFAULT CHARSET=utf8;
303/*!40101 SET character_set_client = @saved_cs_client */;
304
305--
306-- Table structure for table `ProductToFiles`
307--
308
309DROP TABLE IF EXISTS `ProductToFiles`;
310/*!40101 SET @saved_cs_client = @@character_set_client */;
311/*!50503 SET character_set_client = utf8mb4 */;
312CREATE TABLE `ProductToFiles` (
313 `productId` int(11) DEFAULT NULL,
314 `fileId` int(11) DEFAULT NULL,
315 `isDefault` tinyint(1) DEFAULT NULL,
316 `id` int(11) NOT NULL AUTO_INCREMENT,
317 `createdAt` datetime DEFAULT NULL,
318 `updatedAt` datetime DEFAULT NULL,
319 `deletedAt` datetime DEFAULT NULL,
320 PRIMARY KEY (`id`),
321 UNIQUE KEY `producttofiles_unique_constrain` (`productId`,`fileId`),
322 KEY `product_file_fkey_constrain_2` (`fileId`),
323 CONSTRAINT `product_file_fkey_constrain_1` FOREIGN KEY (`productId`) REFERENCES `Products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
324 CONSTRAINT `product_file_fkey_constrain_2` FOREIGN KEY (`fileId`) REFERENCES `Files` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
325) ENGINE=InnoDB DEFAULT CHARSET=utf8;
326/*!40101 SET character_set_client = @saved_cs_client */;
327
328--
329-- Table structure for table `ProductToTags`
330--
331
332DROP TABLE IF EXISTS `ProductToTags`;
333/*!40101 SET @saved_cs_client = @@character_set_client */;
334/*!50503 SET character_set_client = utf8mb4 */;
335CREATE TABLE `ProductToTags` (
336 `id` int(11) NOT NULL AUTO_INCREMENT,
337 `productId` int(11) DEFAULT NULL,
338 `tagId` int(11) DEFAULT NULL,
339 `createdAt` datetime DEFAULT NULL,
340 `updatedAt` datetime DEFAULT NULL,
341 `deletedAt` datetime DEFAULT NULL,
342 PRIMARY KEY (`id`)
343) ENGINE=InnoDB DEFAULT CHARSET=utf8;
344/*!40101 SET character_set_client = @saved_cs_client */;
345
346--
347-- Table structure for table `ProductTypes`
348--
349
350DROP TABLE IF EXISTS `ProductTypes`;
351/*!40101 SET @saved_cs_client = @@character_set_client */;
352/*!50503 SET character_set_client = utf8mb4 */;
353CREATE TABLE `ProductTypes` (
354 `name` varchar(255) DEFAULT '',
355 `id` int(11) NOT NULL AUTO_INCREMENT,
356 `createdAt` datetime DEFAULT NULL,
357 `updatedAt` datetime DEFAULT NULL,
358 `deletedAt` datetime DEFAULT NULL,
359 PRIMARY KEY (`id`)
360) ENGINE=InnoDB DEFAULT CHARSET=utf8;
361/*!40101 SET character_set_client = @saved_cs_client */;
362
363--
364-- Table structure for table `ProductVariantToFiles`
365--
366
367DROP TABLE IF EXISTS `ProductVariantToFiles`;
368/*!40101 SET @saved_cs_client = @@character_set_client */;
369/*!50503 SET character_set_client = utf8mb4 */;
370CREATE TABLE `ProductVariantToFiles` (
371 `productVariantId` int(11) DEFAULT NULL,
372 `fileId` int(11) DEFAULT NULL,
373 `isDefault` tinyint(1) DEFAULT NULL,
374 `id` int(11) NOT NULL AUTO_INCREMENT,
375 `createdAt` datetime DEFAULT NULL,
376 `updatedAt` datetime DEFAULT NULL,
377 `deletedAt` datetime DEFAULT NULL,
378 PRIMARY KEY (`id`),
379 UNIQUE KEY `productvarianttofiles_unique_constrain` (`productVariantId`,`fileId`),
380 KEY `productvariant_file_fkey_constrain_2` (`fileId`),
381 CONSTRAINT `productvariant_file_fkey_constrain_1` FOREIGN KEY (`productVariantId`) REFERENCES `ProductVariants` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
382 CONSTRAINT `productvariant_file_fkey_constrain_2` FOREIGN KEY (`fileId`) REFERENCES `Files` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
383) ENGINE=InnoDB DEFAULT CHARSET=utf8;
384/*!40101 SET character_set_client = @saved_cs_client */;
385
386--
387-- Table structure for table `ProductVariantToStockLocations`
388--
389
390DROP TABLE IF EXISTS `ProductVariantToStockLocations`;
391/*!40101 SET @saved_cs_client = @@character_set_client */;
392/*!50503 SET character_set_client = utf8mb4 */;
393CREATE TABLE `ProductVariantToStockLocations` (
394 `quantity` int(11) DEFAULT NULL,
395 `id` int(11) NOT NULL AUTO_INCREMENT,
396 `stockLocationId` int(11) DEFAULT NULL,
397 `productVariantId` int(11) DEFAULT NULL,
398 `createdAt` datetime DEFAULT NULL,
399 `updatedAt` datetime DEFAULT NULL,
400 `deletedAt` datetime DEFAULT NULL,
401 PRIMARY KEY (`id`),
402 KEY `productvarianttostocklocation_stocklocation_fkey_constrain` (`stockLocationId`),
403 KEY `productvarianttostocklocation_productvariant_fkey_constrain` (`productVariantId`),
404 CONSTRAINT `productvarianttostocklocation_productvariant_fkey_constrain` FOREIGN KEY (`productVariantId`) REFERENCES `ProductVariants` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
405 CONSTRAINT `productvarianttostocklocation_stocklocation_fkey_constrain` FOREIGN KEY (`stockLocationId`) REFERENCES `StockLocations` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
406) ENGINE=InnoDB DEFAULT CHARSET=utf8;
407/*!40101 SET character_set_client = @saved_cs_client */;
408
409--
410-- Table structure for table `ProductVariants`
411--
412
413DROP TABLE IF EXISTS `ProductVariants`;
414/*!40101 SET @saved_cs_client = @@character_set_client */;
415/*!50503 SET character_set_client = utf8mb4 */;
416CREATE TABLE `ProductVariants` (
417 `sku` varchar(255) DEFAULT '',
418 `initialStock` double DEFAULT NULL,
419 `initialCost` double DEFAULT NULL,
420 `buyPrice` double DEFAULT NULL,
421 `wholeSalePrice` double DEFAULT NULL,
422 `retailPrice` double DEFAULT NULL,
423 `isPurchasable` tinyint(1) DEFAULT NULL,
424 `weight` double DEFAULT NULL,
425 `weightUnit` enum('g','kg','lb','oz') DEFAULT NULL,
426 `length` double DEFAULT NULL,
427 `width` double DEFAULT NULL,
428 `height` double DEFAULT NULL,
429 `handlingTime` datetime DEFAULT NULL,
430 `isContainsBattery` tinyint(1) DEFAULT NULL,
431 `isFreeShipping` tinyint(1) DEFAULT NULL,
432 `packSizeLabel` varchar(255) DEFAULT '',
433 `packSizeQuantity` double DEFAULT NULL,
434 `manageStockLevel` tinyint(1) DEFAULT NULL,
435 `isSellable` tinyint(1) DEFAULT NULL,
436 `isTaxable` tinyint(1) DEFAULT NULL,
437 `name` varchar(255) DEFAULT '',
438 `hsCode` varchar(255) DEFAULT '',
439 `barCode` varchar(255) DEFAULT '',
440 `supplierCode` varchar(255) DEFAULT '',
441 `description` text,
442 `variantAttributes` text,
443 `id` int(11) NOT NULL AUTO_INCREMENT,
444 `productId` int(11) DEFAULT NULL,
445 `createdAt` datetime DEFAULT NULL,
446 `updatedAt` datetime DEFAULT NULL,
447 `deletedAt` datetime DEFAULT NULL,
448 PRIMARY KEY (`id`),
449 UNIQUE KEY `sku` (`sku`),
450 KEY `productvariant_product_fkey_constrain` (`productId`),
451 CONSTRAINT `productvariant_product_fkey_constrain` FOREIGN KEY (`productId`) REFERENCES `Products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
452) ENGINE=InnoDB DEFAULT CHARSET=utf8;
453/*!40101 SET character_set_client = @saved_cs_client */;
454
455--
456-- Table structure for table `Products`
457--
458
459DROP TABLE IF EXISTS `Products`;
460/*!40101 SET @saved_cs_client = @@character_set_client */;
461/*!50503 SET character_set_client = utf8mb4 */;
462CREATE TABLE `Products` (
463 `description` text,
464 `name` varchar(255) DEFAULT '',
465 `title` varchar(255) DEFAULT '',
466 `batchTracked` tinyint(1) DEFAULT NULL,
467 `id` int(11) NOT NULL AUTO_INCREMENT,
468 `brandId` int(11) DEFAULT NULL,
469 `productTypeId` int(11) DEFAULT NULL,
470 `supplierId` int(11) DEFAULT NULL,
471 `productStatusId` int(11) DEFAULT NULL,
472 `createdAt` datetime DEFAULT NULL,
473 `updatedAt` datetime DEFAULT NULL,
474 `deletedAt` datetime DEFAULT NULL,
475 PRIMARY KEY (`id`),
476 KEY `product_brand_fkey_constrain` (`brandId`),
477 KEY `product_producttype_fkey_constrain` (`productTypeId`),
478 KEY `product_supplier_fkey_constrain` (`supplierId`),
479 KEY `product_productstatus_fkey_constrain` (`productStatusId`),
480 CONSTRAINT `product_brand_fkey_constrain` FOREIGN KEY (`brandId`) REFERENCES `Brands` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
481 CONSTRAINT `product_productstatus_fkey_constrain` FOREIGN KEY (`productStatusId`) REFERENCES `ProductStatuses` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
482 CONSTRAINT `product_producttype_fkey_constrain` FOREIGN KEY (`productTypeId`) REFERENCES `ProductTypes` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
483 CONSTRAINT `product_supplier_fkey_constrain` FOREIGN KEY (`supplierId`) REFERENCES `Suppliers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
484) ENGINE=InnoDB DEFAULT CHARSET=utf8;
485/*!40101 SET character_set_client = @saved_cs_client */;
486
487--
488-- Table structure for table `SequelizeMeta`
489--
490
491DROP TABLE IF EXISTS `SequelizeMeta`;
492/*!40101 SET @saved_cs_client = @@character_set_client */;
493/*!50503 SET character_set_client = utf8mb4 */;
494CREATE TABLE `SequelizeMeta` (
495 `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
496 PRIMARY KEY (`name`),
497 UNIQUE KEY `name` (`name`)
498) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
499/*!40101 SET character_set_client = @saved_cs_client */;
500
501--
502-- Table structure for table `StockLocations`
503--
504
505DROP TABLE IF EXISTS `StockLocations`;
506/*!40101 SET @saved_cs_client = @@character_set_client */;
507/*!50503 SET character_set_client = utf8mb4 */;
508CREATE TABLE `StockLocations` (
509 `name` varchar(255) DEFAULT '',
510 `description` varchar(255) DEFAULT '',
511 `city` varchar(255) DEFAULT '',
512 `countryId` varchar(255) DEFAULT '',
513 `buildingNo` varchar(255) DEFAULT '',
514 `streetName` varchar(255) DEFAULT '',
515 `zipCode` varchar(255) DEFAULT '',
516 `isActive` tinyint(1) DEFAULT NULL,
517 `districtName` varchar(255) DEFAULT '',
518 `id` int(11) NOT NULL AUTO_INCREMENT,
519 `createdAt` datetime DEFAULT NULL,
520 `updatedAt` datetime DEFAULT NULL,
521 `deletedAt` datetime DEFAULT NULL,
522 PRIMARY KEY (`id`)
523) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
524/*!40101 SET character_set_client = @saved_cs_client */;
525
526--
527-- Table structure for table `Suppliers`
528--
529
530DROP TABLE IF EXISTS `Suppliers`;
531/*!40101 SET @saved_cs_client = @@character_set_client */;
532/*!50503 SET character_set_client = utf8mb4 */;
533CREATE TABLE `Suppliers` (
534 `name` varchar(255) DEFAULT '',
535 `email` varchar(255) DEFAULT '',
536 `phoneNumber` varchar(255) DEFAULT '',
537 `streetAddress` varchar(255) DEFAULT '',
538 `suburb` varchar(255) DEFAULT '',
539 `city` varchar(255) DEFAULT '',
540 `country` int(11) DEFAULT NULL,
541 `id` int(11) NOT NULL AUTO_INCREMENT,
542 `createdAt` datetime DEFAULT NULL,
543 `updatedAt` datetime DEFAULT NULL,
544 `deletedAt` datetime DEFAULT NULL,
545 PRIMARY KEY (`id`)
546) ENGINE=InnoDB DEFAULT CHARSET=utf8;
547/*!40101 SET character_set_client = @saved_cs_client */;
548
549--
550-- Table structure for table `Tags`
551--
552
553DROP TABLE IF EXISTS `Tags`;
554/*!40101 SET @saved_cs_client = @@character_set_client */;
555/*!50503 SET character_set_client = utf8mb4 */;
556CREATE TABLE `Tags` (
557 `name` varchar(255) DEFAULT '',
558 `id` int(11) NOT NULL AUTO_INCREMENT,
559 `createdAt` datetime DEFAULT NULL,
560 `updatedAt` datetime DEFAULT NULL,
561 `deletedAt` datetime DEFAULT NULL,
562 PRIMARY KEY (`id`)
563) ENGINE=InnoDB DEFAULT CHARSET=utf8;
564/*!40101 SET character_set_client = @saved_cs_client */;
565
566--
567-- Table structure for table `VariantOptions`
568--
569
570DROP TABLE IF EXISTS `VariantOptions`;
571/*!40101 SET @saved_cs_client = @@character_set_client */;
572/*!50503 SET character_set_client = utf8mb4 */;
573CREATE TABLE `VariantOptions` (
574 `option` varchar(255) DEFAULT '',
575 `values` varchar(255) DEFAULT '',
576 `id` int(11) NOT NULL AUTO_INCREMENT,
577 `productId` int(11) DEFAULT NULL,
578 `createdAt` datetime DEFAULT NULL,
579 `updatedAt` datetime DEFAULT NULL,
580 `deletedAt` datetime DEFAULT NULL,
581 PRIMARY KEY (`id`),
582 KEY `variantoption_product_fkey_constrain` (`productId`),
583 CONSTRAINT `variantoption_product_fkey_constrain` FOREIGN KEY (`productId`) REFERENCES `Products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
584) ENGINE=InnoDB DEFAULT CHARSET=utf8;
585/*!40101 SET character_set_client = @saved_cs_client */;
586/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
587
588/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
589/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
590/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
591/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
592/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
593/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
594/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
595
596-- Dump completed on 2020-04-02 13:00:30