feat(seeder): add seeders for Sosial dashboard APIs
- Add seed_ringkasan_kesehatan.ts (ibuHamil=87, balita=342, stunting=12) - Add seed_beasiswa_config.ts (tahun 2025/2026, dana Rp 1.2M) - Add seed_kegiatan_desa.ts (KategoriKegiatan + KegiatanDesa incl. Budaya) - Add kategori-kegiatan.json + kegiatan-desa.json data files - Update posyandu.json: 1 → 8 posyandu (Mawar, Melati, Dahlia, Anggrek, dll) - Update program-kesehatan.json: add persentase field + 4 stat entries - Update seed_program_kesehatan.ts: include persentase in upsert - Update seed.ts: import + call new seeders Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
22
prisma/_seeder_list/pendidikan/seed_beasiswa_config.ts
Normal file
22
prisma/_seeder_list/pendidikan/seed_beasiswa_config.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import prisma from "@/lib/prisma";
|
||||
|
||||
const SINGLETON_ID = "beasiswa_config_desa_001";
|
||||
|
||||
export async function seedBeasiswaConfig() {
|
||||
console.log("🔄 Seeding Beasiswa Config...");
|
||||
|
||||
await prisma.beasiswaConfig.upsert({
|
||||
where: { id: SINGLETON_ID },
|
||||
update: {
|
||||
tahunAjaran: "2025/2026",
|
||||
danaTersalurkan: BigInt(1200000000),
|
||||
},
|
||||
create: {
|
||||
id: SINGLETON_ID,
|
||||
tahunAjaran: "2025/2026",
|
||||
danaTersalurkan: BigInt(1200000000),
|
||||
},
|
||||
});
|
||||
|
||||
console.log("✅ Beasiswa Config seeded");
|
||||
}
|
||||
Reference in New Issue
Block a user