Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- phpMyAdmin SQL Dump
- -- version 4.6.5.2
- -- https://www.phpmyadmin.net/
- --
- -- Host: 127.0.0.1
- -- Generation Time: Sep 03, 2018 at 08:18 PM
- -- Server version: 10.1.21-MariaDB
- -- PHP Version: 5.6.30
- 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: `imania`
- --
- -- --------------------------------------------------------
- --
- -- Table structure for table `barang`
- --
- CREATE TABLE `barang` (
- `id_barang` int(11) NOT NULL,
- `kode_barang` varchar(50) NOT NULL,
- `nama_barang` varchar(100) NOT NULL,
- `model` varchar(100) NOT NULL,
- `foto` varchar(255) DEFAULT NULL,
- `active` varchar(1) NOT NULL DEFAULT '1'
- ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
- --
- -- Dumping data for table `barang`
- --
- INSERT INTO `barang` (`id_barang`, `kode_barang`, `nama_barang`, `model`, `foto`, `active`) VALUES
- (1, 'PNT30', 'Pintu', 'Minimalis', NULL, '1'),
- (3, 'MJA6590', 'Meja Makan', 'Lipat', NULL, '1'),
- (4, 'RJG33JI', 'Ranjang', 'Modernistik', NULL, '1'),
- (5, 'KRS889U', 'Kursi Ayun', 'ala Eropa', NULL, '1'),
- (8, 'KRS9PJG', 'Kursi Panjang', 'merk IKEA', 'vue_logo.png', '1'),
- (9, 'MJ25PJG', 'Meja Panjang', '2m', 'production.png', '1'),
- (10, 'KBATAS', 'Kabinet Atas', 'Oke', NULL, '1'),
- (11, 'BR99TST', 'Barang Tes', 'Ket tes', 'pdf2.png', '1'),
- (12, 'MJA123', 'Meja Belajar', '', NULL, '1');
- -- --------------------------------------------------------
- --
- -- Table structure for table `customer`
- --
- CREATE TABLE `customer` (
- `id_customer` int(11) NOT NULL,
- `nama_lengkap` varchar(100) NOT NULL,
- `no_hp` varchar(20) DEFAULT NULL,
- `no_telp` varchar(20) DEFAULT NULL,
- `email` varchar(100) DEFAULT NULL,
- `alamat` tinytext NOT NULL,
- `tgl_lahir` date DEFAULT NULL,
- `keterangan` text NOT NULL,
- `active` varchar(1) NOT NULL DEFAULT '1'
- ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
- --
- -- Dumping data for table `customer`
- --
- INSERT INTO `customer` (`id_customer`, `nama_lengkap`, `no_hp`, `no_telp`, `email`, `alamat`, `tgl_lahir`, `keterangan`, `active`) VALUES
- (1, 'Jihad Dzikri Waspada', '085785324570', '(021) 598-4033', 'dewey992@gmail.com', 'Blok H4 Binong Permai no. 35, Tangerang', '1992-12-27', 'Punya istri 3', '1'),
- (2, 'Amita Diananda', '081387432666', '(021) 598-4033', 'amitadiananda@gmail.com', 'Harapan Kita, Tangerang', '1968-04-25', '', '1'),
- (3, 'Nida Millatina', '08571234567', '(021) 190-0001', 'nida@duniawebsite.com', 'Jl. Empu Kanwa', '1993-03-12', 'COO Dunia Website', '1'),
- (4, 'Ibu Lita', '08571234900', '(021) 7868378', 'lita@lita.com', 'Tangerang', '1972-11-27', 'Punya anak 3', '1'),
- (5, 'Ibu Fitri', '0859897635373', '021543725', 'fitri@yahoo.com', 'Apartement Cinere Blok A4 No.5', '1988-11-26', 'nama anaknya fahri', '1'),
- (8, 'Hia\'', '09182827', '', '', 'Tangerang', NULL, '', '0'),
- (9, 'Customer Test', '0857324567', '12345667', 'customer_test@test.com', 'Bekasi', '1978-01-12', 'Anak 4', '1');
- -- --------------------------------------------------------
- --
- -- Table structure for table `quotation`
- --
- CREATE TABLE `quotation` (
- `id_quotation` int(11) NOT NULL,
- `judul` text NOT NULL,
- `alamat_proyek` text NOT NULL,
- `id_customer` int(11) NOT NULL,
- `keterangan` varchar(10) NOT NULL DEFAULT 'belum'
- ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
- --
- -- Dumping data for table `quotation`
- --
- INSERT INTO `quotation` (`id_quotation`, `judul`, `alamat_proyek`, `id_customer`, `keterangan`) VALUES
- (1, 'Tes Proyek', 'Tangerang', 5, 'ok'),
- (2, 'GSB', 'Bintaro', 2, 'ok'),
- (3, 'oke', 'cikoneng', 9, 'ok');
- -- --------------------------------------------------------
- --
- -- Table structure for table `quotation_hm_bahan`
- --
- CREATE TABLE `quotation_hm_bahan` (
- `id_produksi` int(11) NOT NULL,
- `id_ruangan` int(11) NOT NULL,
- `jumlah_barang` tinyint(4) NOT NULL,
- `id_barang` int(11) NOT NULL,
- `jumlah_bahan` tinyint(4) NOT NULL,
- `id_bahan` int(11) NOT NULL,
- `harga_bahan` int(11) NOT NULL,
- `transportasi` int(11) NOT NULL,
- `tukang` int(11) NOT NULL,
- `lain_lain` int(11) NOT NULL,
- `margin` tinyint(4) NOT NULL
- ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
- --
- -- Dumping data for table `quotation_hm_bahan`
- --
- INSERT INTO `quotation_hm_bahan` (`id_produksi`, `id_ruangan`, `jumlah_barang`, `id_barang`, `jumlah_bahan`, `id_bahan`, `harga_bahan`, `transportasi`, `tukang`, `lain_lain`, `margin`) VALUES
- (1, 1, 1, 4, 1, 3, 15000, 0, 0, 0, 0),
- (1, 1, 1, 4, 1, 4, 55000, 0, 0, 0, 0),
- (1, 1, 1, 4, 1, 2, 25500, 0, 0, 0, 0),
- (1, 1, 1, 4, 5, 5, 17500, 0, 0, 0, 0),
- (1, 1, 1, 10, 4, 3, 15000, 0, 0, 0, 0),
- (1, 1, 1, 10, 2, 15, 80000, 0, 0, 0, 0),
- (1, 1, 1, 10, 6, 10, 144000, 0, 0, 0, 0),
- (1, 1, 1, 10, 8, 17, 95000, 0, 0, 0, 0),
- (1, 1, 1, 10, 3, 11, 68300, 0, 0, 0, 0),
- (2, 3, 3, 10, 4, 3, 15000, 0, 0, 0, 0),
- (2, 3, 3, 10, 2, 15, 80000, 0, 0, 0, 0),
- (2, 3, 3, 10, 6, 10, 144000, 0, 0, 0, 0),
- (2, 3, 3, 10, 8, 17, 95000, 0, 0, 0, 0),
- (2, 3, 3, 10, 3, 11, 68300, 0, 0, 0, 0),
- (2, 3, 2, 9, 4, 13, 51000, 0, 0, 0, 0),
- (2, 3, 2, 9, 2, 5, 17500, 0, 0, 0, 0),
- (2, 3, 2, 9, 3, 10, 144000, 0, 0, 0, 0),
- (2, 3, 2, 9, 2, 9, 152500, 0, 0, 0, 0),
- (2, 3, 2, 9, 10, 12, 34000, 0, 0, 0, 0),
- (2, 3, 2, 9, 4, 14, 42000, 0, 0, 0, 0),
- (2, 4, 2, 4, 1, 3, 15000, 140000, 2000000, 260000, 15),
- (2, 4, 2, 4, 1, 4, 55000, 140000, 2000000, 260000, 15),
- (2, 4, 2, 4, 1, 2, 25500, 140000, 2000000, 260000, 15),
- (2, 4, 2, 4, 5, 5, 17500, 140000, 2000000, 260000, 15),
- (2, 4, 1, 1, 1, 2, 25500, 200000, 5000000, 450000, 10),
- (2, 4, 1, 1, 2, 3, 15000, 200000, 5000000, 450000, 10),
- (2, 4, 1, 1, 2, 9, 152500, 200000, 5000000, 450000, 10),
- (2, 4, 1, 1, 3, 5, 17500, 200000, 5000000, 450000, 10),
- (2, 4, 1, 1, 5, 10, 144000, 200000, 5000000, 450000, 10);
- -- --------------------------------------------------------
- --
- -- Table structure for table `ruangan`
- --
- CREATE TABLE `ruangan` (
- `id_ruangan` int(11) NOT NULL,
- `nama_ruangan` varchar(100) NOT NULL,
- `id_quotation` int(11) NOT NULL,
- `lantai` int(11) NOT NULL
- ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
- --
- -- Dumping data for table `ruangan`
- --
- INSERT INTO `ruangan` (`id_ruangan`, `nama_ruangan`, `id_quotation`, `lantai`) VALUES
- (1, 'tamu', 1, 0),
- (3, 'dapur', 2, 0),
- (4, 'kamar utama', 2, 0),
- (5, 'free', 3, 1),
- (6, 'depan', 3, 1),
- (7, 'qqqq', 3, 2);
- -- --------------------------------------------------------
- --
- -- Table structure for table `ruangan_hm_barang`
- --
- CREATE TABLE `ruangan_hm_barang` (
- `id_ruangan` int(11) NOT NULL,
- `id_barang` int(11) NOT NULL,
- `jumlah_barang` tinyint(4) NOT NULL,
- `satuan_barang` varchar(20) NOT NULL,
- `spesifikasi` text,
- `transportasi` int(11) NOT NULL DEFAULT '0',
- `tukang` int(11) NOT NULL DEFAULT '0',
- `lain_lain` int(11) NOT NULL DEFAULT '0',
- `margin` float NOT NULL DEFAULT '0'
- ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
- --
- -- Dumping data for table `ruangan_hm_barang`
- --
- INSERT INTO `ruangan_hm_barang` (`id_ruangan`, `id_barang`, `jumlah_barang`, `satuan_barang`, `spesifikasi`, `transportasi`, `tukang`, `lain_lain`, `margin`) VALUES
- (1, 4, 1, 'unit', '[\"Multiplex\",\"Bagian Luar Finishing HPL - Taco/ArtForm Standart\"]', 0, 0, 0, 0),
- (1, 10, 1, 'kabinet', '[\"Multiplex\",\"Bagian Luar Finishing HPL - Taco/ArtForm Standart\",\"Engsel Softclose - FGV\",\"Handle Alumunium\",\"Edging Alumunium\",\"Edging PVC\"]', 0, 0, 0, 0),
- (4, 4, 2, 'buah', '[\"Multiplex\",\"Bagian Luar Finishing HPL - Taco/ArtForm Standart\"]', 140000, 2000000, 260000, 15),
- (4, 1, 1, 'daun', '[\"Multiplex\",\"Handle Alumunium\",\"Rel Tandem Slowmotion\",\"Bagian dalam Finishing Decosheet\",\"Backsplash\"]', 200000, 5000000, 450000, 10),
- (3, 10, 3, 'buah', '[\"Multiplex\",\"Bagian Luar Finishing HPL - Taco/ArtForm Standart\",\"Engsel Softclose - FGV\",\"Handle Alumunium\",\"Edging Alumunium\",\"Edging PVC\"]', 0, 0, 0, 0),
- (3, 9, 2, 'unit', '[\"Multiplex\",\"Bagian Luar Finishing HPL - Taco/ArtForm Standart\",\"Backsplash\",\"Tacosheet\",\"Cat Hitam Pekat\"]', 0, 0, 0, 0),
- (5, 1, 3, 'Unit', NULL, 0, 0, 0, 0),
- (6, 1, 2, 'umit', NULL, 0, 0, 0, 0),
- (7, 5, 1, 'b', NULL, 0, 0, 0, 0),
- (6, 9, 2, 'Unit', NULL, 0, 0, 0, 0);
- --
- -- Indexes for dumped tables
- --
- --
- -- Indexes for table `barang`
- --
- ALTER TABLE `barang`
- ADD PRIMARY KEY (`id_barang`),
- ADD UNIQUE KEY `kode_barang` (`kode_barang`);
- --
- -- Indexes for table `customer`
- --
- ALTER TABLE `customer`
- ADD PRIMARY KEY (`id_customer`);
- --
- -- Indexes for table `quotation`
- --
- ALTER TABLE `quotation`
- ADD PRIMARY KEY (`id_quotation`),
- ADD KEY `id_customer` (`id_customer`),
- ADD KEY `id_status` (`keterangan`);
- --
- -- Indexes for table `quotation_hm_bahan`
- --
- ALTER TABLE `quotation_hm_bahan`
- ADD KEY `id_produksi` (`id_produksi`),
- ADD KEY `id_ruangan` (`id_ruangan`),
- ADD KEY `id_barang` (`id_barang`),
- ADD KEY `id_bahan` (`id_bahan`);
- --
- -- Indexes for table `ruangan`
- --
- ALTER TABLE `ruangan`
- ADD PRIMARY KEY (`id_ruangan`),
- ADD KEY `id_quotation` (`id_quotation`);
- --
- -- Indexes for table `ruangan_hm_barang`
- --
- ALTER TABLE `ruangan_hm_barang`
- ADD KEY `id_barang` (`id_barang`),
- ADD KEY `id_ruangan` (`id_ruangan`);
- --
- -- AUTO_INCREMENT for dumped tables
- --
- --
- -- AUTO_INCREMENT for table `barang`
- --
- ALTER TABLE `barang`
- MODIFY `id_barang` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;
- --
- -- AUTO_INCREMENT for table `customer`
- --
- ALTER TABLE `customer`
- MODIFY `id_customer` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;
- --
- -- AUTO_INCREMENT for table `quotation`
- --
- ALTER TABLE `quotation`
- MODIFY `id_quotation` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
- --
- -- AUTO_INCREMENT for table `ruangan`
- --
- ALTER TABLE `ruangan`
- MODIFY `id_ruangan` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
- --
- -- Constraints for dumped tables
- --
- --
- -- Constraints for table `quotation`
- --
- ALTER TABLE `quotation`
- ADD CONSTRAINT `quotation_bt_customer` FOREIGN KEY (`id_customer`) REFERENCES `customer` (`id_customer`) ON DELETE CASCADE ON UPDATE CASCADE;
- --
- -- Constraints for table `quotation_hm_bahan`
- --
- ALTER TABLE `quotation_hm_bahan`
- ADD CONSTRAINT `quotation_hm_bahan_ibfk_1` FOREIGN KEY (`id_ruangan`) REFERENCES `ruangan` (`id_ruangan`) ON UPDATE CASCADE,
- ADD CONSTRAINT `quotation_hm_bahan_ibfk_2` FOREIGN KEY (`id_barang`) REFERENCES `barang` (`id_barang`) ON UPDATE CASCADE,
- ADD CONSTRAINT `quotation_hm_bahan_ibfk_3` FOREIGN KEY (`id_bahan`) REFERENCES `bahan` (`id_bahan`) ON UPDATE CASCADE;
- --
- -- Constraints for table `ruangan`
- --
- ALTER TABLE `ruangan`
- ADD CONSTRAINT `ruangan_bt_quotation` FOREIGN KEY (`id_quotation`) REFERENCES `quotation` (`id_quotation`) ON DELETE CASCADE ON UPDATE CASCADE;
- --
- -- Constraints for table `ruangan_hm_barang`
- --
- ALTER TABLE `ruangan_hm_barang`
- ADD CONSTRAINT `ruangan_hm_barang_ibfk_1` FOREIGN KEY (`id_ruangan`) REFERENCES `ruangan` (`id_ruangan`) ON DELETE CASCADE ON UPDATE CASCADE,
- ADD CONSTRAINT `ruangan_hm_barang_ibfk_2` FOREIGN KEY (`id_barang`) REFERENCES `barang` (`id_barang`) ON DELETE CASCADE ON UPDATE CASCADE;
- /*!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 */;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement