text: -- MariaDB dump 10.17  Distrib 10.4.13-MariaDB, for Linux (x86_64)
  --
  -- Host: localhost    Database: jpetstore
  -- ------------------------------------------------------
  -- Server version	10.4.13-MariaDB
  
  /*!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 */;
  /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
  /*!40103 SET TIME_ZONE='+00:00' */;
  /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
  /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
  /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
  /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
  
  --
  -- Table structure for table `Account`
  --
  
  DROP TABLE IF EXISTS `Account`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `Account` (
    `id` int(9) NOT NULL,
    `username` varchar(80) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `password` varchar(80) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `email` varchar(80) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `firstName` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `lastName` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `status` tinyint(1) DEFAULT NULL,
    `address1` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `address2` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `city` varchar(40) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `state` varchar(40) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `zip` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `country` varchar(40) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `phone` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `role` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Table structure for table `Category`
  --
  
  DROP TABLE IF EXISTS `Category`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `Category` (
    `id` int(9) NOT NULL,
    `name` varchar(40) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Table structure for table `Item`
  --
  
  DROP TABLE IF EXISTS `Item`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `Item` (
    `id` int(9) NOT NULL,
    `productId` int(9) NOT NULL,
    `supplierId` int(9) NOT NULL,
    `unitprice` decimal(10,2) NOT NULL,
    `unitcost` decimal(10,2) NOT NULL,
    `quantity` int(11) DEFAULT NULL,
    `attribute` varchar(80) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `supplierId` (`supplierId`),
    KEY `productId` (`productId`),
    CONSTRAINT `Item_ibfk_1` FOREIGN KEY (`supplierId`) REFERENCES `Supplier` (`id`),
    CONSTRAINT `Item_ibfk_2` FOREIGN KEY (`productId`) REFERENCES `Product` (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Table structure for table `Orders`
  --
  
  DROP TABLE IF EXISTS `Orders`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `Orders` (
    `id` int(11) NOT NULL,
    `userId` int(11) NOT NULL,
    `itemId` int(11) NOT NULL,
    `productId` int(11) NOT NULL,
    `productName` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL,
    `supplierName` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL,
    `supplierId` int(11) NOT NULL,
    `itemAttribute` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL,
    `quantity` int(11) NOT NULL,
    `total` decimal(10,2) NOT NULL,
    `status` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
    `created` datetime NOT NULL,
    `shipAddr1` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `shipAddr2` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `shipCity` varchar(80) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `shipState` varchar(80) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `shipZip` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `shipCountry` varchar(40) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `courier` varchar(80) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `billToFirstName` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `billToLastName` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `creditCard` varchar(40) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `exprDate` varchar(8) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `cardType` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Table structure for table `Product`
  --
  
  DROP TABLE IF EXISTS `Product`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `Product` (
    `id` int(9) NOT NULL,
    `supplierId` int(11) NOT NULL,
    `categoryId` int(11) NOT NULL,
    `name` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL,
    `description` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `image` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `supplierId` (`supplierId`),
    KEY `categoryId` (`categoryId`),
    CONSTRAINT `Product_ibfk_1` FOREIGN KEY (`supplierId`) REFERENCES `Supplier` (`id`),
    CONSTRAINT `Product_ibfk_2` FOREIGN KEY (`categoryId`) REFERENCES `Category` (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Table structure for table `Supplier`
  --
  
  DROP TABLE IF EXISTS `Supplier`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `Supplier` (
    `id` int(9) NOT NULL,
    `userId` int(9) NOT NULL,
    `name` varchar(80) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `address1` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
    `address2` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `city` varchar(40) COLLATE utf8mb4_unicode_ci NOT NULL,
    `state` varchar(40) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `zip` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `phone` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `userId` (`userId`),
    CONSTRAINT `Supplier_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `Account` (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  /*!40101 SET character_set_client = @saved_cs_client */;
  /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
  
  /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
  /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
  /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
  /*!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 */;
  /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
  
  -- Dump completed on 2020-07-20 14:20:14
  