-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 10, 2023 at 02:28 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.1

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

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

--
-- Table structure for table `admin`
--

CREATE TABLE `admin` (
  `admin_id` int(11) NOT NULL,
  `admin_nama` varchar(100) NOT NULL,
  `admin_username` varchar(100) NOT NULL,
  `admin_password` varchar(100) NOT NULL,
  `admin_foto` varchar(100) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `admin`
--

INSERT INTO `admin` (`admin_id`, `admin_nama`, `admin_username`, `admin_password`, `admin_foto`) VALUES
(1, 'Admin', 'admin', '21232f297a57a5a743894a0e4a801fc3', '1352025327_avatar.png');

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

--
-- Table structure for table `customer`
--

CREATE TABLE `customer` (
  `customer_id` int(11) NOT NULL,
  `customer_nama` varchar(255) NOT NULL,
  `customer_email` varchar(255) NOT NULL,
  `customer_hp` varchar(20) NOT NULL,
  `customer_alamat` text NOT NULL,
  `customer_password` varchar(255) NOT NULL,
  `customer_province` varchar(255) DEFAULT NULL,
  `customer_regency` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `customer`
--

INSERT INTO `customer` (`customer_id`, `customer_nama`, `customer_email`, `customer_hp`, `customer_alamat`, `customer_password`, `customer_province`, `customer_regency`) VALUES
(3, 'Ahmad Jhony', 'jhony@gmail.com', '0927883733', 'jala sdjasl', '91ec1f9324753048c0096d036a694f86', NULL, NULL),
(5, 'Jamaika Bob', 'jamaika@gmail.com', '08262122771', 'jalan rasta uye nomor 1', '91ec1f9324753048c0096d036a694f86', NULL, NULL),
(6, 'Rosalina', 'rosalina@gmail.com', '082827287', 'jalan meruakaja', '91ec1f9324753048c0096d036a694f86', NULL, NULL),
(7, 'suleha alala', 'suleha@gmail.com', '982737383737', 'sasdkajndkasjdn', 'ae2831cce9ac4de6a703a728f26cc07b', NULL, NULL),
(8, 'INDRA RAHMAWAN', 'indrar0104@gmail.com', '081382789716', 'Jl. Daan Mogot Raya No.25-171 KM.21 (Samping CV.JAPAINDO), Kel. Batu Ceper, Kec. Batu Ceper, Kota Tangerang 15122', '7142293118beb4ced6d421af32c4bbfa', NULL, NULL),
(9, 'dicky', 'vizzlezorro@gmail.com', '089685259671', 'ggg', '4dd3560460d78882718ada95bde6b4c1', NULL, NULL),
(10, 'dicky', 'vizzlezorro1@gmail.com', '558888', 'tgg', '202cb962ac59075b964b07152d234b70', NULL, NULL),
(11, 'jarwo', 'jarwo@gmail.com', '081222009', 'alamat', '4dd3560460d78882718ada95bde6b4c1', NULL, NULL),
(12, 'Jannatul ', 'jannatul55@gmail.com', '081232951092', 'Dusun Tanjung Sari Rt05/Rw02', 'b21baca86a374bc571a92579721283a7', NULL, NULL),
(13, 'Enda', 'endanuriya04@gmail.comn', '085921686827', 'Dusun Tanjung Sari Rt05/Rw02', '5ef97c914604f0bc3af29b4309d00abd', NULL, NULL),
(14, 'Enda Dewi', 'Endadewi@gmail.com', '085921686827', 'Dusun Tanjung Sari Rt05/Rw02', '2c4e0f7262fc42ae17d69b8ed4cf1940', NULL, NULL),
(15, 'Aira fitri', 'airafitri@gmail.com', '087857655432', 'Dusun Tanjung Sari Rt05/Rw02', '56d9aca374386b3ed8ef671739d45826', NULL, NULL);

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

--
-- Table structure for table `invoice`
--

CREATE TABLE `invoice` (
  `invoice_id` int(11) NOT NULL,
  `invoice_tanggal` date NOT NULL,
  `invoice_customer` int(11) NOT NULL,
  `invoice_nama` varchar(255) NOT NULL,
  `invoice_hp` varchar(255) NOT NULL,
  `invoice_alamat` text NOT NULL,
  `invoice_provinsi` varchar(255) NOT NULL,
  `invoice_kabupaten` varchar(255) NOT NULL,
  `invoice_kurir` varchar(255) NOT NULL,
  `invoice_berat` int(11) NOT NULL,
  `invoice_ongkir` int(11) NOT NULL,
  `invoice_total_bayar` int(11) NOT NULL,
  `invoice_status` int(11) NOT NULL,
  `invoice_resi` varchar(255) NOT NULL,
  `invoice_bukti` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `invoice`
--

INSERT INTO `invoice` (`invoice_id`, `invoice_tanggal`, `invoice_customer`, `invoice_nama`, `invoice_hp`, `invoice_alamat`, `invoice_provinsi`, `invoice_kabupaten`, `invoice_kurir`, `invoice_berat`, `invoice_ongkir`, `invoice_total_bayar`, `invoice_status`, `invoice_resi`, `invoice_bukti`) VALUES
(5, '2019-06-13', 5, 'Jamaika / Ibu ida', '9828272723', 'JL. makmur no.17 , rumahw arna putih', '1', '1', 'JNE', 300, 24000, 960000, 3, '', ''),
(6, '2019-06-13', 5, 'Jamaika Bob', '08272263637', 'Jalan Pentolan Nomor 1C, Rasta mania', 'Maluku', 'Maluku Tenggara', 'JNE - OKE', 300, 108000, 808500, 3, '', '577813088.jpg'),
(13, '2022-11-06', 11, 'jarwo', '081123243', 'jgghjg', 'Jawa Timur', 'Lumajang', 'Pos Indonesia - Pos Nextday', 100, 29000, 149000, 2, 'jnguu464', '962209908.png'),
(14, '2023-02-15', 12, 'Jannatul', '081231951092', 'Dusun Tanjung Sari Rt05/Rw02', 'Jawa Timur', 'Sidoarjo', 'Pos Indonesia - Pos Reguler', 8, 18000, 33000, 5, '1234567', '792101582.jpg'),
(16, '2023-02-15', 12, 'Jannatul ', '08589099088', 'Krang tanjung candi', 'Jawa Timur', 'Sidoarjo', 'Pos Indonesia - Pos Reguler', 8, 18000, 33000, 7, '', ''),
(17, '2023-02-15', 12, 'lila', '09999', 'bbxZXascAD', '', '', ' - ', 8, 0, 15000, 0, '', ''),
(18, '2023-02-23', 13, 'Enda Nuriya Dewi', '085921686827', 'Karang tanjung candi sidoarjo', 'Jawa Timur', 'Sidoarjo', 'Pos Indonesia - Pos Reguler', 20, 18000, 21999, 5, '123-11-221', '442707846.jpg'),
(19, '2023-02-26', 13, 'WW', '225677', 'AAVBMNFGEGG', 'Maluku', '', ' - ', 200, 0, 45000, 5, '', ''),
(20, '2023-02-27', 12, 'Jannatul ', '0812121122334', 'karang tanjung', '', '', ' - ', 300, 0, 29999, 0, '', ''),
(21, '2023-02-27', 12, 'Jannatul ', '1245678998765432', 'wertyukjnbvcxz', '', '', ' - ', 300, 0, 25000, 0, '', ''),
(22, '2023-03-28', 14, 'Enda Dewi', '085921686827', 'Karang Tanjung', '', '', ' - ', 20, 0, 18000, 4, '', ''),
(23, '2023-03-30', 15, 'jarwo', '2421567654323456', 'karang anjung', '', '', ' - ', 300, 0, 25000, 5, 'ASDFGHJKL;LKJHGF', '1309396365.jpg'),
(24, '2023-04-10', 12, 'Jannatul ', '081232951092', 'Dusun Tanjung Sari Rt05/Rw02', 'Pilih Provinsi Tujuan', '', ' - ', 300, 0, 25000, 3, '', '');

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

--
-- Table structure for table `kategori`
--

CREATE TABLE `kategori` (
  `kategori_id` int(11) NOT NULL,
  `kategori_nama` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `kategori`
--

INSERT INTO `kategori` (`kategori_id`, `kategori_nama`) VALUES
(1, 'Tidak Berkategori'),
(9, 'AKSESORIS'),
(11, 'DOMPET'),
(12, 'TAS');

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

--
-- Table structure for table `produk`
--

CREATE TABLE `produk` (
  `produk_id` int(11) NOT NULL,
  `produk_nama` varchar(255) NOT NULL,
  `produk_kategori` int(11) NOT NULL,
  `produk_harga` int(11) NOT NULL,
  `produk_keterangan` text NOT NULL,
  `produk_jumlah` int(11) NOT NULL,
  `produk_berat` int(11) NOT NULL,
  `produk_foto1` varchar(255) DEFAULT NULL,
  `produk_foto2` varchar(255) DEFAULT NULL,
  `produk_foto3` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `produk`
--

INSERT INTO `produk` (`produk_id`, `produk_nama`, `produk_kategori`, `produk_harga`, `produk_keterangan`, `produk_jumlah`, `produk_berat`, `produk_foto1`, `produk_foto2`, `produk_foto3`) VALUES
(16, 'Dompet Disiplin Keuangan Polos (Kulit Sintesis)', 11, 9000, '<p>\r\n\r\n--BAHAN                  :KULIT SINTETIS&nbsp;</p><p>--PANJANG             :19cm&nbsp;</p><p>--TINGGI                  :9cm\r\n\r\n<br></p>', 30, 30, '1699488750_1.jpg', '1699488750_2.jpg', ''),
(17, 'Dompet Wanita Lipat Croco Timbul (Kulit Sintetis Tebal)', 11, 25500, '<p>\r\n\r\nBahan sintetis tebal motif croco.&nbsp;</p><p>Aksesoris besi tebal warna gold.&nbsp;</p><p>&nbsp;Ada slot kartu, slot foto, tempat uang kertas dan uang koin&nbsp;</p><p>Model simpel dan mewah.&nbsp;</p><p><br></p><p>&nbsp;UKURAN 11 x 9\r\n\r\n<br></p>', 100, 30, '1840123668_Capture (1).jpg', '1840123668_Capture1 (1).jpg', '1840123668_Capture2.jpg'),
(18, 'Tas Wanita Slempang Mini (MODEL A)', 12, 18999, '<p>\r\n\r\nukuran: 17 x11x5&nbsp;</p><p>bahan :sintetis&nbsp;</p><p>1 kg muat 6 pcs</p>', 50, 150, '1750707379_Tas slempang.jpg', '1750707379_Tas slempang1.jpg', ''),
(20, 'Tas Wanita Slempang Mini (MODEL B)', 12, 19999, '<p>Tas Slempang Wanita Mini dengan Kombinasi Tali polos dan rantai</p><p>ukuran:17 ×11×5&nbsp;</p><p>bahan:sintetis&nbsp;<br></p>', 50, 200, '699116648_Capture.jpg', '699116648_Capture1.jpg', ''),
(21, 'Tas Slempang 2 TALI (MODEL C)', 12, 29999, '<p>\r\n\r\nbahan: kulit sintetis&nbsp;</p><p>ukuran :19×14×7&nbsp;</p><p>terdapat 2 tali adjustable dan tali kepang&nbsp;</p><p>muat hp dan dompet&nbsp;</p><p>&nbsp;warna:hitam\r\n            putih\r\n            coklat susu\r\n\r\n<br></p>', 50, 300, '1898777399_korea.jpg', '739261368_korea1.jpg', '647244588_Captureee.jpg'),
(22, 'Tas Sling Bag HP Wanita ', 12, 25000, '<p>Cocok untuk yang tidak suka ribet</p><p>bahan:kulit sintetis&nbsp;</p><p>ukuran:18 ×13×7&nbsp;</p><p>tali bisa di adjust&nbsp;</p><p>warna: hitam\r\n             mocca\r\n             salem\r\nvariasi rantai di bagian depan\r\nbordir rapi\r\n\r\n<br></p>', 50, 300, '982572514_slingbags.jpg', '982572514_slingbags1.jpg', ''),
(24, 'Box Make Up ', 9, 18000, '<p>Tas Slempang satu ruang</p>', 100, 20, '', '', '');

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

--
-- Table structure for table `transaksi`
--

CREATE TABLE `transaksi` (
  `transaksi_id` int(11) NOT NULL,
  `transaksi_invoice` int(11) NOT NULL,
  `transaksi_produk` int(11) NOT NULL,
  `transaksi_jumlah` int(11) NOT NULL,
  `transaksi_harga` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `transaksi`
--

INSERT INTO `transaksi` (`transaksi_id`, `transaksi_invoice`, `transaksi_produk`, `transaksi_jumlah`, `transaksi_harga`) VALUES
(1, 0, 3, 1, 120000),
(2, 0, 1, 1, 1234),
(3, 0, 3, 1, 120000),
(4, 0, 1, 1, 1234),
(5, 1, 3, 1, 120000),
(6, 1, 1, 1, 1234),
(9, 3, 3, 1, 120000),
(10, 4, 4, 1, 123000),
(32, 20, 21, 1, 29999),
(33, 21, 22, 1, 25000),
(34, 22, 24, 1, 18000),
(35, 23, 22, 1, 25000),
(36, 24, 22, 1, 25000);

--
-- Indexes for dumped tables
--

--
-- Indexes for table `admin`
--
ALTER TABLE `admin`
  ADD PRIMARY KEY (`admin_id`);

--
-- Indexes for table `customer`
--
ALTER TABLE `customer`
  ADD PRIMARY KEY (`customer_id`);

--
-- Indexes for table `invoice`
--
ALTER TABLE `invoice`
  ADD PRIMARY KEY (`invoice_id`),
  ADD KEY `invoice_customer` (`invoice_customer`);

--
-- Indexes for table `kategori`
--
ALTER TABLE `kategori`
  ADD PRIMARY KEY (`kategori_id`);

--
-- Indexes for table `produk`
--
ALTER TABLE `produk`
  ADD PRIMARY KEY (`produk_id`),
  ADD KEY `produk_kategori` (`produk_kategori`);

--
-- Indexes for table `transaksi`
--
ALTER TABLE `transaksi`
  ADD PRIMARY KEY (`transaksi_id`),
  ADD KEY `transaksi_invoice` (`transaksi_invoice`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `admin`
--
ALTER TABLE `admin`
  MODIFY `admin_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `customer`
--
ALTER TABLE `customer`
  MODIFY `customer_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;

--
-- AUTO_INCREMENT for table `invoice`
--
ALTER TABLE `invoice`
  MODIFY `invoice_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=25;

--
-- AUTO_INCREMENT for table `kategori`
--
ALTER TABLE `kategori`
  MODIFY `kategori_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

--
-- AUTO_INCREMENT for table `produk`
--
ALTER TABLE `produk`
  MODIFY `produk_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=25;

--
-- AUTO_INCREMENT for table `transaksi`
--
ALTER TABLE `transaksi`
  MODIFY `transaksi_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=37;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `invoice`
--
ALTER TABLE `invoice`
  ADD CONSTRAINT `invoice_ibfk_1` FOREIGN KEY (`invoice_customer`) REFERENCES `customer` (`customer_id`);

--
-- Constraints for table `produk`
--
ALTER TABLE `produk`
  ADD CONSTRAINT `produk_ibfk_1` FOREIGN KEY (`produk_kategori`) REFERENCES `kategori` (`kategori_id`);

--
-- Constraints for table `transaksi`
--
ALTER TABLE `transaksi`
  ADD CONSTRAINT `transaksi_ibfk_1` FOREIGN KEY (`transaksi_invoice`) REFERENCES `invoice` (`invoice_id`);
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 */;
