-- https://www.phpmyadmin.net/
--

START TRANSACTION;



--
-- Database: `toko_sepatu59`
--

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

--
-- Table structure for table `barang59`
--

CREATE TABLE `barang59` (
  `id_barang` int(11) NOT NULL,
  `gambar_barang` varchar(255) DEFAULT NULL,
  `nama_barang` varchar(100) NOT NULL,
  `harga_barang` decimal(10,2) NOT NULL,
  `stok_barang` int(11) NOT NULL,
  `deskripsi_barang` text DEFAULT NULL,
  `kategori_barang` varchar(50) DEFAULT NULL,
  `ukuran` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `barang59`
--

INSERT INTO `barang59` (`id_barang`, `gambar_barang`, `nama_barang`, `harga_barang`, `stok_barang`, `deskripsi_barang`, `kategori_barang`, `ukuran`) VALUES
(1, '69153fd471668_1763000276.jpeg', 'Nike Dunk High', 1500000.00, 1, 'Versi Dunk High ini memadukan siluet klasik dengan dasar kulit yang diganti dengan material kanvas berlapis cokelat muda yang lebih kasar. Bagian atas yang netral dilapisi nuansa gandum dan emas, menciptakan skema warna yang mudah ditata, dilengkapi dengan sol luar oranye terang yang menambah sentuhan elegan di kaki.', 'Sneakers', '38,39,40,41,42'),
(2, '6916983b13cac_1763088443.jpeg', 'Converse', 220000.00, 11, 'Sepatu Sekolah yang elegan', 'Sneakers', '39,40,41,42'),
(3, '6917a7cb3fe4c_1763157963.jpg', 'adidas ', 175000.00, 50, 'Sepatu running anti slip', 'Running', '38,39,40,41,42'),
(4, '6917cced737aa_1763167469.jpg', 'Snekers wanita', 150000.00, 15, 'Snekers wanita minimalis dan elegan', 'Sneakers', '36,37,38'),
(5, '6917d072276ca_1763168370.jpg', 'Pantofel', 150000.00, 22, 'Sepatu pantofel untuk paskibra yang berkualitas', 'Formal', '38,39,40,41,42'),
(6, '6917d207dfe71_1763168775.jpg', 'PUMA', 300000.00, 50, 'Sepatu basket yang elegant dan anti slip', 'Basketball', '38,39,40,41,42'),
(8, '6917d6dda82ec_1763170013.jpg', 'vans off the wall', 125000.00, 18, 'sepatu estetic dan elegant', 'Casual', '38,39,40,41,42'),
(11, '6925e6fe12430_1764091646.jpg', 'NIKE black and white', 300000.00, 50, 'NIKE hitam putih dengan gaya elegant dan juga sporty', 'Casual', '40,41,42,43');

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

--
-- Table structure for table `keranjang59`
--

CREATE TABLE `keranjang59` (
  `id_keranjang` int(11) NOT NULL,
  `jumlah` int(11) NOT NULL,
  `harga_satuan` decimal(10,0) NOT NULL,
  `subtotal` decimal(10,0) NOT NULL,
  `tgl_tambah` timestamp NOT NULL DEFAULT current_timestamp(),
  `id_user` int(11) NOT NULL,
  `id_barang` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `keranjang59`
--

INSERT INTO `keranjang59` (`id_keranjang`, `jumlah`, `harga_satuan`, `subtotal`, `tgl_tambah`, `id_user`, `id_barang`) VALUES
(1, 1, 1500000, 1500000, '2026-01-20 08:36:22', 0, 0),
(2, 1, 150000, 150000, '2026-01-20 14:34:34', 13, 4),
(76, 1, 150000, 150000, '2026-01-20 14:49:32', 13, 5),
(77, 3, 220000, 660000, '2026-01-20 15:13:40', 13, 2),
(78, 3, 70000, 210000, '2026-01-20 15:24:30', 13, 3);

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

--
-- Table structure for table `transaksi59`
--

CREATE TABLE `transaksi59` (
  `idtrans` int(11) NOT NULL,
  `idkjg` int(11) NOT NULL,
  `tgltrans` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `nama` varchar(100) NOT NULL,
  `alamat` varchar(500) NOT NULL,
  `nohp` text NOT NULL,
  `jmlbeli` int(50) NOT NULL,
  `total` double NOT NULL,
  `bayar` double NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `transaksi59`
--

INSERT INTO `transaksi59` (`idtrans`, `idkjg`, `tgltrans`, `nama`, `alamat`, `nohp`, `jmlbeli`, `total`, `bayar`) VALUES
(1, 71, '2026-01-20 10:15:45', 'ALI234', 'bandung', '085678345623', 1, 150000, 150000),
(2, 69, '2026-01-20 10:21:58', 'ALI234', 'bandung', '085678345623', 1, 125000, 125000),
(3, 68, '2026-01-20 10:24:00', 'ALI234', 'bandung', '085678345623', 1, 70000, 100000),
(4, 2, '2026-01-20 10:28:27', 'ALI234', 'bandung', '085678345623', 1, 220000, 250000),
(5, 3, '2026-01-20 10:37:12', 'ALI234', 'bandung', '085678345623', 1, 70000, 100000),
(6, 13, '2026-01-20 10:49:15', 'ALI234', 'bandung', '085678345623', 2, 1650000, 2000000),
(7, 3, '2026-01-20 11:17:33', 'ALI234', 'bandung', '085678345623', 1, 150000, 200000),
(8, 2, '2026-01-20 11:23:54', 'ALI234', 'bandung', '085678345623', 1, 220000, 250000),
(9, 13, '2026-01-20 11:48:16', 'ALI234', 'bandung', '085678345623', 2, 1650000, 2000000),
(10, 3, '2026-01-20 14:49:09', 'ALI234', 'bandung', '085678345623', 1, 70000, 100000),
(11, 79, '2026-02-03 05:32:09', 'ALI234', 'bandung', '085678345623', 1, 1500000, 2000000);

--
-- Indexes for dumped tables
--

--
-- Indexes for table `barang59`
--
ALTER TABLE `barang59`
  ADD PRIMARY KEY (`id_barang`);

--
-- Indexes for table `keranjang59`
--
ALTER TABLE `keranjang59`
  ADD PRIMARY KEY (`id_keranjang`);

--
-- Indexes for table `transaksi59`
--
ALTER TABLE `transaksi59`
  ADD PRIMARY KEY (`idtrans`,`tgltrans`);

--
-- AUTO_INCREMENT for dumped tables
--

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

--
-- AUTO_INCREMENT for table `keranjang59`
--
ALTER TABLE `keranjang59`
  MODIFY `id_keranjang` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=80;

--
-- AUTO_INCREMENT for table `transaksi59`
--
ALTER TABLE `transaksi59`
  MODIFY `idtrans` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;
COMMIT;

