-- https://www.phpmyadmin.net/
--
-- Waktu pembuatan: 11 Jan 2026 pada 11.31
-- Versi server: 10.4.32-MariaDB
-- Versi PHP: 8.2.12

START TRANSACTION;



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

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

CREATE TABLE `cart` (
  `id` int(100) NOT NULL,
  `user_id` int(100) NOT NULL,
  `pid` int(100) NOT NULL,
  `name` varchar(100) NOT NULL,
  `price` int(10) NOT NULL,
  `quantity` int(10) NOT NULL,
  `image` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

INSERT INTO `cart` (`id`, `user_id`, `pid`, `name`, `price`, `quantity`, `image`) VALUES
(104, 8, 16, 'Stabilo Boss', 12000, 1, 'stabilo boss.jpg'),
(105, 8, 15, 'Calculator Ilmiah', 69000, 1, '310416_produk.jpg'),
(141, 5, 9, 'Tinta Print hitam ', 90000, 1, 'tinta hitam.jpg');

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

--
-- Struktur dari tabel `messages`
--

CREATE TABLE `messages` (
  `id` int(100) NOT NULL,
  `user_id` int(100) NOT NULL,
  `name` varchar(100) NOT NULL,
  `email` varchar(100) NOT NULL,
  `number` varchar(12) NOT NULL,
  `message` varchar(500) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data untuk tabel `messages`
--

INSERT INTO `messages` (`id`, `user_id`, `name`, `email`, `number`, `message`) VALUES
(1, 4, 'arif munandar', 'arifmunandar@gmail.com', '09501313', 'Halo'),
(2, 7, 'acha', 'nurisrahmid@gmail.com', '0897654323', 'file yg mau saya print salah dokumen kak');

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

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

CREATE TABLE `orders` (
  `id` int(100) NOT NULL,
  `user_id` int(100) NOT NULL,
  `name` varchar(20) NOT NULL,
  `number` varchar(10) NOT NULL,
  `email` varchar(50) 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` date NOT NULL DEFAULT current_timestamp(),
  `payment_status` varchar(20) NOT NULL DEFAULT 'pending',
  `bukti_pembayaran` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- 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`) VALUES
(70, 5, 'nuris123', '54654545', '', 'TRANSFER', 'bung, makassar, Indonesia', 'Tinta Print hitam  (90000 x 1) - ', 90000, '2026-01-06', 'selesai', 'bukti_1767630177.jpeg'),
(71, 7, 'acha', '0897654', '', 'QRIS', 'perintis kemerdekaan iv, tamalanrea, tamalanrea jaya', 'pulpen  (1000 x 1) - ', 1000, '2026-01-06', 'selesai', 'bukti_1767675949.jpeg');

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

--
-- Struktur dari tabel `print_orders`
--

CREATE TABLE `print_orders` (
  `id` int(11) NOT NULL,
  `user_id` varchar(100) NOT NULL,
  `nama` varchar(255) NOT NULL,
  `no_hp` varchar(50) NOT NULL,
  `ukuran_kertas` varchar(50) NOT NULL,
  `jenis_kertas` varchar(100) NOT NULL,
  `warna` varchar(50) NOT NULL,
  `jumlah_halaman` varchar(100) NOT NULL,
  `jumlah_rangkap` varchar(50) NOT NULL,
  `penjilidan` varchar(100) NOT NULL,
  `catatan` text DEFAULT NULL,
  `file_print` varchar(255) DEFAULT NULL,
  `total_harga` int(11) DEFAULT 0,
  `status` varchar(20) DEFAULT 'tertunda',
  `tanggal_pesan` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data untuk tabel `print_orders`
--

INSERT INTO `print_orders` (`id`, `user_id`, `nama`, `no_hp`, `ukuran_kertas`, `jenis_kertas`, `warna`, `jumlah_halaman`, `jumlah_rangkap`, `penjilidan`, `catatan`, `file_print`, `total_harga`, `status`, `tanggal_pesan`) VALUES
(17, '7', 'caca', '089997', 'A4', 'HVS', 'Hitam Putih', '12', '1 Rangkap', 'Tanpa Jilid', '1-5 hlmn', '1767675319_LEMBAR VALIDASI Fiksss.pdf', 3600, 'dibatalkan', '2026-01-06 04:55:19');

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

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

CREATE TABLE `products` (
  `id` int(100) NOT NULL,
  `name` varchar(100) NOT NULL,
  `details` varchar(500) NOT NULL,
  `price` int(10) NOT NULL,
  `image_01` varchar(100) NOT NULL,
  `image_02` varchar(100) NOT NULL,
  `image_03` varchar(100) NOT NULL,
  `stock` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

INSERT INTO `products` (`id`, `name`, `details`, `price`, `image_01`, `image_02`, `image_03`, `stock`) VALUES
(9, 'Tinta Print hitam ', 'Tinta Printer', 90000, 'tinta hitam.jpg', 'tinta biru.jpg', 'tinta merah.jpeg', 12),
(10, 'Stabilo Swingg Cool', 'Stabilo Highlighter Swing Cool  memiliki varian warna  yang berbeda\r\n', 5000, 'gm 3.jpg', 'Stabilo Highlighter Swing Cool.jpg', 'stabilo high;ighter pastel.jpg', 23),
(12, 'Kertas Hvs A4', 'Kertas Hvs Sidu A4  70Gr', 71000, 'Kertas-HVS1.jpg', 'kertas hvs 2.jpg', 'sidu 3.jpg', 10),
(13, 'Map Plastik', '1 pcs 5000', 5000, 'map kancing 2.jpeg', 'map plastik kancing.jpg', 'map.jpg', 11),
(15, 'Calculator Ilmiah', 'SCIENTIFIC CALCULATOR JOYKO CC-23CO ', 69000, '310416_produk.jpg', 'id-11134207-7qul3-lh6dm4m1suk097@resize_w900_nl.webp', '57d7ccbfe1e1443ba50504f8a120391b_52d5f9372d3c4c209dfa5879486cd738.jpg', 2),
(16, 'Stabilo Boss', 'Highlighter Stabilo Boss Original Color Collection', 12000, 'stabilo boss.jpg', 'Stabilo boss.jpg', 'boss2.jpg', 7),
(18, 'pita', 'yyy', 5000, 'download (1).jpg', 'download.jpg', 'download (3).jpg', 3),
(19, 'pulpen ', 'pulpen hitam', 1000, 'Pulpen Hi-Tech Joyko.jpg', 'Pulpen Gel Safari.jpg', 'Pulpen Snowman V-1.jpg', 8);

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

--
-- Struktur dari tabel `stock_logs`
--

CREATE TABLE `stock_logs` (
  `id` int(11) NOT NULL,
  `product_id` int(11) NOT NULL,
  `change_qty` int(11) NOT NULL,
  `type` enum('IN','OUT') NOT NULL,
  `note` varchar(255) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data untuk tabel `stock_logs`
--

INSERT INTO `stock_logs` (`id`, `product_id`, `change_qty`, `type`, `note`, `created_at`) VALUES
(1, 3, 10, 'IN', 'Admin restock', '2025-12-15 20:02:38'),
(2, 4, 5, 'IN', 'Admin restock', '2025-12-16 05:56:17'),
(3, 3, 1, 'OUT', 'Checkout by user 5', '2025-12-16 07:12:44'),
(4, 3, 1, 'OUT', 'Checkout by user 5', '2025-12-16 07:13:52'),
(5, 3, 1, 'OUT', 'Checkout by user 5', '2025-12-16 07:18:14'),
(6, 3, 1, 'OUT', 'Checkout by user 5', '2025-12-16 07:28:11'),
(7, 3, 1, 'OUT', 'Checkout by user 5', '2025-12-16 07:42:49'),
(8, 3, 1, 'OUT', 'Checkout by user 5', '2025-12-16 09:55:48'),
(9, 5, 9, 'IN', 'Admin restock', '2025-12-16 10:14:17'),
(10, 4, 4, 'IN', 'Admin restock', '2025-12-19 14:05:39'),
(11, 9, 4, 'IN', 'Stok awal produk', '2025-12-21 15:06:37'),
(12, 5, 1, 'OUT', 'Checkout by user 7', '2025-12-22 12:14:16'),
(13, 10, 12, 'IN', 'Stok awal produk', '2025-12-22 12:34:55'),
(14, 11, 15, 'IN', 'Stok awal produk', '2025-12-22 12:53:36'),
(15, 12, 15, 'IN', 'Stok awal produk', '2025-12-22 13:03:21'),
(16, 13, 14, 'IN', 'Stok awal produk', '2025-12-22 13:14:42'),
(17, 9, 1, 'OUT', 'Checkout by user 7', '2025-12-22 13:21:10'),
(18, 3, 1, 'OUT', 'Checkout by user 5', '2025-12-22 21:10:11'),
(19, 3, 1, 'OUT', 'Checkout by user 5', '2025-12-23 21:23:58'),
(20, 3, 1, 'OUT', 'Checkout by user 5', '2025-12-23 21:31:09'),
(21, 3, 1, 'OUT', 'Checkout by user 5', '2025-12-23 21:33:48'),
(22, 3, 1, 'OUT', 'Checkout by user 5', '2025-12-23 21:35:28'),
(23, 3, 1, 'OUT', 'Checkout by user 5', '2025-12-23 21:41:49'),
(24, 3, 1, 'OUT', 'Checkout by user 5', '2025-12-23 21:49:25'),
(25, 3, 1, 'OUT', 'Checkout by user 5', '2025-12-23 21:52:49'),
(26, 3, 1, 'OUT', 'Checkout by user 5', '2025-12-23 21:53:19'),
(27, 13, 1, 'OUT', 'Checkout by user 7', '2025-12-24 11:44:20'),
(28, 12, 1, 'OUT', 'Checkout by user 7', '2025-12-24 11:44:20'),
(29, 13, 2, 'OUT', 'Checkout by user 7', '2025-12-24 11:53:29'),
(30, 11, 1, 'OUT', 'Checkout by user 7', '2025-12-24 11:53:29'),
(31, 9, 18, 'IN', 'Admin restock', '2025-12-25 01:37:06'),
(32, 14, 7, 'IN', 'Stok awal produk', '2025-12-25 01:49:11'),
(33, 15, 7, 'IN', 'Stok awal produk', '2025-12-25 01:53:21'),
(34, 10, 11, 'IN', 'Admin restock', '2025-12-25 02:06:37'),
(35, 16, 13, 'IN', 'Stok awal produk', '2025-12-25 02:11:36'),
(36, 15, 2, 'OUT', 'Checkout by user 7', '2025-12-25 02:55:06'),
(37, 12, 1, 'OUT', 'Checkout by user 7', '2025-12-25 03:39:54'),
(38, 16, 1, 'OUT', 'Checkout by user 7', '2025-12-25 11:15:12'),
(39, 15, 1, 'OUT', 'Checkout by user 7', '2025-12-25 11:15:12'),
(40, 17, 12, 'IN', 'Stok awal produk', '2025-12-25 11:21:09'),
(41, 15, 1, 'OUT', 'Checkout by user 7', '2025-12-29 02:27:32'),
(42, 18, 15, 'IN', 'Stok awal produk', '2025-12-29 02:30:42'),
(43, 16, 1, 'OUT', 'Checkout by user 8', '2025-12-30 01:21:05'),
(44, 18, 1, 'OUT', 'Checkout by user 8', '2025-12-30 01:21:05'),
(45, 18, 1, 'OUT', 'Checkout by user 8', '2025-12-30 01:24:51'),
(46, 16, 1, 'IN', 'Admin restock', '2026-01-03 12:58:40'),
(47, 16, 1, 'IN', 'Admin restock', '2026-01-03 12:58:55'),
(48, 18, 1, 'OUT', 'Checkout by user 5', '2026-01-04 18:20:44'),
(49, 18, 1, 'OUT', 'Checkout by user 5', '2026-01-04 18:23:23'),
(50, 18, 1, 'OUT', 'Checkout by user 5', '2026-01-04 18:30:21'),
(51, 18, 1, 'OUT', 'Checkout by user 5', '2026-01-04 18:53:53'),
(52, 18, 1, 'OUT', 'Checkout by user 5', '2026-01-04 19:01:01'),
(53, 18, 1, 'OUT', 'Checkout by user 5', '2026-01-04 19:15:14'),
(54, 18, 1, 'OUT', 'Checkout by user 5', '2026-01-04 19:22:55'),
(55, 18, 1, 'OUT', 'Checkout by user 5', '2026-01-04 19:25:22'),
(56, 18, 1, 'OUT', 'Checkout by user 5', '2026-01-04 19:28:47'),
(57, 16, 1, 'OUT', 'Checkout by user 5', '2026-01-04 19:30:25'),
(58, 16, 1, 'OUT', 'Checkout by user 5', '2026-01-04 19:30:37'),
(59, 18, 1, 'OUT', 'Checkout by user 5', '2026-01-04 19:34:50'),
(60, 16, 1, 'OUT', 'Checkout by user 5', '2026-01-05 14:22:49'),
(61, 16, 1, 'OUT', 'Checkout by user 5', '2026-01-05 14:45:57'),
(62, 16, 1, 'OUT', 'Checkout by user 5', '2026-01-05 14:46:11'),
(63, 15, 1, 'OUT', 'Checkout by user 5', '2026-01-05 14:46:11'),
(64, 12, 1, 'OUT', 'Checkout by user 5', '2026-01-05 14:47:14'),
(65, 16, 1, 'OUT', 'Checkout by user 5', '2026-01-05 15:09:10'),
(66, 12, 1, 'OUT', 'Checkout by user 5', '2026-01-05 15:09:28'),
(67, 9, 1, 'OUT', 'Checkout by user 5', '2026-01-05 15:09:43'),
(68, 12, 1, 'OUT', 'Checkout by user 5', '2026-01-05 15:23:18'),
(69, 9, 1, 'OUT', 'Checkout by user 5', '2026-01-05 15:23:35'),
(70, 9, 1, 'OUT', 'Checkout by user 5', '2026-01-05 15:23:49'),
(71, 9, 1, 'OUT', 'Checkout by user 5', '2026-01-05 16:00:57'),
(72, 9, 1, 'OUT', 'Checkout by user 5', '2026-01-05 16:03:15'),
(73, 9, 1, 'OUT', 'Checkout by user 5', '2026-01-05 16:04:59'),
(74, 9, 1, 'OUT', 'Checkout by user 5', '2026-01-05 16:05:53'),
(75, 9, 1, 'OUT', 'Checkout by user 5', '2026-01-05 16:07:13'),
(76, 9, 1, 'OUT', 'Checkout by user 5', '2026-01-05 16:20:45'),
(77, 19, 9, 'IN', 'Stok awal produk', '2026-01-06 05:00:01'),
(78, 19, 1, 'OUT', 'Checkout by user 7', '2026-01-06 05:01:40');

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

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

CREATE TABLE `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 COLLATE=utf8mb4_general_ci;

--
-- Indeks untuk tabel `cart`
--
ALTER TABLE `cart`
  ADD PRIMARY KEY (`id`);

--
-- Indeks untuk tabel `messages`
--
ALTER TABLE `messages`
  ADD PRIMARY KEY (`id`);

--
-- Indeks untuk tabel `orders`
--
ALTER TABLE `orders`
  ADD PRIMARY KEY (`id`);

--
-- Indeks untuk tabel `print_orders`
--
ALTER TABLE `print_orders`
  ADD PRIMARY KEY (`id`);

--
-- Indeks untuk tabel `products`
--
ALTER TABLE `products`
  ADD PRIMARY KEY (`id`);

--
-- Indeks untuk tabel `stock_logs`
--
ALTER TABLE `stock_logs`
  ADD PRIMARY KEY (`id`);

--
-- Indeks untuk tabel `wishlist`
--
ALTER TABLE `wishlist`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT untuk tabel `cart`
--
ALTER TABLE `cart`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=144;

--
-- AUTO_INCREMENT untuk tabel `messages`
--
ALTER TABLE `messages`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT untuk tabel `orders`
--
ALTER TABLE `orders`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=72;

--
-- AUTO_INCREMENT untuk tabel `print_orders`
--
ALTER TABLE `print_orders`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18;

--
-- AUTO_INCREMENT untuk tabel `products`
--
ALTER TABLE `products`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20;

--
-- AUTO_INCREMENT untuk tabel `stock_logs`
--
ALTER TABLE `stock_logs`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=79;

--
-- AUTO_INCREMENT untuk tabel `wishlist`
--
ALTER TABLE `wishlist`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
COMMIT;

