From 996041d1dda42e8bd63c1bbc9c327b1f84b47225 Mon Sep 17 00:00:00 2001 From: Daeng Deni Mardaeni Date: Sat, 26 Apr 2025 19:38:12 +0700 Subject: [PATCH] feat(holiday_calendar): tambahkan seeder untuk data kalender libur - Menambahkan seeder untuk mengisi tabel holiday_calendars dengan data libur nasional dan cuti bersama tahun 2025. - Setiap entri mencakup tanggal, deskripsi, jenis libur, serta timestamp untuk created_at dan updated_at. --- database/seeders/HolidayCalendarSeeder.php | 216 +++++++++++++++++++++ 1 file changed, 216 insertions(+) create mode 100644 database/seeders/HolidayCalendarSeeder.php diff --git a/database/seeders/HolidayCalendarSeeder.php b/database/seeders/HolidayCalendarSeeder.php new file mode 100644 index 0000000..d6a19ad --- /dev/null +++ b/database/seeders/HolidayCalendarSeeder.php @@ -0,0 +1,216 @@ + '2025-01-01', + 'description' => 'Tahun Baru 2025 Masehi', + 'type' => 'national_holiday', + 'created_at' => $now, + 'updated_at' => $now + ], + [ + 'date' => '2025-01-27', + 'description' => 'Isra Miraj Nabi Muhammad SAW', + 'type' => 'national_holiday', + 'created_at' => $now, + 'updated_at' => $now + ], + [ + 'date' => '2025-01-29', + 'description' => 'Tahun Baru Imlek 2576 Kongzili', + 'type' => 'national_holiday', + 'created_at' => $now, + 'updated_at' => $now + ], + [ + 'date' => '2025-03-29', + 'description' => 'Hari Suci Nyepi (Tahun Baru Saka 1947)', + 'type' => 'national_holiday', + 'created_at' => $now, + 'updated_at' => $now + ], + [ + 'date' => '2025-03-31', + 'description' => 'Idul Fitri 1446 Hijriah', + 'type' => 'national_holiday', + 'created_at' => $now, + 'updated_at' => $now + ], + [ + 'date' => '2025-04-01', + 'description' => 'Idul Fitri 1446 Hijriah', + 'type' => 'national_holiday', + 'created_at' => $now, + 'updated_at' => $now + ], + [ + 'date' => '2025-04-18', + 'description' => 'Wafat Yesus Kristus', + 'type' => 'national_holiday', + 'created_at' => $now, + 'updated_at' => $now + ], + [ + 'date' => '2025-04-20', + 'description' => 'Kebangkitan Yesus Kristus (Paskah)', + 'type' => 'national_holiday', + 'created_at' => $now, + 'updated_at' => $now + ], + [ + 'date' => '2025-05-01', + 'description' => 'Hari Buruh Internasional', + 'type' => 'national_holiday', + 'created_at' => $now, + 'updated_at' => $now + ], + [ + 'date' => '2025-05-12', + 'description' => 'Hari Raya Waisak 2569 BE', + 'type' => 'national_holiday', + 'created_at' => $now, + 'updated_at' => $now + ], + [ + 'date' => '2025-05-29', + 'description' => 'Kenaikan Yesus Kristus', + 'type' => 'national_holiday', + 'created_at' => $now, + 'updated_at' => $now + ], + [ + 'date' => '2025-06-01', + 'description' => 'Hari Lahir Pancasila', + 'type' => 'national_holiday', + 'created_at' => $now, + 'updated_at' => $now + ], + [ + 'date' => '2025-06-06', + 'description' => 'Idul Adha 1446 Hijriah', + 'type' => 'national_holiday', + 'created_at' => $now, + 'updated_at' => $now + ], + [ + 'date' => '2025-06-27', + 'description' => '1 Muharam Tahun Baru Islam 1447 Hijriah', + 'type' => 'national_holiday', + 'created_at' => $now, + 'updated_at' => $now + ], + [ + 'date' => '2025-08-17', + 'description' => 'Proklamasi Kemerdekaan', + 'type' => 'national_holiday', + 'created_at' => $now, + 'updated_at' => $now + ], + [ + 'date' => '2025-09-05', + 'description' => 'Maulid Nabi Muhammad SAW', + 'type' => 'national_holiday', + 'created_at' => $now, + 'updated_at' => $now + ], + [ + 'date' => '2025-12-25', + 'description' => 'Kelahiran Yesus Kristus', + 'type' => 'national_holiday', + 'created_at' => $now, + 'updated_at' => $now + ], + + // Cuti Bersama 2025 + [ + 'date' => '2025-01-28', + 'description' => 'Cuti Bersama Tahun Baru Imlek 2576 Kongzili', + 'type' => 'collective_leave', + 'created_at' => $now, + 'updated_at' => $now + ], + [ + 'date' => '2025-03-28', + 'description' => 'Cuti Bersama Hari Suci Nyepi (Tahun Baru Saka 1947)', + 'type' => 'collective_leave', + 'created_at' => $now, + 'updated_at' => $now + ], + [ + 'date' => '2025-04-02', + 'description' => 'Cuti Bersama Idul Fitri', + 'type' => 'collective_leave', + 'created_at' => $now, + 'updated_at' => $now + ], + [ + 'date' => '2025-04-03', + 'description' => 'Cuti Bersama Idul Fitri', + 'type' => 'collective_leave', + 'created_at' => $now, + 'updated_at' => $now + ], + [ + 'date' => '2025-04-04', + 'description' => 'Cuti Bersama Idul Fitri', + 'type' => 'collective_leave', + 'created_at' => $now, + 'updated_at' => $now + ], + [ + 'date' => '2025-04-07', + 'description' => 'Cuti Bersama Idul Fitri', + 'type' => 'collective_leave', + 'created_at' => $now, + 'updated_at' => $now + ], + [ + 'date' => '2025-05-13', + 'description' => 'Cuti Bersama Hari Raya Waisak 2569 BE', + 'type' => 'collective_leave', + 'created_at' => $now, + 'updated_at' => $now + ], + [ + 'date' => '2025-05-30', + 'description' => 'Cuti Bersama Kenaikan Yesus Kristus', + 'type' => 'collective_leave', + 'created_at' => $now, + 'updated_at' => $now + ], + [ + 'date' => '2025-06-09', + 'description' => 'Cuti Bersama Idul Adha 1446 Hijriah', + 'type' => 'collective_leave', + 'created_at' => $now, + 'updated_at' => $now + ], + [ + 'date' => '2025-12-26', + 'description' => 'Cuti Bersama Kelahiran Yesus Kristus', + 'type' => 'collective_leave', + 'created_at' => $now, + 'updated_at' => $now + ], + ]; + + DB::table('holiday_calendars')->insert($holidays); + } + }