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

START TRANSACTION;



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

--
-- Table structure for table `fasilitas`
--

CREATE TABLE `fasilitas` (
  `id_fasilitas` int(11) NOT NULL,
  `judul` varchar(100) DEFAULT NULL,
  `deskripsi` text DEFAULT NULL,
  `gambar` varchar(255) DEFAULT NULL,
  `tgl_upload` datetime DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `fasilitas`
--

INSERT INTO `fasilitas` (`id_fasilitas`, `judul`, `deskripsi`, `gambar`, `tgl_upload`) VALUES
(2, 'Aplikasi Keuangan', 'Bisa membantu kamu mencari rekening Bank', 'WhatsApp Image 2026-02-02 at 10.08.17 AM.jpeg', '2026-02-02 22:18:35');

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

--
-- Table structure for table `log_aktivitas`
--

CREATE TABLE `log_aktivitas` (
  `id_log` int(11) NOT NULL,
  `pelaku` varchar(100) DEFAULT NULL,
  `aktivitas` text NOT NULL,
  `waktu` datetime DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `pendaftar_mandiri`
--

CREATE TABLE `pendaftar_mandiri` (
  `id` int(11) NOT NULL,
  `nama_siswa` varchar(100) NOT NULL,
  `no_wa` varchar(20) NOT NULL,
  `tgl_input` datetime DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `pengaturan`
--

CREATE TABLE `pengaturan` (
  `id` int(11) NOT NULL,
  `kunci` varchar(50) DEFAULT NULL,
  `isi` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `pengaturan`
--

INSERT INTO `pengaturan` (`id`, `kunci`, `isi`) VALUES
(1, 'term_condition', '1. Mitra wajib memberikan data yang valid.\n2. Insentif cair setelah mahasiswa lunas registrasi.\n3. Dilarang melakukan spam.');

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

--
-- Table structure for table `promo`
--

CREATE TABLE `promo` (
  `id_promo` int(11) NOT NULL,
  `judul_promo` varchar(100) DEFAULT NULL,
  `isi_promo` text DEFAULT NULL,
  `gambar` varchar(255) DEFAULT NULL,
  `tgl_upload` datetime DEFAULT current_timestamp(),
  `status_promo` enum('Aktif','Arsip') DEFAULT 'Aktif'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `promo`
--

INSERT INTO `promo` (`id_promo`, `judul_promo`, `isi_promo`, `gambar`, `tgl_upload`, `status_promo`) VALUES
(1, 'Aplikasi Keuangan', 'Bisa membantu mencari rekening bank dengan mudah ', 'WhatsApp Image 2026-02-02 at 10.08.16 AM (1).jpeg', '2026-02-02 22:19:03', 'Aktif');

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

--
-- Table structure for table `siswa_leads`
--

CREATE TABLE `siswa_leads` (
  `id_siswa` int(11) NOT NULL,
  `id_mitra` int(11) NOT NULL,
  `nama_siswa` varchar(100) NOT NULL,
  `no_wa_siswa` varchar(20) NOT NULL,
  `nama_ortu` varchar(100) DEFAULT NULL,
  `status_ortu` varchar(50) DEFAULT NULL,
  `no_wa_ortu` varchar(20) DEFAULT NULL,
  `jalur_pendaftaran` varchar(50) DEFAULT NULL,
  `jurusan` varchar(50) DEFAULT NULL,
  `tahun_ajaran` varchar(10) DEFAULT NULL,
  `status` enum('Menunggu Konfirmasi','Follow Up','Pending','Closing','Terminated') DEFAULT 'Menunggu Konfirmasi',
  `pic_agent` varchar(100) DEFAULT NULL,
  `tgl_input` datetime DEFAULT current_timestamp(),
  `tgl_closing` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `siswa_leads`
--

INSERT INTO `siswa_leads` (`id_siswa`, `id_mitra`, `nama_siswa`, `no_wa_siswa`, `nama_ortu`, `status_ortu`, `no_wa_ortu`, `jalur_pendaftaran`, `jurusan`, `tahun_ajaran`, `status`, `pic_agent`, `tgl_input`, `tgl_closing`) VALUES
(1, 1, 'Siswa Test 1', '081111111', '', '', '', 'Hybrid', 'Teknik Informatika', '2026/2027', 'Closing', 'Agent Budi', '2026-02-01 00:41:26', '2026-02-01 00:47:07');

--
-- Indexes for table `fasilitas`
--
ALTER TABLE `fasilitas`
  ADD PRIMARY KEY (`id_fasilitas`);

--
-- Indexes for table `log_aktivitas`
--
ALTER TABLE `log_aktivitas`
  ADD PRIMARY KEY (`id_log`);

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

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

--
-- Indexes for table `promo`
--
ALTER TABLE `promo`
  ADD PRIMARY KEY (`id_promo`);

--
-- Indexes for table `siswa_leads`
--
ALTER TABLE `siswa_leads`
  ADD PRIMARY KEY (`id_siswa`),
  ADD KEY `id_mitra` (`id_mitra`);

--
-- AUTO_INCREMENT for table `fasilitas`
--
ALTER TABLE `fasilitas`
  MODIFY `id_fasilitas` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `log_aktivitas`
--
ALTER TABLE `log_aktivitas`
  MODIFY `id_log` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `pendaftar_mandiri`
--
ALTER TABLE `pendaftar_mandiri`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

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

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

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

--
-- Constraints for dumped tables
--

--
-- Constraints for table `siswa_leads`
--
ALTER TABLE `siswa_leads`
  ADD CONSTRAINT `siswa_leads_ibfk_1` FOREIGN KEY (`id_mitra`) REFERENCES `mitra` (`id_mitra`) ON DELETE CASCADE;
COMMIT;

