-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Oct 15, 2020 at 11:22 AM
-- Server version: 5.7.24
-- PHP Version: 7.2.11

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
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 `JobCardOperationStatus`
--

DROP TABLE IF EXISTS `JobCardOperationStatus`;
CREATE TABLE `JobCardOperationStatus` (
  `id` int(11) NOT NULL,
  `jobCardId` int(11) NOT NULL,
  `completedQuantity` double NOT NULL DEFAULT '0',
  `startedAt` datetime DEFAULT NULL,
  `endedAt` datetime DEFAULT NULL,
  `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0=>Started,1=>Pause,2=>Completed',
  `createdAt` datetime DEFAULT NULL,
  `updatedAt` datetime DEFAULT NULL,
  `deletedAt` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `JobCardOperationStatus`
--

INSERT INTO `JobCardOperationStatus` (`id`, `jobCardId`, `completedQuantity`, `startedAt`, `endedAt`, `status`, `createdAt`, `updatedAt`, `deletedAt`) VALUES
(1, 1, 5, '2020-10-14 18:13:10', '2020-10-15 05:00:00', 0, NULL, NULL, NULL),
(2, 1, 10, '2020-10-15 10:10:00', '2020-10-15 14:10:00', 0, '2020-10-15 00:22:12', '2020-10-15 00:22:12', NULL),
(3, 1, 2, '2020-10-15 11:10:00', '2020-10-15 14:10:00', 0, '2020-10-15 00:35:53', '2020-10-15 00:35:53', NULL),
(4, 1, 4, '6969-12-31 18:12:00', '6969-12-31 18:12:00', 0, '2020-10-15 00:36:04', '2020-10-15 00:36:55', NULL);

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

--
-- Table structure for table `JobCards`
--

DROP TABLE IF EXISTS `JobCards`;
CREATE TABLE `JobCards` (
  `id` int(11) NOT NULL,
  `workOrderId` int(11) NOT NULL,
  `namingSeries` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `postingAt` datetime NOT NULL,
  `workstationId` int(11) NOT NULL,
  `operationId` int(11) NOT NULL,
  `remarks` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `employeeId` int(11) NOT NULL,
  `quantityToManufacture` double NOT NULL,
  `wipWarehouse` int(11) NOT NULL,
  `projectId` int(11) NOT NULL,
  `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT 'DRAFT INPROGRESS COMPLETED',
  `createdAt` datetime DEFAULT NULL,
  `updatedAt` datetime DEFAULT NULL,
  `deletedAt` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `JobCards`
--

INSERT INTO `JobCards` (`id`, `workOrderId`, `namingSeries`, `postingAt`, `workstationId`, `operationId`, `remarks`, `employeeId`, `quantityToManufacture`, `wipWarehouse`, `projectId`, `status`, `createdAt`, `updatedAt`, `deletedAt`) VALUES
(1, 2, 'JOB-1', '2020-10-13 00:00:00', 20, 19, '', 0, 10, 6, 0, 1, '2020-10-13 02:29:49', '2020-10-15 03:30:00', NULL),
(2, 1, 'JOB-2', '2020-10-13 00:00:00', 23, 18, '', 0, 0, 0, 0, 1, '2020-10-13 02:40:08', '2020-10-13 02:40:08', NULL);

--
-- Indexes for dumped tables
--

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

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

--
-- AUTO_INCREMENT for dumped tables
--

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

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

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