text: -- phpMyAdmin SQL Dump
  -- version 4.7.4
  -- https://www.phpmyadmin.net/
  --
  -- Host: 127.0.0.1
  -- Generation Time: Aug 12, 2018 at 07:50 PM
  -- Server version: 10.1.29-MariaDB
  -- PHP Version: 7.2.0
  
  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: `inventory`
  --
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `detail_barang`
  --
  
  CREATE TABLE `detail_barang` (
    `id_detail_barang` int(11) NOT NULL,
    `id_barang` varchar(7) NOT NULL,
    `warna` varchar(25) NOT NULL,
    `ukuran` varchar(5) NOT NULL,
    `stok` int(11) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `detail_barang`
  --
  
  INSERT INTO `detail_barang` (`id_detail_barang`, `id_barang`, `warna`, `ukuran`, `stok`) VALUES
  (1, 'BR00001', 'Merah', 'S', 100),
  (2, 'BR00001', 'Hitam', 'M', 120),
  (3, 'BR00001', 'Hijau', 'L', 30),
  (4, 'BR00002', 'Biru', 'L', 100),
  (5, 'BR00001', 'Merah', 'L', 25);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `tbl_barang`
  --
  
  CREATE TABLE `tbl_barang` (
    `id_barang` varchar(7) NOT NULL,
    `id_kategori` varchar(7) NOT NULL,
    `foto_barang` varchar(100) NOT NULL,
    `nama_barang` varchar(100) NOT NULL,
    `harga` int(11) NOT NULL,
    `deskripsi` text NOT NULL,
    `tanggal` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `tbl_barang`
  --
  
  INSERT INTO `tbl_barang` (`id_barang`, `id_kategori`, `foto_barang`, `nama_barang`, `harga`, `deskripsi`, `tanggal`) VALUES
  ('BR00001', 'KTG0001', '1.jpg', 'Baju Anak Baru', 10000, 'Baju Anak lucu dengan motif keren', '0000-00-00 00:00:00'),
  ('BR00002', 'KTG0001', '3.jpg', 'Baju Dewasa', 12000, 'Baju Dewasa', '2018-08-12 13:55:24');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `tbl_kategori`
  --
  
  CREATE TABLE `tbl_kategori` (
    `id_kategori` varchar(7) NOT NULL,
    `kategori` varchar(50) NOT NULL,
    `deskripsi` text NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `tbl_kategori`
  --
  
  INSERT INTO `tbl_kategori` (`id_kategori`, `kategori`, `deskripsi`) VALUES
  ('KTG0001', 'Baju Gamis', 'Baju Gamis Syari');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `tbl_user`
  --
  
  CREATE TABLE `tbl_user` (
    `id_user` varchar(7) NOT NULL,
    `nama_user` varchar(50) NOT NULL,
    `bagian` varchar(15) NOT NULL,
    `foto_user` varchar(100) NOT NULL,
    `username` varchar(25) NOT NULL,
    `password` varchar(50) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `tbl_user`
  --
  
  INSERT INTO `tbl_user` (`id_user`, `nama_user`, `bagian`, `foto_user`, `username`, `password`) VALUES
  ('USR0001', 'Tegar Ferdyla', 'stok', '1.jpg', 'tegarferdyla', 'df70d98996977a7b6f8dcf37c3265a38');
  
  --
  -- Indexes for dumped tables
  --
  
  --
  -- Indexes for table `detail_barang`
  --
  ALTER TABLE `detail_barang`
    ADD PRIMARY KEY (`id_detail_barang`),
    ADD KEY `id_barang` (`id_barang`);
  
  --
  -- Indexes for table `tbl_barang`
  --
  ALTER TABLE `tbl_barang`
    ADD PRIMARY KEY (`id_barang`),
    ADD KEY `id_kategori` (`id_kategori`);
  
  --
  -- Indexes for table `tbl_kategori`
  --
  ALTER TABLE `tbl_kategori`
    ADD PRIMARY KEY (`id_kategori`);
  
  --
  -- Indexes for table `tbl_user`
  --
  ALTER TABLE `tbl_user`
    ADD PRIMARY KEY (`id_user`);
  
  --
  -- AUTO_INCREMENT for dumped tables
  --
  
  --
  -- AUTO_INCREMENT for table `detail_barang`
  --
  ALTER TABLE `detail_barang`
    MODIFY `id_detail_barang` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
  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 */;
  