-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 11, 2025 at 04:35 AM
-- Server version: 10.4.32-MariaDB
-- PHP Version: 8.2.12

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
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 */;

CREATE DATABASE cicilan;
USE cicilan;

--
-- Database: `cicilan`
--

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

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

CREATE TABLE `barang` (
  `kode_barang` varchar(10) NOT NULL,
  `nama` varchar(255) NOT NULL,
  `deskripsi` text DEFAULT NULL,
  `harga` decimal(10,2) NOT NULL,
  `satuan` varchar(50) DEFAULT NULL,
  `stok` int(11) DEFAULT 0,
  `foto` varchar(255) DEFAULT NULL,
  `kategori` varchar(100) DEFAULT 'Umum'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

INSERT INTO `barang` (`kode_barang`, `nama`, `deskripsi`, `harga`, `satuan`, `stok`, `foto`, `kategori`) VALUES
('BRG0001', 'Beras Premium 5kg', 'Beras kualitas premium wangi', 7200000.00, 'Unit', 40, 'beras.jpg', 'Umum'),
('BRG0002', 'Minyak Goreng 2L', 'Minyak goreng sawit 2 liter', 2800000.00, 'Unit', 55, 'minyak.jpg', 'Umum'),
('BRG0003', 'Gula Pasir 1kg', 'Gula pasir kemasan pabrik', 1500000.00, 'Unit', 62, 'gula.jpg', 'Umum'),
('BRG0004', 'Tepung Terigu 1kg', 'Tepung terigu serbaguna', 1100000.00, 'Unit', 47, 'terigu.jpg', 'Umum'),
('BRG0005', 'Susu Kental Manis', 'SKM kaleng 370g', 1300000.00, 'Unit', 30, 'skm.jpg', 'Umum'),
('BRG0006', 'Telur Ayam 1kg', 'Telur ayam ras segar', 2700000.00, 'Unit', 80, 'telur.jpg', 'Umum'),
('BRG0007', 'Kopi Kapal Api 165g', 'Kopi hitam kemasan', 1200000.00, 'Unit', 28, 'kopi.jpg', 'Umum'),
('BRG0008', 'Teh Celup Sariwangi', 'Isi 25 kantong', 700000.00, 'Unit', 50, 'teh.jpg', 'Umum'),
('BRG0009', 'Sabun Mandi Lifebuoy', 'Sabun batang 110g', 400000.00, 'Unit', 45, 'lifebuoy.jpg', 'Umum'),
('BRG0010', 'Shampo Sunsilk 135ml', 'Untuk rambut hitam & lembut', 1900000.00, 'Unit', 20, 'sunsilk.jpg', 'Umum'),
('BRG0011', 'Pasta Gigi Pepsodent', 'Tube 190g', 1300000.00, 'Unit', 34, 'pepsodent.jpg', 'Umum'),
('BRG0012', 'Air Mineral 600ml', 'Air mineral botol', 300000.00, 'Unit', 100, 'airmineral.jpg', 'Umum'),
('BRG0013', 'Mi Instan Goreng', 'Mi instan populer', 350000.00, 'Unit', 200, 'mie_goreng.jpg', 'Umum'),
('BRG0014', 'Mi Instan Kuah', 'Mi kuah berbagai rasa', 300000.00, 'Unit', 150, 'mie_kuah.jpg', 'Umum'),
('BRG0015', 'Sabun Cuci Piring 800ml', 'Kemasan refill', 1200000.00, 'Unit', 24, 'cuci_piring.jpg', 'Umum'),
('BRG0016', 'Deterjen Bubuk 900g', 'Deterjen anti noda', 1900000.00, 'Unit', 36, 'deterjen.jpg', 'Umum'),
('BRG0017', 'Pewangi Pakaian 900ml', 'Wangi tahan lama', 1000000.00, 'Unit', 40, 'pewangi.jpg', 'Umum'),
('BRG0018', 'Sarden 425g', 'Ikan sarden saus tomat', 1600000.00, 'Unit', 18, 'sarden.jpg', 'Umum'),
('BRG0019', 'Kornet Sapi 340g', 'Kornet sapi premium', 2800000.00, 'Unit', 22, 'kornet.jpg', 'Umum'),
('BRG0020', 'Saus Sambal 135ml', 'Saus sambal pedas', 500000.00, 'Unit', 38, 'saus_sambal.jpg', 'Umum'),
('BRG0021', 'Saus Tomat 135ml', 'Saus tomat murni', 500000.00, 'Unit', 28, 'saus_tomat.jpg', 'Umum'),
('BRG0022', 'Kecap Manis 600ml', 'Kecap manis refill', 1800000.00, 'Unit', 33, 'kecap.jpg', 'Umum'),
('BRG0023', 'Roti Tawar', 'Roti tawar isi 20 slice', 1700000.00, 'Unit', 20, 'roti.jpg', 'Umum'),
('BRG0024', 'Masker Medis 50pcs', 'Masker sekali pakai', 1400000.00, 'Unit', 50, 'masker.jpg', 'Umum'),
('BRG0025', 'Tisu Wajah 200s', 'Tisu facial lembut', 900000.00, 'Unit', 46, 'tisu.jpg', 'Umum'),
('BRG0026', 'Baterai AA 2pcs', 'Baterai alkaline', 800000.00, 'Unit', 60, 'baterai.jpg', 'Umum'),
('BRG0027', 'Lampu LED 9W', 'Lampu hemat energi', 1700000.00, 'Unit', 29, 'lampu.jpg', 'Umum'),
('BRG0028', 'Sabun Cuci Baju Cair', 'Sabun cair 700ml', 2100000.00, 'Unit', 31, 'sabun_baju.jpg', 'Umum'),
('BRG0029', 'Minyak Telon 60ml', 'Minyak telon bayi', 1700000.00, 'Unit', 14, 'telon.jpg', 'Umum'),
('BRG0030', 'Vitamin C Botol', 'Suplemen kesehatan', 2500000.00, 'Unit', 27, 'vitc.jpg', 'Umum'),
('BRG0031', 'Emas 1 (emas)', '1 emas satuan Minang adalah 2,5 gram emas murni2', 5500000.00, 'Unit', 10, NULL, 'Perhiasan');

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

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

CREATE TABLE `kategori` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `nama` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `kategori` (`id`, `nama`, `created_at`, `updated_at`) VALUES
(1, 'Umum', '2025-12-07 19:49:25', '2025-12-07 19:49:25'),
(2, 'Perhiasan', '2025-12-07 19:49:25', '2025-12-07 19:49:25'),
(3, 'tes2', '2025-12-07 19:49:25', '2025-12-07 19:49:25'),
(4, 'Elektronika', '2025-12-07 20:12:33', '2025-12-07 20:12:33'),
(6, 'AUTO_TEST_20251210172011', NULL, NULL),
(7, 'baru', NULL, NULL);

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

--
-- Table structure for table `migration`
--

CREATE TABLE `migration` (
  `version` varchar(180) NOT NULL,
  `apply_time` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `migration`
--

INSERT INTO `migration` (`version`, `apply_time`) VALUES
('m000000_000000_base', 1765382360),
('m251210_120000_convert_barang_id_to_kode_pk', 1765382579),
('m251210_140000_convert_pelanggan_id_to_kode_pk', 1765386340);

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

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

CREATE TABLE `pelanggan` (
  `kode_pelanggan` varchar(50) NOT NULL,
  `nama` varchar(255) NOT NULL,
  `alias` varchar(255) DEFAULT NULL,
  `no_ktp` varchar(50) NOT NULL,
  `no_whatsapp` varchar(50) DEFAULT NULL,
  `no_handphone` varchar(50) DEFAULT NULL,
  `alamat` text DEFAULT NULL,
  `sosial_media` text DEFAULT NULL,
  `referal` text DEFAULT NULL,
  `foto` varchar(255) DEFAULT NULL,
  `foto_ktp` varchar(255) DEFAULT NULL,
  `foto_lainnya` varchar(255) DEFAULT NULL,
  `created_at` datetime DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

INSERT INTO `pelanggan` (`kode_pelanggan`, `nama`, `alias`, `no_ktp`, `no_whatsapp`, `no_handphone`, `alamat`, `sosial_media`, `referal`, `foto`, `foto_ktp`, `foto_lainnya`, `created_at`) VALUES
('PLG-0001', 'rasakan', 'asa', '1234545564676', '081374752157', '867867768678', 'xgxfhgfhghghcgh', NULL, NULL, '6939bf087f1ba.jpeg', 'ktp_6939bf087f3b9.jpg', '6939bf087f5c2.jpeg', '2025-12-11 00:09:42'),
('PLG0001', 'Siti Aminah2', 'Siti', '3275010101010001', '6281234567890', '6281234567890', 'Jl. Merdeka No.1, Jakarta', '{\"facebook\":\"siti.aminah\",\"instagram\":\"siti.aminah\",\"tiktok\":\"sitiaminah\"}', '', 'uploads/pel_1764741723_635.jpg', NULL, NULL, '2025-12-03 12:11:35'),
('PLG0002', 'Budi Santoso', 'Budi', '3275010202020002', '628211234567', '628211234567', 'Jl. Mawar No.5, Bandung', '{\"facebook\":\"budisantoso\",\"instagram\":\"budisantoso\",\"tiktok\":\"budisant\"}', '', NULL, NULL, NULL, '2025-12-03 12:11:35'),
('PLG0003', 'Andi Wijaya', 'Andi', '3275010303030003', '628219876543', '628219876543', 'Jl. Melati 12, Surabaya', '{\"facebook\":\"andi.wijaya\",\"instagram\":\"andi.wijaya\",\"tiktok\":\"andiwij\"}', '', NULL, NULL, NULL, '2025-12-03 12:11:35'),
('PLG0004', 'Rina Lestari', 'Rina', '3275010404040004', '628227001122', '628227001122', 'Komplek Bunga Asri Blok B/3, Medan', '{\"facebook\":\"rinalestari\",\"instagram\":\"rinalest\",\"tiktok\":\"rinalest\"}', '', NULL, NULL, NULL, '2025-12-03 12:11:35'),
('PLG0005', 'Muhammad Faisal', 'Faisal', '3275010505050005', '6281380012345', '6281380012345', 'Perumahan Citra Indah 7, Bekasi', '{\"facebook\":\"m.faisal\",\"instagram\":\"m.faisal\",\"tiktok\":\"mfaisal\"}', '', NULL, NULL, NULL, '2025-12-03 12:11:35'),
('PLG0006', 'Dewi Kusuma', 'Dewi', '3275010606060006', '628151234321', '628151234321', 'Jl. Sudirman 45, Yogyakarta', '{\"facebook\":\"dewikusuma\",\"instagram\":\"dewikusuma\",\"tiktok\":\"dewi_kusuma\"}', '', NULL, NULL, NULL, '2025-12-03 12:11:35'),
('PLG0007', 'Rudi Hartono', 'Rudi', '3275010707070007', '628155667788', '628155667788', 'Jl. Kenanga No.9, Semarang', '{\"facebook\":\"rudi.hartono\",\"instagram\":\"rudi.hartono\",\"tiktok\":\"rudih\"}', '', NULL, NULL, NULL, '2025-12-03 12:11:35'),
('PLG0008', 'Lina Marlina', 'Lina', '3275010808080008', '628122334455', '628122334455', 'Jl. Gajah Mada 10, Palembang', '{\"facebook\":\"lina.marlina\",\"instagram\":\"lina.marlina\",\"tiktok\":\"linamar\"}', '', NULL, NULL, NULL, '2025-12-03 12:11:35'),
('PLG0009', 'Slamet Riyadi', 'Slamet', '3275010909090009', '628198765432', '628198765432', 'Jl. Diponegoro 77, Solo', '{\"facebook\":\"slamet.riyadi\",\"instagram\":\"slamet.riyadi\",\"tiktok\":\"slamet\"}', '', NULL, NULL, NULL, '2025-12-03 12:11:35'),
('PLG0010', 'Maria Christina', 'Maria', '3275011010100010', '628123098456', '628123098456', 'Perum. Permata Hijau Blok C2, Makassar', '{\"facebook\":\"maria.christina\",\"instagram\":\"maria.christina\",\"tiktok\":\"mariax\"}', '', 'uploads/pel_1764740875_275.jpeg', NULL, NULL, '2025-12-03 12:11:35'),
('PLG0011', 'Rahmat Hidayat', 'Dayat', '1376012404880001', '6281374752157', NULL, 'Depan Mushalla Perumnas Balai Nan Duo, Koto Nan Ampek, Payakumbuh Barat', '{\"facebook\":\"aikasayang\",\"instagram\":\"\",\"tiktok\":\"\"}', '', 'uploads/pel_1764741685_901.jpg', 'uploads/pel_ktp_1764742229_680.jpeg', NULL, '2025-12-03 12:54:27');

--
-- Indexes for dumped tables
--

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

--
-- Indexes for table `kategori`
--
ALTER TABLE `kategori`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `kategori_nama_unique` (`nama`);

--
-- Indexes for table `migration`
--
ALTER TABLE `migration`
  ADD PRIMARY KEY (`version`);

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

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `kategori`
--
ALTER TABLE `kategori`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
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 */;
