text: -- --------------------------------------------------------
  -- Host:                         localhost
  -- Server version:               5.7.24 - MySQL Community Server (GPL)
  -- Server OS:                    Win64
  -- HeidiSQL Version:             9.5.0.5332
  -- --------------------------------------------------------
  
  /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  /*!40101 SET NAMES utf8 */;
  /*!50503 SET NAMES utf8mb4 */;
  /*!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' */;
  
  
  -- Dumping database structure for simpang
  CREATE DATABASE IF NOT EXISTS `simpang` /*!40100 DEFAULT CHARACTER SET latin1 */;
  USE `simpang`;
  
  -- Dumping structure for table simpang.barang
  CREATE TABLE IF NOT EXISTS `barang` (
    `BarangID` int(11) NOT NULL AUTO_INCREMENT,
    `BarangCode` varchar(30) NOT NULL,
    `Barang` varchar(50) NOT NULL,
    `FotoBarang` varchar(255) DEFAULT NULL,
    `Harga` float DEFAULT NULL,
    `Description` text,
    PRIMARY KEY (`BarangID`),
    UNIQUE KEY `barang_BarangCode_uindex` (`BarangCode`),
    UNIQUE KEY `barang_BarangID_uindex` (`BarangID`)
  ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
  
  -- Dumping data for table simpang.barang: ~4 rows (approximately)
  /*!40000 ALTER TABLE `barang` DISABLE KEYS */;
  INSERT INTO `barang` (`BarangID`, `BarangCode`, `Barang`, `FotoBarang`, `Harga`, `Description`) VALUES
  	(1, 'BRG-00000001\n', 'testing', 'Capture1.PNG', 500000, 'Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.\n\n'),
  	(2, 'BRG-00000002\n', 'testing2', 'Capture1.PNG', 600000, 'Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam'),
  	(3, 'BRG-00000003\n', 'testingg', 'Capture1.PNG', 500000, 'Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam'),
  	(4, 'BRG-00000004\n', 'testingga', 'Capture1.PNG', 600000, 'Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam');
  /*!40000 ALTER TABLE `barang` ENABLE KEYS */;
  
  -- Dumping structure for table simpang.pemasukan_barang
  CREATE TABLE IF NOT EXISTS `pemasukan_barang` (
    `PemasukanBarangID` int(11) NOT NULL AUTO_INCREMENT,
    `Jumlah` int(11) DEFAULT NULL,
    `DateCreated` datetime DEFAULT NULL,
    `DateModified` datetime DEFAULT NULL,
    `CreatedBy` int(11) DEFAULT NULL,
    `BarangID` int(11) NOT NULL,
    PRIMARY KEY (`PemasukanBarangID`),
    UNIQUE KEY `PemasukanBarang_PemasukanBarangID_uindex` (`PemasukanBarangID`)
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- Dumping data for table simpang.pemasukan_barang: ~0 rows (approximately)
  /*!40000 ALTER TABLE `pemasukan_barang` DISABLE KEYS */;
  /*!40000 ALTER TABLE `pemasukan_barang` ENABLE KEYS */;
  
  -- Dumping structure for table simpang.pemesanan
  CREATE TABLE IF NOT EXISTS `pemesanan` (
    `PemesananID` int(11) NOT NULL AUTO_INCREMENT,
    `PemesananCode` varchar(30) NOT NULL,
    `Name` varchar(255) DEFAULT NULL,
    `Email` varchar(255) DEFAULT NULL,
    `Phone` varchar(255) DEFAULT NULL,
    `TotalHarga` float DEFAULT NULL,
    `Berkas` varchar(255) DEFAULT NULL,
    `BuktiBayar` varchar(255) DEFAULT NULL,
    `LastStatus` varchar(50) DEFAULT NULL,
    `Remarks` text,
    `Zip` varchar(10) DEFAULT NULL,
    `DateCreated` datetime DEFAULT NULL,
    `DateModified` datetime DEFAULT NULL,
    `ModifiedBy` int(11) DEFAULT NULL,
    `City` varchar(255) DEFAULT NULL,
    `Country` varchar(255) DEFAULT NULL,
    `ShippingAddress2` text,
    `ShippingAddress` text,
    PRIMARY KEY (`PemesananID`),
    UNIQUE KEY `pemesanan_PemesananCode_uindex` (`PemesananCode`),
    UNIQUE KEY `pemesanan_PemesananID_uindex` (`PemesananID`)
  ) ENGINE=InnoDB AUTO_INCREMENT=57 DEFAULT CHARSET=latin1;
  
  -- Dumping data for table simpang.pemesanan: ~8 rows (approximately)
  /*!40000 ALTER TABLE `pemesanan` DISABLE KEYS */;
  INSERT INTO `pemesanan` (`PemesananID`, `PemesananCode`, `Name`, `Email`, `Phone`, `TotalHarga`, `Berkas`, `BuktiBayar`, `LastStatus`, `Remarks`, `Zip`, `DateCreated`, `DateModified`, `ModifiedBy`, `City`, `Country`, `ShippingAddress2`, `ShippingAddress`) VALUES
  	(46, 'PSN-00000001', '085894725654', 'dekur98@outlook.com', '085894725654', 1000000, 'c2a07a6ddf4aea3d844b340dd03a31ac.PNG', NULL, 'ON-PROGRESS', 'geg', '13320', '2019-06-20 00:00:00', '2019-06-22 00:00:00', 1, 'Jakarta timur', 'ID', 'rt.006 rw.04 kampung melayu, jatinegara', 'Jl.kebon pala II no.20b, rt.006 rw.04 kampung melayu, jatinegara'),
  	(47, 'PSN-00000002', '085894725654', 'dekur98@outlook.com', '085894725654', 1000000, 'ffa7f8d0863ae81749597a918972ec5a.PNG', NULL, 'UNPAID', 'edwdwe', '13320', '2019-06-20 00:00:00', '2019-06-20 00:00:00', 5, 'Jakarta timur', 'ID', 'rt.006 rw.04 kampung melayu, jatinegara', 'Jl.kebon pala II no.20b, rt.006 rw.04 kampung melayu, jatinegara'),
  	(48, 'PSN-00000003', '085894725654', 'dekur98@outlook.com', '085894725654', 1000000, '22df1cc428ad62a00a11647e57aac0a7.PNG', NULL, 'UNPAID', 'edwdwe', '13320', '2019-06-20 00:00:00', '2019-06-20 00:00:00', 5, 'Jakarta timur', 'ID', 'rt.006 rw.04 kampung melayu, jatinegara', 'Jl.kebon pala II no.20b, rt.006 rw.04 kampung melayu, jatinegara'),
  	(49, 'PSN-00000004', '085894725654', 'dekur98@outlook.com', '085894725654', 1000000, '3eb488c8518c8bc3e8f8a276241cb661.PNG', NULL, 'UNPAID', 'geg', '13320', '2019-06-20 00:00:00', '2019-06-20 00:00:00', 5, 'Jakarta timur', 'ID', 'rt.006 rw.04 kampung melayu, jatinegara', 'Jl.kebon pala II no.20b, rt.006 rw.04 kampung melayu, jatinegara'),
  	(50, 'PSN-00000005', '085894725654', 'dekur98@outlook.com', '085894725654', 1000000, '029846392db1a236cae4a3f47c098370.PNG', NULL, 'UNPAID', 'edwdwe', '13320', '2019-06-20 00:00:00', '2019-06-20 00:00:00', 5, 'Jakarta timur', 'ID', 'rt.006 rw.04 kampung melayu, jatinegara', 'Jl.kebon pala II no.20b, rt.006 rw.04 kampung melayu, jatinegara'),
  	(51, 'PSN-00000006', '085894725654', 'dekur98@outlook.com', '085894725654', 1000000, 'e5f3f97bd679fe093f04fbed35e58ff9.PNG', NULL, 'UNPAID', 'ded', '13320', '2019-06-20 00:00:00', '2019-06-20 00:00:00', 5, 'Jakarta timur', 'ID', 'rt.006 rw.04 kampung melayu, jatinegara', 'Jl.kebon pala II no.20b, rt.006 rw.04 kampung melayu, jatinegara'),
  	(52, 'PSN-00000007', '085894725654', 'dekur98@outlook.com', '085894725654', 1000000, '0819ad46b2be86e595504bbc2b847413.PNG', NULL, 'UNPAID', 'eqdwed', '13320', '2019-06-20 00:00:00', '2019-06-20 00:00:00', 5, 'Jakarta timur', 'ID', 'rt.006 rw.04 kampung melayu, jatinegara', 'Jl.kebon pala II no.20b, rt.006 rw.04 kampung melayu, jatinegara'),
  	(53, 'PSN-00000008', '085894725654', 'dekur98@outlook.com', '085894725654', 1000000, 'b3e20b7fb4e4cdc748ff026e673947c8.PNG', NULL, 'UNPAID', 'edae', '13320', '2019-06-20 00:00:00', '2019-06-20 00:00:00', 5, 'Jakarta timur', 'ID', 'rt.006 rw.04 kampung melayu, jatinegara', 'Jl.kebon pala II no.20b, rt.006 rw.04 kampung melayu, jatinegara'),
  	(54, 'PSN-00000009', '085894725654', 'dekur98@outlook.com', '085894725654', 2, 'fae59f77e7a77ec42182b4a8fc2b8468.PNG', NULL, 'UNPAID', 'dede', '13320', '2019-06-20 00:00:00', '2019-06-20 00:00:00', 5, 'Jakarta timur', 'ID', 'rt.006 rw.04 kampung melayu, jatinegara', 'Jl.kebon pala II no.20b, rt.006 rw.04 kampung melayu, jatinegara'),
  	(55, 'PSN-00000010', 'Helmi', 'dekur98@outlook.com', '085894725654', 500, '0322a4a32008ed651b213853e79fe12a.PNG', NULL, 'PAID', 'testing', '13320', '2019-06-22 00:00:00', '2019-06-22 00:00:00', 6, 'Jakarta timur', 'ID', 'rt.006 rw.04 kampung melayu, jatinegara', 'Jl.kebon pala II no.20b, rt.006 rw.04 kampung melayu, jatinegara'),
  	(56, 'PSN-00000011', 'Dede kurniawan', 'dekur98@gmail.com', '085894725654', 500, '3fbbabb34756bb24b6846051c365215e.PNG', '0c0fba1e93adb90f2cf908b8eb90fc86.PNG', 'PAID', 'gjj', '13320', '2019-06-22 00:00:00', '2019-06-22 00:00:00', 0, 'Jakarta timur', 'ID', 'rt.006 rw.04 kampung melayu, jatinegara', 'Jl.kebon pala II');
  /*!40000 ALTER TABLE `pemesanan` ENABLE KEYS */;
  
  -- Dumping structure for table simpang.pemesanan_detail
  CREATE TABLE IF NOT EXISTS `pemesanan_detail` (
    `PemesananDetailID` int(11) NOT NULL AUTO_INCREMENT,
    `PemesananID` int(11) DEFAULT NULL,
    `BarangID` int(11) DEFAULT NULL,
    `Jumlah` int(11) DEFAULT NULL,
    `TotalHarga` float DEFAULT NULL,
    PRIMARY KEY (`PemesananDetailID`),
    UNIQUE KEY `PemesananDetail_PemesananDetailID_uindex` (`PemesananDetailID`)
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- Dumping data for table simpang.pemesanan_detail: ~0 rows (approximately)
  /*!40000 ALTER TABLE `pemesanan_detail` DISABLE KEYS */;
  /*!40000 ALTER TABLE `pemesanan_detail` ENABLE KEYS */;
  
  -- Dumping structure for table simpang.pemesanan_status
  CREATE TABLE IF NOT EXISTS `pemesanan_status` (
    `PemesananStatusID` int(11) NOT NULL AUTO_INCREMENT,
    `PemesananID` int(11) DEFAULT NULL,
    `StatusID` int(11) DEFAULT NULL,
    `DateCreated` datetime DEFAULT NULL,
    `DateModified` datetime DEFAULT NULL,
    `CreatedBy` int(11) DEFAULT NULL,
    PRIMARY KEY (`PemesananStatusID`),
    UNIQUE KEY `PemesananStatus_PemesananStatusID_uindex` (`PemesananStatusID`)
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- Dumping data for table simpang.pemesanan_status: ~0 rows (approximately)
  /*!40000 ALTER TABLE `pemesanan_status` DISABLE KEYS */;
  /*!40000 ALTER TABLE `pemesanan_status` ENABLE KEYS */;
  
  -- Dumping structure for table simpang.role
  CREATE TABLE IF NOT EXISTS `role` (
    `RoleID` int(11) NOT NULL AUTO_INCREMENT,
    `Role` varchar(30) NOT NULL,
    PRIMARY KEY (`RoleID`),
    UNIQUE KEY `Role_RoleID_uindex` (`RoleID`)
  ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
  
  -- Dumping data for table simpang.role: ~3 rows (approximately)
  /*!40000 ALTER TABLE `role` DISABLE KEYS */;
  INSERT INTO `role` (`RoleID`, `Role`) VALUES
  	(1, 'ADMIN'),
  	(2, 'PRODUKSI'),
  	(3, 'GUEST');
  /*!40000 ALTER TABLE `role` ENABLE KEYS */;
  
  -- Dumping structure for table simpang.status
  CREATE TABLE IF NOT EXISTS `status` (
    `StatusID` int(11) NOT NULL AUTO_INCREMENT,
    `StatusCode` varchar(30) NOT NULL,
    `Status` varchar(50) NOT NULL,
    PRIMARY KEY (`StatusID`),
    UNIQUE KEY `Status_StatusCode_uindex` (`StatusCode`),
    UNIQUE KEY `Status_StatusID_uindex` (`StatusID`)
  ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;
  
  -- Dumping data for table simpang.status: ~6 rows (approximately)
  /*!40000 ALTER TABLE `status` DISABLE KEYS */;
  INSERT INTO `status` (`StatusID`, `StatusCode`, `Status`) VALUES
  	(1, 'STS-190001', 'PAID'),
  	(2, 'STS-190002', 'UNPAID'),
  	(3, 'STS-190003', 'ON-PROGRESS'),
  	(4, 'STS-190004', 'FINISHED'),
  	(5, 'STS-190005', 'CONFIRMED'),
  	(6, 'STS-190006', 'REJECTED');
  /*!40000 ALTER TABLE `status` ENABLE KEYS */;
  
  -- Dumping structure for table simpang.stok
  CREATE TABLE IF NOT EXISTS `stok` (
    `StokID` int(11) NOT NULL AUTO_INCREMENT,
    `BarangID` int(11) NOT NULL,
    `Jumlah` int(11) NOT NULL DEFAULT '0',
    PRIMARY KEY (`StokID`),
    UNIQUE KEY `stock_SrockID_uindex` (`StokID`)
  ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
  
  -- Dumping data for table simpang.stok: ~0 rows (approximately)
  /*!40000 ALTER TABLE `stok` DISABLE KEYS */;
  INSERT INTO `stok` (`StokID`, `BarangID`, `Jumlah`) VALUES
  	(1, 1, 0),
  	(2, 2, 44);
  /*!40000 ALTER TABLE `stok` ENABLE KEYS */;
  
  -- Dumping structure for table simpang.user
  CREATE TABLE IF NOT EXISTS `user` (
    `UserID` int(11) NOT NULL AUTO_INCREMENT,
    `Name` varchar(255) DEFAULT NULL,
    `Username` varchar(50) NOT NULL,
    `Password` varchar(255) DEFAULT NULL,
    `RoleID` int(11) DEFAULT NULL,
    PRIMARY KEY (`UserID`),
    UNIQUE KEY `users_id_uindex` (`UserID`),
    UNIQUE KEY `users_username_uindex` (`Username`)
  ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;
  
  -- Dumping data for table simpang.user: ~5 rows (approximately)
  /*!40000 ALTER TABLE `user` DISABLE KEYS */;
  INSERT INTO `user` (`UserID`, `Name`, `Username`, `Password`, `RoleID`) VALUES
  	(1, NULL, 'dekur98', '5ebe2294ecd0e0f08eab7690d2a6ee69', 1),
  	(2, NULL, 'produksi', '5ebe2294ecd0e0f08eab7690d2a6ee69', 2),
  	(3, NULL, 'testing', '5ebe2294ecd0e0f08eab7690d2a6ee69', 1),
  	(4, NULL, 'testinga', '5ebe2294ecd0e0f08eab7690d2a6ee69', 1),
  	(5, 'Dede kurniawan', 'guest', '5ebe2294ecd0e0f08eab7690d2a6ee69', 3),
  	(6, NULL, 'admin', '5ebe2294ecd0e0f08eab7690d2a6ee69', 1),
  	(7, NULL, 'tatang', '5ebe2294ecd0e0f08eab7690d2a6ee69', 1);
  /*!40000 ALTER TABLE `user` ENABLE KEYS */;
  
  /*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
  /*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
  /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  