-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: Oct 04, 2020 at 01:18 PM
-- Server version: 5.7.26
-- PHP Version: 7.3.8

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: `montzo_manufacture`
--

-- --------------------------------------------------------

--
-- Table structure for table `ItemCategories`
--

DROP TABLE IF EXISTS `ItemCategories`;
CREATE TABLE `ItemCategories` (
  `id` int(11) NOT NULL,
  `name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `parentId` int(11) NOT NULL,
  `branchId` int(11) NOT NULL DEFAULT '1',
  `formId` int(11) NOT NULL DEFAULT '0',
  `position` int(11) NOT NULL COMMENT 'Order Position	',
  `level` int(11) NOT NULL COMMENT 'Tree Level'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ItemCategories`
--

INSERT INTO `ItemCategories` (`id`, `name`, `parentId`, `branchId`, `formId`, `position`, `level`) VALUES
(1, 'Men', 0, 1, 5, 0, 0),
(2, 'Topwear', 1, 1, 0, 0, 0),
(3, 'TShirts', 2, 1, 1, 0, 0),
(4, 'Kurthas', 2, 1, 3, 0, 0);

-- --------------------------------------------------------

--
-- Table structure for table `ItemInputValues`
--

DROP TABLE IF EXISTS `ItemInputValues`;
CREATE TABLE `ItemInputValues` (
  `id` int(11) NOT NULL,
  `itemId` bigint(20) NOT NULL,
  `inputId` int(11) NOT NULL,
  `valueId` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='This Table Holds the value Which Enter In Product Details Based On product_form_inputs table';

--
-- Dumping data for table `ItemInputValues`
--

INSERT INTO `ItemInputValues` (`id`, `itemId`, `inputId`, `valueId`) VALUES
(16, 11, 1, 1),
(17, 11, 2, 13),
(18, 11, 3, 8),
(19, 11, 4, 4);

-- --------------------------------------------------------

--
-- Table structure for table `ItemInputValuesMaster`
--

DROP TABLE IF EXISTS `ItemInputValuesMaster`;
CREATE TABLE `ItemInputValuesMaster` (
  `id` bigint(20) NOT NULL,
  `value` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ItemInputValuesMaster`
--

INSERT INTO `ItemInputValuesMaster` (`id`, `value`) VALUES
(1, 'Solid'),
(2, 'Lycra'),
(3, 'Long Sleeve'),
(4, 'Round'),
(5, 'Chinese Neck'),
(6, 'Knitted'),
(7, 'Checks'),
(8, 'Short Sleeve'),
(9, 'Stripes'),
(10, 'Cotton'),
(11, 'Long'),
(12, 'Round Btn'),
(13, 'Mixed Cotton');

-- --------------------------------------------------------

--
-- Table structure for table `Items`
--

DROP TABLE IF EXISTS `Items`;
CREATE TABLE `Items` (
  `id` int(11) NOT NULL,
  `code` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Style Code',
  `name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `categoryId` int(11) NOT NULL,
  `brandId` int(11) NOT NULL,
  `hsn` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL,
  `isTaxable` tinyint(4) NOT NULL,
  `taxId` int(11) NOT NULL,
  `itemTypeId` int(11) NOT NULL,
  `unitTypeId` int(11) NOT NULL,
  `hasVariant` tinyint(4) NOT NULL DEFAULT '0',
  `mrp` double NOT NULL,
  `sellingPrice` double NOT NULL,
  `openingStock` double NOT NULL,
  `status` tinyint(4) NOT NULL DEFAULT '1',
  `branchId` int(11) NOT NULL DEFAULT '1',
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `Items`
--

INSERT INTO `Items` (`id`, `code`, `name`, `description`, `categoryId`, `brandId`, `hsn`, `isTaxable`, `taxId`, `itemTypeId`, `unitTypeId`, `hasVariant`, `mrp`, `sellingPrice`, `openingStock`, `status`, `branchId`, `createdAt`, `updatedAt`, `deletedAt`) VALUES
(11, 'LV-101', 'Levis TShirt', '', 3, 1, '', 0, 0, 1, 1, 1, 599, 450, 0, 1, 1, '2020-09-29 01:01:56', '2020-10-04 05:42:18', '');

-- --------------------------------------------------------

--
-- Table structure for table `ItemTypes`
--

DROP TABLE IF EXISTS `ItemTypes`;
CREATE TABLE `ItemTypes` (
  `id` int(11) NOT NULL,
  `name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ItemTypes`
--

INSERT INTO `ItemTypes` (`id`, `name`) VALUES
(1, 'Finished Good'),
(2, 'Raw Material');

-- --------------------------------------------------------

--
-- Table structure for table `ItemVariants`
--

DROP TABLE IF EXISTS `ItemVariants`;
CREATE TABLE `ItemVariants` (
  `id` int(11) NOT NULL,
  `itemId` int(11) NOT NULL,
  `colorId` int(11) NOT NULL,
  `sizeId` int(11) NOT NULL,
  `sellingPrice` double NOT NULL,
  `mrp` double NOT NULL,
  `openingStock` double NOT NULL,
  `status` tinyint(4) NOT NULL DEFAULT '1',
  `branchId` int(11) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ItemVariants`
--

INSERT INTO `ItemVariants` (`id`, `itemId`, `colorId`, `sizeId`, `sellingPrice`, `mrp`, `openingStock`, `status`, `branchId`) VALUES
(2, 11, 5, 3, 350, 500, 100, 1, 1),
(3, 11, 5, 16, 350, 500, 10, 1, 1),
(4, 11, 5, 2, 320, 500, 10, 1, 1),
(7, 11, 5, 1, 320, 450, 10, 1, 1);

-- --------------------------------------------------------

--
-- Table structure for table `SizesAndColors`
--

DROP TABLE IF EXISTS `SizesAndColors`;
CREATE TABLE `SizesAndColors` (
  `id` int(11) NOT NULL,
  `name` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
  `type` char(1) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'c = color s = size'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `SizesAndColors`
--

INSERT INTO `SizesAndColors` (`id`, `name`, `type`) VALUES
(1, 'S', 's'),
(2, 'M', 's'),
(3, 'L', 's'),
(4, 'White', 'c'),
(5, 'Yellow', 'c'),
(6, 'Blue', 'c'),
(7, 'Red', 'c'),
(8, 'Green', 'c'),
(9, 'Black', 'c'),
(10, 'Brown', 'c'),
(11, 'Purple', 'c'),
(12, 'Gray', 'c'),
(13, 'Orange', 'c'),
(14, 'Maroon', 'c'),
(15, 'Charcoal', 'c'),
(16, 'XL', 's'),
(17, 'XXL', 's'),
(18, 'XXXL', 's'),
(19, 'XXXXL', 's');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `ItemCategories`
--
ALTER TABLE `ItemCategories`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ItemInputValues`
--
ALTER TABLE `ItemInputValues`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ItemInputValuesMaster`
--
ALTER TABLE `ItemInputValuesMaster`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `Items`
--
ALTER TABLE `Items`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `code` (`code`);

--
-- Indexes for table `ItemTypes`
--
ALTER TABLE `ItemTypes`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ItemVariants`
--
ALTER TABLE `ItemVariants`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `SizesAndColors`
--
ALTER TABLE `SizesAndColors`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `ItemCategories`
--
ALTER TABLE `ItemCategories`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `ItemInputValues`
--
ALTER TABLE `ItemInputValues`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20;

--
-- AUTO_INCREMENT for table `ItemInputValuesMaster`
--
ALTER TABLE `ItemInputValuesMaster`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;

--
-- AUTO_INCREMENT for table `Items`
--
ALTER TABLE `Items`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;

--
-- AUTO_INCREMENT for table `ItemTypes`
--
ALTER TABLE `ItemTypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `ItemVariants`
--
ALTER TABLE `ItemVariants`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `SizesAndColors`
--
ALTER TABLE `SizesAndColors`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20;

/*!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 */;
