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

START TRANSACTION;



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

--
-- Table structure for table `biodata`
--

CREATE TABLE `biodata` (
  `id` int(10) UNSIGNED NOT NULL,
  `full_name` varchar(150) NOT NULL,
  `headline` varchar(150) NOT NULL,
  `summary` text DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `phone` varchar(50) DEFAULT NULL,
  `email` varchar(120) DEFAULT NULL,
  `skills` text DEFAULT NULL,
  `photo_path` varchar(255) DEFAULT NULL,
  `created_at` datetime DEFAULT current_timestamp(),
  `updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `biodata`
--

INSERT INTO `biodata` (`id`, `full_name`, `headline`, `summary`, `address`, `phone`, `email`, `skills`, `photo_path`, `created_at`, `updated_at`) VALUES
(1, 'Dimas Cahya Ramadhan', 'Full-Stack Web Developer | Sistem Informasi', 'Mahasiswa Sistem Informasi yang fokus membangun aplikasi web berbasis PHP/CodeIgniter 4. Berpengalaman membuat autentikasi, CRUD portofolio, serta integrasi API dan kolaborasi tim.', 'Malang, Jawa Timur', '0812-3456-7890', 'dimas.cahya@example.com', 'PHP, CodeIgniter 4, MySQL, REST API, JavaScript, Bootstrap, Git', NULL, '2025-12-16 16:13:07', NULL);

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

--
-- Table structure for table `daily_activities`
--

CREATE TABLE `daily_activities` (
  `id` int(10) UNSIGNED NOT NULL,
  `activity_date` date NOT NULL,
  `activity_time` time DEFAULT NULL,
  `title` varchar(200) NOT NULL,
  `description` text DEFAULT NULL,
  `location` varchar(150) DEFAULT NULL,
  `media_type` enum('image','video','none') NOT NULL DEFAULT 'none',
  `media_path` varchar(255) DEFAULT NULL,
  `created_at` datetime DEFAULT current_timestamp(),
  `updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `daily_activities`
--

INSERT INTO `daily_activities` (`id`, `activity_date`, `activity_time`, `title`, `description`, `location`, `media_type`, `media_path`, `created_at`, `updated_at`) VALUES
(1, '2025-12-14', '08:00:00', 'Rapat kickoff proyek akhir', 'Menyepakati scope tugas individu dan alur kerja harian.', 'Ruang rapat A', 'image', NULL, '2025-12-16 16:13:07', NULL),
(2, '2025-12-15', '10:30:00', 'Implementasi modul autentikasi', 'Menyelesaikan login admin dan proteksi route.', 'Laboratorium SI', 'none', NULL, '2025-12-16 16:13:07', NULL),
(3, '2025-12-16', '14:00:00', 'Membangun CRUD aktivitas harian', 'Mendesain tabel, validasi, serta upload foto atau video.', 'Perpustakaan', 'image', NULL, '2025-12-16 16:13:07', NULL),
(4, '2025-12-11', '19:00:00', 'Rekam demo LMS SIAma', 'Menyiapkan rekaman presentasi berdurasi 5 menit.', 'Rumah', 'video', NULL, '2025-12-16 16:13:07', NULL),
(5, '2025-12-13', '16:00:00', 'Uji coba upload dokumen', 'Memastikan validasi file dan penyimpanan berjalan aman.', 'Laboratorium SI', 'image', NULL, '2025-12-16 16:13:07', NULL),
(6, '2025-12-12', '11:30:00', 'Review kode modul pendidikan', 'Code review untuk konsistensi style dan keamanan input.', 'Perpustakaan', 'none', NULL, '2025-12-16 16:13:07', NULL),
(7, '2025-12-10', '09:15:00', 'Sinkronisasi API berita', 'Integrasi endpoint berita dan penanganan error fallback.', 'Ruang rapat B', 'image', NULL, '2025-12-16 16:13:07', NULL),
(8, '2025-12-09', '15:45:00', 'Analisis performa query', 'Profiling query berat dan menambahkan indeks yang diperlukan.', 'Laboratorium SI', 'none', NULL, '2025-12-16 16:13:07', NULL),
(9, '2025-12-08', '13:20:00', 'Rapat kebutuhan fitur baru', 'Mengumpulkan requirement untuk fitur pengelolaan portfolio.', 'Ruang rapat A', 'none', NULL, '2025-12-16 16:13:07', NULL),
(10, '2025-12-07', '10:00:00', 'Desain ulang layout dashboard', 'Menyusun sketsa UX dan tema warna untuk panel admin.', 'Perpustakaan', 'image', NULL, '2025-12-16 16:13:07', NULL);

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

--
-- Table structure for table `education_histories`
--

CREATE TABLE `education_histories` (
  `id` int(10) UNSIGNED NOT NULL,
  `institution` varchar(150) NOT NULL,
  `degree` enum('SD','SMP','SMA/SMK','Diploma','Sarjana','Magister','Doktor','Lainnya') NOT NULL DEFAULT 'Sarjana',
  `field_of_study` varchar(150) DEFAULT NULL,
  `city` varchar(100) DEFAULT NULL,
  `start_year` int(4) UNSIGNED NOT NULL,
  `end_year` int(4) UNSIGNED DEFAULT NULL,
  `description` text DEFAULT NULL,
  `created_at` datetime DEFAULT current_timestamp(),
  `updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `education_histories`
--

INSERT INTO `education_histories` (`id`, `institution`, `degree`, `field_of_study`, `city`, `start_year`, `end_year`, `description`, `created_at`, `updated_at`) VALUES
(1, 'SMAN 12 Kabupaten Tangerang', 'SMA/SMK', 'IPA', 'Kabupaten Tangerang', 2018, 2021, NULL, '2025-12-16 16:13:07', NULL),
(2, 'SMPN 1 Teluknaga', 'SMP', 'Umum', 'Teluknaga', 2015, 2018, NULL, '2025-12-16 16:13:07', NULL),
(3, 'SDN 5 Bojong Renged', 'SD', 'Umum', 'Bojong Renged', 2009, 2015, NULL, '2025-12-16 16:13:07', NULL);

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

--
-- Table structure for table `migrations`
--

CREATE TABLE `migrations` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `version` varchar(255) NOT NULL,
  `class` varchar(255) NOT NULL,
  `group` varchar(255) NOT NULL,
  `namespace` varchar(255) NOT NULL,
  `time` int(11) NOT NULL,
  `batch` int(11) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `migrations`
--

INSERT INTO `migrations` (`id`, `version`, `class`, `group`, `namespace`, `time`, `batch`) VALUES
(1, '2025-10-27-134557', 'App\\Database\\Migrations\\News', 'default', 'App', 1765876381, 1),
(2, '2025-10-27-151055', 'App\\Database\\Migrations\\AlterNews', 'default', 'App', 1765876381, 1),
(3, '2025-11-21-000001', 'App\\Database\\Migrations\\CreateAdmins', 'default', 'App', 1765876381, 1),
(4, '2025-11-27-000001', 'App\\Database\\Migrations\\CreatePegawai', 'default', 'App', 1765876381, 1),
(5, '2025-11-29-160000', 'App\\Database\\Migrations\\AddUpdatedAtToNews', 'default', 'App', 1765876381, 1),
(6, '2025-12-15-120000', 'App\\Database\\Migrations\\CreateDailyActivities', 'default', 'App', 1765876381, 1),
(7, '2025-12-15-120100', 'App\\Database\\Migrations\\CreateBiodata', 'default', 'App', 1765876381, 1),
(8, '2025-12-15-120200', 'App\\Database\\Migrations\\CreateEducationHistories', 'default', 'App', 1765876381, 1);

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

--
-- Table structure for table `news`
--

CREATE TABLE `news` (
  `id` int(5) UNSIGNED NOT NULL,
  `title` varchar(255) NOT NULL,
  `author` varchar(100) NOT NULL DEFAULT 'John Doe',
  `content` text DEFAULT NULL,
  `image_path` varchar(255) DEFAULT NULL,
  `status` enum('published','draft') NOT NULL DEFAULT 'draft',
  `created_at` datetime DEFAULT current_timestamp(),
  `slug` varchar(100) DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `news`
--

INSERT INTO `news` (`id`, `title`, `author`, `content`, `image_path`, `status`, `created_at`, `slug`, `updated_at`) VALUES
(1, 'Selamat datang di Codeigniter', 'John Doe', 'Pengenalan Codeigniter untuk Pemula.', NULL, 'draft', '2025-12-16 16:13:07', 'codeigniter-intro', NULL),
(2, 'Hello World', 'John Doe', 'Hello World, ini contoh artikel', NULL, 'draft', '2025-12-16 16:13:07', 'hello-world', NULL),
(3, 'Meetup komunitas Codeigniter Indonesia', 'John Doe', 'Seru sekali meetup perdana komunitas codeigniter..', NULL, 'draft', '2025-12-16 16:13:07', 'codeigniter-meetup', NULL);

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

--
-- Table structure for table `pegawai`
--

CREATE TABLE `pegawai` (
  `id_pegawai` int(10) UNSIGNED NOT NULL,
  `nama_pegawai` varchar(150) NOT NULL,
  `tanggal_lahir` date DEFAULT NULL,
  `jenis_kelamin` enum('laki-laki','perempuan') NOT NULL DEFAULT 'laki-laki',
  `divisi` enum('Direktur Utama','IT','Produksi','Marketing','HR') NOT NULL DEFAULT 'IT',
  `foto_pegawai` varchar(255) DEFAULT NULL,
  `created_at` datetime DEFAULT current_timestamp(),
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Indexes for table `biodata`
--
ALTER TABLE `biodata`
  ADD PRIMARY KEY (`id`),
  ADD KEY `full_name` (`full_name`);

--
-- Indexes for table `daily_activities`
--
ALTER TABLE `daily_activities`
  ADD PRIMARY KEY (`id`),
  ADD KEY `activity_date` (`activity_date`);

--
-- Indexes for table `education_histories`
--
ALTER TABLE `education_histories`
  ADD PRIMARY KEY (`id`),
  ADD KEY `degree` (`degree`),
  ADD KEY `start_year` (`start_year`);

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

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

--
-- Indexes for table `pegawai`
--
ALTER TABLE `pegawai`
  ADD PRIMARY KEY (`id_pegawai`);

--
-- AUTO_INCREMENT for table `biodata`
--
ALTER TABLE `biodata`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `daily_activities`
--
ALTER TABLE `daily_activities`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT for table `education_histories`
--
ALTER TABLE `education_histories`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `migrations`
--
ALTER TABLE `migrations`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `news`
--
ALTER TABLE `news`
  MODIFY `id` int(5) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `pegawai`
--
ALTER TABLE `pegawai`
  MODIFY `id_pegawai` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
COMMIT;

