-- http://www.phpmyadmin.net
--
-- Versi Server: 5.6.26




--
-- Database: `shop_db`
--

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

--
-- Struktur dari tabel `bukti_transfer`
--

CREATE TABLE IF NOT EXISTS `bukti_transfer` (
  `id` int(11) NOT NULL,
  `orders_id` int(11) NOT NULL,
  `bukti_transfer` text NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `status` tinyint(1) NOT NULL,
  `kode_transaksi` text NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=latin1;

--
-- Dumping data untuk tabel `bukti_transfer`
--

INSERT INTO `bukti_transfer` (`id`, `orders_id`, `bukti_transfer`, `created_at`, `status`, `kode_transaksi`) VALUES
(1, 5, 'bukti_680ce16881339.png', '2025-04-26 08:36:40', 1, 'PYO-63160-26042025'),
(2, 6, 'bukti_680ce2643d276.png', '2025-04-26 08:40:52', 1, 'PYO-29138-26042025'),
(3, 7, 'bukti_681b03d62540a.png', '2025-05-07 01:55:18', 1, 'PYO-75997-07052025'),
(4, 8, 'bukti_681c30a532b9f.pdf', '2025-05-07 23:18:45', 1, 'PYO-71636-08052025'),
(5, 9, 'bukti_681c310389295.pdf', '2025-05-07 23:20:19', 1, 'PYO-10829-08052025'),
(6, 10, 'bukti_683b1441a0e83.png', '2025-05-31 09:37:53', 1, 'PYO-81688-31052025'),
(7, 11, 'bukti_685418645e9c8.jpg', '2025-06-19 09:02:12', 1, 'PYO-70913-19062025'),
(8, 12, 'bukti_685544c340874.jpg', '2025-06-20 06:23:47', 1, 'PYO-26303-20062025'),
(9, 13, 'bukti_685568b03343d.jpg', '2025-06-20 08:57:04', 1, 'PYO-32557-20062025'),
(10, 14, 'bukti_6871d41fa87a7.png', '2025-07-11 22:18:55', 1, 'PYO-27602-12072025'),
(11, 15, 'bukti_6875d1b6d5d5a.png', '2025-07-14 22:57:42', 1, 'PYO-43302-15072025'),
(12, 16, 'bukti_6875d24457900.png', '2025-07-14 23:00:04', 1, 'PYO-44326-15072025'),
(13, 17, 'bukti_6878ce28f36b4.png', '2025-07-17 05:19:21', 1, 'PYO-91710-17072025'),
(14, 18, 'bukti_6879a59f2fa51.png', '2025-07-17 20:38:39', 1, 'PYO-39995-18072025'),
(15, 19, 'bukti_6879a617b8b4d.jpg', '2025-07-17 20:40:39', 1, 'PYO-72001-18072025'),
(16, 20, 'bukti_6879b3d9abc87.jpg', '2025-07-17 21:39:21', 1, 'PYO-98854-18072025'),
(17, 19, 'bukti_687de16f1e3e8.png', '2025-07-21 01:42:55', 1, 'PYO-88964-21072025'),
(18, 20, 'bukti_687de21ba4297.jpg', '2025-07-21 01:45:47', 1, 'PYO-58820-21072025'),
(19, 21, 'bukti_687de2bf0b358.jpg', '2025-07-21 01:48:31', 1, 'PYO-22996-21072025'),
(20, 22, 'bukti_687de2f998951.jpg', '2025-07-21 01:49:29', 1, 'PYO-71185-21072025'),
(21, 23, 'bukti_687de611b4342.jpg', '2025-07-21 02:02:41', 1, 'PYO-57356-21072025'),
(22, 24, 'bukti_687de7bf43853.jpg', '2025-07-21 02:09:51', 1, 'PYO-61709-21072025'),
(23, 25, 'bukti_687de946b40e9.jpg', '2025-07-21 02:16:22', 1, 'PYO-73566-21072025'),
(24, 26, 'bukti_687de986cae99.jpg', '2025-07-21 02:17:26', 1, 'PYO-76448-21072025'),
(25, 27, 'bukti_687dea682b2b0.jpg', '2025-07-21 02:21:12', 1, 'PYO-51588-21072025'),
(26, 28, 'bukti_687deaef009c7.jpg', '2025-07-21 02:23:27', 1, 'PYO-91142-21072025'),
(27, 29, 'bukti_687deb4d1a703.jpg', '2025-07-21 02:25:01', 1, 'PYO-47320-21072025'),
(28, 30, 'bukti_687debec8ac97.jpg', '2025-07-21 02:27:40', 1, 'PYO-78722-21072025'),
(29, 31, 'bukti_687df7c61664f.jpg', '2025-07-21 03:18:14', 1, 'PYO-52165-21072025');

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

--
-- Struktur dari tabel `bukti_transfer_new`
--

CREATE TABLE IF NOT EXISTS `bukti_transfer_new` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `method` varchar(255) NOT NULL,
  `bukti_transfer` varchar(255) NOT NULL,
  `address` text NOT NULL,
  `total_products` text NOT NULL,
  `total_price` decimal(10,0) NOT NULL,
  `placed_on` date NOT NULL,
  `number` varchar(255) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;

--
-- Dumping data untuk tabel `bukti_transfer_new`
--

INSERT INTO `bukti_transfer_new` (`id`, `user_id`, `name`, `email`, `method`, `bukti_transfer`, `address`, `total_products`, `total_price`, `placed_on`, `number`) VALUES
(1, 1, 'as', 'asd', 'asd', 'asd', 'asd', 'asd', '12', '2025-04-17', ''),
(2, 1, 'aasd', 'piyoaswandi@gmail.com', 'Bank Transfer', '6803a4acb1b78.jpg', 'flat no. piyo, piyo, piyo, piyo, pyi', 'Snowflake Heart (1)', '20000', '2025-04-19', '898765432123'),
(3, 1, 'dahfkjah', 'fkffklaj@gmail.com', 'Dana', '6803a532ab57c.jpg', 'flat no. jfkasjf, jfkjf, jkjfkj, kfsjfk, jksj', 'Luna Bow (1)', '39999', '2025-04-19', '1209491');

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

--
-- Struktur dari tabel `cart`
--

CREATE TABLE IF NOT EXISTS `cart` (
  `id` int(100) NOT NULL,
  `user_id` int(100) NOT NULL,
  `pid` int(100) NOT NULL,
  `name` varchar(100) CHARACTER SET utf8mb4 NOT NULL,
  `price` int(100) NOT NULL,
  `quantity` int(100) NOT NULL,
  `image` varchar(100) CHARACTER SET utf8mb4 NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=latin1;

--
-- Dumping data untuk tabel `cart`
--

INSERT INTO `cart` (`id`, `user_id`, `pid`, `name`, `price`, `quantity`, `image`) VALUES
(12, 14, 11, 'bit coin', 10000, 1, 'create item_pesanan.png');

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

--
-- Struktur dari tabel `message`
--

CREATE TABLE IF NOT EXISTS `message` (
  `id` int(100) NOT NULL,
  `user_id` int(100) NOT NULL,
  `name` varchar(100) CHARACTER SET utf8mb4 NOT NULL,
  `email` varchar(100) CHARACTER SET utf8mb4 NOT NULL,
  `number` varchar(12) CHARACTER SET utf8mb4 NOT NULL,
  `message` varchar(500) CHARACTER SET utf8mb4 NOT NULL,
  `reply` text
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;

--
-- Dumping data untuk tabel `message`
--

INSERT INTO `message` (`id`, `user_id`, `name`, `email`, `number`, `message`, `reply`) VALUES
(3, 9, 'cenn', 'sendyawlyy@gmail.com', '5', 'hhbhjfhhgvgh', 'hi'),
(4, 9, 'uy', 'sendyawlyy@gmail.com', '1234567890', 'abcd', 'efg'),
(5, 9, 'Full Charms', 'sendyawlyy@gmail.com', '98765', 'test\r\n', 'HALO');

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

--
-- Struktur dari tabel `orders`
--

CREATE TABLE IF NOT EXISTS `orders` (
  `id` int(100) NOT NULL,
  `user_id` int(100) NOT NULL,
  `name` varchar(100) NOT NULL,
  `number` varchar(12) NOT NULL,
  `email` varchar(100) NOT NULL,
  `method` varchar(50) NOT NULL,
  `address` varchar(500) NOT NULL,
  `total_products` varchar(1000) NOT NULL,
  `total_price` int(100) NOT NULL,
  `placed_on` varchar(50) NOT NULL,
  `payment_status` varchar(20) NOT NULL DEFAULT 'pending',
  `bukti_pembayaran` varchar(255) DEFAULT NULL,
  `kode_transaksi` text NOT NULL,
  `pilihan_ongkir_id` int(11) NOT NULL,
  `pengiriman_id` int(11) NOT NULL,
  `no_resi` varchar(100) DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8mb4;

--
-- Dumping data untuk tabel `orders`
--

INSERT INTO `orders` (`id`, `user_id`, `name`, `number`, `email`, `method`, `address`, `total_products`, `total_price`, `placed_on`, `payment_status`, `bukti_pembayaran`, `kode_transaksi`, `pilihan_ongkir_id`, `pengiriman_id`, `no_resi`) VALUES
(18, 9, 'sendy', '0987654321', 'sendyawlyy@gmail.com', 'Dana', 'flat no. lorem, lorem, lorem, lorem, lorem', 'Luna Bow (1)', 40000, '2025-07-18', 'pending', NULL, 'PYO-39995-18072025', 1, 2, NULL);

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

--
-- Struktur dari tabel `pengiriman_m`
--

CREATE TABLE IF NOT EXISTS `pengiriman_m` (
  `id` int(11) NOT NULL,
  `pengiriman` varchar(255) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;

--
-- Dumping data untuk tabel `pengiriman_m`
--

INSERT INTO `pengiriman_m` (`id`, `pengiriman`, `created_at`, `updated_at`) VALUES
(1, 'JNE', '2025-07-18 02:38:19', '0000-00-00 00:00:00'),
(2, 'J&T', '2025-04-26 13:28:43', '0000-00-00 00:00:00');

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

--
-- Struktur dari tabel `pilihan_ongkir_m`
--

CREATE TABLE IF NOT EXISTS `pilihan_ongkir_m` (
  `id` int(11) NOT NULL,
  `pilihan_ongkir` varchar(255) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;

--
-- Dumping data untuk tabel `pilihan_ongkir_m`
--

INSERT INTO `pilihan_ongkir_m` (`id`, `pilihan_ongkir`, `created_at`, `updated_at`) VALUES
(1, 'dalam jabodetabek', '2025-04-26 13:26:41', '0000-00-00 00:00:00'),
(2, 'luar jabodetabek', '2025-04-26 13:26:41', '0000-00-00 00:00:00');

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

--
-- Struktur dari tabel `products`
--

CREATE TABLE IF NOT EXISTS `products` (
  `id` int(100) NOT NULL,
  `name` varchar(100) CHARACTER SET utf8mb4 NOT NULL,
  `details` varchar(500) CHARACTER SET utf8mb4 NOT NULL,
  `price` decimal(10,2) NOT NULL,
  `image` varchar(100) CHARACTER SET utf8mb4 NOT NULL,
  `stok_produk` int(11) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=latin1;

--
-- Dumping data untuk tabel `products`
--

INSERT INTO `products` (`id`, `name`, `details`, `price`, `image`, `stok_produk`) VALUES
(1, 'Snowflake Heart', 'design berbentuk hati dan kristal berwarna putih', '10000.00', '49.png', 0),
(2, 'Luna Bow', 'design berbentuk pita berwarna pink', '40000.00', 'WhatsApp Image 2025-03-28 at 22.45.12_68f87ff5.jpg', 0),
(3, 'Heart Link Bell', 'design rantai yang saling mengait satu sama lain antara love dan bell', '45000.00', 'WhatsApp Image 2025-03-28 at 22.46.37_7a2d64a7.jpg', 0),
(4, 'guardian veil', 'design sepasang sayap pelindung', '55000.00', 'WhatsApp Image 2025-03-28 at 22.50.12_22df9b17.jpg', 0),
(5, 'pink seashell', 'design seperti kerang dan berwarna pink', '35000.00', 'WhatsApp Image 2025-03-28 at 22.52.24_d78e6eb5.jpg', 0),
(6, 'Ethereal Flora', 'bunga dengan warna seperti siluet pelangi', '20000.00', 'WhatsApp Image 2025-03-28 at 22.54.09_88cffd5d.jpg', 0),
(7, 'starlinkof love', 'charm love yang memiliki rantai yang terhubung dengan bintang', '27000.00', 'WhatsApp Image 2025-03-28 at 22.54.28_cb36acd1.jpg', 0),
(8, 'starlinkof bow', 'pita yang memiliki rantai yang terhubung dengan bintang kecil', '27000.00', 'WhatsApp Image 2025-03-28 at 22.54.28_98aa703e.jpg', 0),
(9, 'cinta beadlink', 'design hati yang memiliki rantai yang terhubung dengan beads pink dibawahnya', '27000.00', 'WhatsApp Image 2025-03-28 at 22.54.28_98aa703e.jpg', 0),
(11, 'bit coin', 'test', '10000.00', 'create item_pesanan.png', 8982),
(14, 'Full Charms', 'full', '650000.00', 'WhatsApp Image 2025-05-31 at 22.33.58_84e51d12.jpg', 0),
(20, 'celestial', 'wings', '50000.00', '94e26df034d37bad2a999d4cddcf1a1d.jpg', 10),
(21, 'lorem', 'test', '10000000.00', '95c093dedb5726def84add48f5a79743.jpg', 0);

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

--
-- Struktur dari tabel `wishlist`
--

CREATE TABLE IF NOT EXISTS `wishlist` (
  `id` int(100) NOT NULL,
  `user_id` int(100) NOT NULL,
  `pid` int(100) NOT NULL,
  `name` varchar(100) NOT NULL,
  `price` int(100) NOT NULL,
  `image` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `bukti_transfer`
--
ALTER TABLE `bukti_transfer`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `bukti_transfer_new`
--
ALTER TABLE `bukti_transfer_new`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `cart`
--
ALTER TABLE `cart`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`),
  ADD KEY `product_id` (`pid`);

--
-- Indexes for table `message`
--
ALTER TABLE `message`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `orders`
--
ALTER TABLE `orders`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `pengiriman_m`
--
ALTER TABLE `pengiriman_m`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `pilihan_ongkir_m`
--
ALTER TABLE `pilihan_ongkir_m`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `products`
--
ALTER TABLE `products`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `wishlist`
--
ALTER TABLE `wishlist`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `bukti_transfer`
--
ALTER TABLE `bukti_transfer`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=30;
--
-- AUTO_INCREMENT for table `bukti_transfer_new`
--
ALTER TABLE `bukti_transfer_new`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `cart`
--
ALTER TABLE `cart`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=32;
--
-- AUTO_INCREMENT for table `message`
--
ALTER TABLE `message`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `orders`
--
ALTER TABLE `orders`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=32;
--
-- AUTO_INCREMENT for table `pengiriman_m`
--
ALTER TABLE `pengiriman_m`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `pilihan_ongkir_m`
--
ALTER TABLE `pilihan_ongkir_m`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `products`
--
ALTER TABLE `products`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=22;
--
-- AUTO_INCREMENT for table `wishlist`
--
ALTER TABLE `wishlist`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT;
--
-- Ketidakleluasaan untuk tabel pelimpahan (Dumped Tables)
--

--
-- Ketidakleluasaan untuk tabel `cart`
--
ALTER TABLE `cart`
  ADD CONSTRAINT `cart_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `cart_ibfk_2` FOREIGN KEY (`pid`) REFERENCES `products` (`id`) ON DELETE CASCADE;

