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

START TRANSACTION;



--
-- Database: `u653090826_toko_online`
--

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

--
-- Table structure for table `admin_log`
--

CREATE TABLE `admin_log` (
  `id` int(11) NOT NULL,
  `admin` varchar(100) NOT NULL,
  `aksi` varchar(50) NOT NULL,
  `waktu` datetime NOT NULL,
  `keterangan` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `admin_log`
--

INSERT INTO `admin_log` (`id`, `admin`, `aksi`, `waktu`, `keterangan`) VALUES
(1, 'admin@admin.com', 'hapus', '2025-10-15 04:47:19', 'Menghapus barang: Laptop Asus'),
(2, 'admin@admin.com', 'hapus', '2025-10-15 06:04:27', 'Menghapus barang: Laptop Acer'),
(3, '', 'Pulihkan Semua', '2025-10-15 07:06:40', 'Admin memulihkan semua barang dari recycle bin'),
(4, '', 'Hapus Barang', '2025-10-15 07:20:55', 'Admin menghapus barang: Laptop Acer'),
(5, '', 'Pulihkan Barang', '2025-10-15 07:21:30', 'Admin memulihkan barang: Laptop Acer'),
(6, '', 'Hapus Barang', '2025-10-15 07:25:48', 'Admin menghapus barang mengandung kata: laptop'),
(7, '', 'Pulihkan Barang', '2025-10-15 07:26:18', 'Admin memulihkan barang: Laptop IBM ThinkPad 300'),
(8, '', 'Hapus Barang', '2025-10-15 07:29:19', 'Admin menghapus barang mengandung kata: hape'),
(9, '', 'Pulihkan Barang', '2025-10-15 07:29:34', 'Admin memulihkan barang: Hape Poco F2'),
(10, '', 'Hapus Barang', '2025-10-15 07:36:23', 'Admin menghapus barang mengandung kata: poco'),
(11, '', 'Pulihkan Barang', '2025-10-15 07:49:09', 'Admin memulihkan barang: Hape Poco F2'),
(12, '', 'Hapus Barang', '2025-10-15 07:50:32', 'Admin menghapus barang mengandung kata: laptop ibm'),
(13, '', 'Pulihkan Barang', '2025-10-15 07:51:23', 'Admin memulihkan barang: Laptop IBM ThinkPad 300'),
(14, '', 'Hapus Barang', '2025-10-15 17:40:16', 'Admin menghapus barang yang mengandung kata: laptop'),
(15, '', 'Pulihkan Semua', '2025-10-15 17:40:40', 'Admin memulihkan semua barang dari recycle bin'),
(16, '', 'Hapus Barang', '2025-10-15 17:42:10', 'Admin menghapus barang: Laptop Asus'),
(17, '', 'Pulihkan Barang', '2025-10-15 17:42:21', 'Admin memulihkan barang: Laptop Asus'),
(18, '', 'Hapus Barang', '2025-10-15 18:08:14', 'Admin menghapus barang: Hape Samsung Galaxy');

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

--
-- Table structure for table `barang`
--

CREATE TABLE `barang` (
  `no_id` int(20) NOT NULL,
  `Nama_barang` varchar(50) NOT NULL,
  `Harga` int(20) NOT NULL,
  `Stok` int(30) NOT NULL,
  `Diskon` int(30) NOT NULL,
  `Gbr_brg` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `barang`
--

INSERT INTO `barang` (`no_id`, `Nama_barang`, `Harga`, `Stok`, `Diskon`, `Gbr_brg`) VALUES
(49, 'Hape Poco F2', 3000000, 4, 0, 'hape_POCO_f2.jpg'),
(51, 'Hape Poco X3', 3500000, 8, 5, 'poco_x3.jpg'),
(55, 'Kopi Kapal Api Sachet', 1500, 980, 5, 'secangkir-kopi.jpg'),
(56, 'Laptop IBM ThinkPad 300', 20000000, 10, 0, 'Laptop_Ibm_thinkpad_300.jpg'),
(58, 'Laptop Acer', 15000000, 9, 0, 'laptop_acer.jpg'),
(59, 'Laptop Asus', 17000000, 15, 0, 'Laptop_Asus.jpg');

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

--
-- Table structure for table `barang_deleted`
--

CREATE TABLE `barang_deleted` (
  `Nama_barang` varchar(50) NOT NULL,
  `Harga` int(20) NOT NULL,
  `Stok` int(30) NOT NULL,
  `Diskon` int(30) NOT NULL,
  `Gbr_brg` varchar(50) NOT NULL,
  `Tanggal_dihapus` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `barang_deleted`
--

INSERT INTO `barang_deleted` (`Nama_barang`, `Harga`, `Stok`, `Diskon`, `Gbr_brg`, `Tanggal_dihapus`) VALUES
('Hape Samsung Galaxy', 5000000, 16, 0, 'Hape_Samsung_galaxy.jpg', '2025-10-15 18:08:14');

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

--
-- Table structure for table `bukti`
--

CREATE TABLE `bukti` (
  `id` int(11) NOT NULL,
  `Email_bukti` varchar(150) NOT NULL,
  `Updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci;

--
-- Dumping data for table `bukti`
--

INSERT INTO `bukti` (`id`, `Email_bukti`, `Updated_at`) VALUES
(1, 'bejo@ludiro.com', '2025-10-15 14:01:20');

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

--
-- Table structure for table `kirim`
--

CREATE TABLE `kirim` (
  `Ongkos` int(30) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `kirim`
--

INSERT INTO `kirim` (`Ongkos`) VALUES
(10000);

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

--
-- Table structure for table `logo`
--

CREATE TABLE `logo` (
  `Nama_toko` varchar(50) DEFAULT NULL,
  `Gambar_logo` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `logo`
--

INSERT INTO `logo` (`Nama_toko`, `Gambar_logo`) VALUES
('Toko Maju Jaya', 'logo_maju_jaya.png');

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

--
-- Table structure for table `pelanggan`
--

CREATE TABLE `pelanggan` (
  `no_id` int(20) NOT NULL,
  `Nama` varchar(100) NOT NULL,
  `Alamat` varchar(100) NOT NULL,
  `Email` varchar(50) NOT NULL,
  `No_hape` varchar(30) NOT NULL,
  `Gbr_plg` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `pelanggan`
--

INSERT INTO `pelanggan` (`no_id`, `Nama`, `Alamat`, `Email`, `No_hape`, `Gbr_plg`) VALUES
(32, 'Edi Sudrajat', 'Cakung, Bekasi, Jawa Barat', 'telo@gmail.com', '0858374794', 'foto_profil_channel_yutup.png'),
(33, 'Jati Kusuma', 'Perak BPM 10, Klaten', 'jatipemuda@gmail.com', '085292193434', 'jati04.jpg');

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

--
-- Table structure for table `pelanggan_deleted`
--

CREATE TABLE `pelanggan_deleted` (
  `id` int(11) NOT NULL,
  `Nama` varchar(100) DEFAULT NULL,
  `Alamat` varchar(255) DEFAULT NULL,
  `Email` varchar(100) DEFAULT NULL,
  `No_hape` varchar(50) DEFAULT NULL,
  `Gbr_plg` varchar(50) NOT NULL,
  `Tanggal_dihapus` datetime DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `rekening`
--

CREATE TABLE `rekening` (
  `id` int(11) NOT NULL,
  `Nama_bank` varchar(100) NOT NULL,
  `No_rek` varchar(50) NOT NULL,
  `Atas_nama` varchar(100) NOT NULL,
  `Updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci;

--
-- Dumping data for table `rekening`
--

INSERT INTO `rekening` (`id`, `Nama_bank`, `No_rek`, `Atas_nama`, `Updated_at`) VALUES
(1, 'BNI', '5948954897', 'Heru Suparto', '2025-10-15 13:54:00');

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

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

CREATE TABLE `transaksi` (
  `no_id` int(20) NOT NULL,
  `Tanggal` date NOT NULL DEFAULT curdate(),
  `no_brg` int(20) NOT NULL,
  `no_plg` int(20) NOT NULL,
  `Jumlah_beli` int(30) NOT NULL,
  `Invoice` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `transaksi` (`no_id`, `Tanggal`, `no_brg`, `no_plg`, `Jumlah_beli`, `Invoice`) VALUES
(1, '2025-10-15', 54, 32, 1, 'INV202510158961'),
(2, '2025-10-15', 55, 32, 20, 'INV202510156572'),
(3, '2025-10-15', 59, 32, 1, 'INV202510157158');

--
-- Indexes for dumped tables
--

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

--
-- Indexes for table `barang`
--
ALTER TABLE `barang`
  ADD PRIMARY KEY (`no_id`);

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

--
-- Indexes for table `pelanggan`
--
ALTER TABLE `pelanggan`
  ADD PRIMARY KEY (`no_id`);

--
-- Indexes for table `pelanggan_deleted`
--
ALTER TABLE `pelanggan_deleted`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `Email` (`Email`);

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

--
-- Indexes for table `transaksi`
--
ALTER TABLE `transaksi`
  ADD PRIMARY KEY (`no_id`),
  ADD UNIQUE KEY `uniq_invoice` (`Invoice`),
  ADD KEY `no_brg` (`no_brg`),
  ADD KEY `no_plg` (`no_plg`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `admin_log`
--
ALTER TABLE `admin_log`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;

--
-- AUTO_INCREMENT for table `barang`
--
ALTER TABLE `barang`
  MODIFY `no_id` int(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=60;

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

--
-- AUTO_INCREMENT for table `pelanggan`
--
ALTER TABLE `pelanggan`
  MODIFY `no_id` int(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=34;

--
-- AUTO_INCREMENT for table `pelanggan_deleted`
--
ALTER TABLE `pelanggan_deleted`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

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

--
-- AUTO_INCREMENT for table `transaksi`
--
ALTER TABLE `transaksi`
  MODIFY `no_id` int(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
COMMIT;

