From 0224cd294dace5f69f071dba3639909dd6f66657 Mon Sep 17 00:00:00 2001 From: Muhammad Zhafran Ilham Date: Wed, 24 Jun 2026 00:13:20 +0700 Subject: [PATCH] chore(seed): menambahkan akun mentor dan project mentor --- prisma/seed.js | 43 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/prisma/seed.js b/prisma/seed.js index 4640562..a03fb00 100644 --- a/prisma/seed.js +++ b/prisma/seed.js @@ -43,7 +43,7 @@ async function main() { role: 'admin', signature: `Admin-Two-${Date.now()}`, profile_picture: 'https://placehold.co/150', - professional_bio: 'Lead Engineering Mentor at Internify.' + professional_bio: 'Lead Engineering Admin at Internify.' } }); const admin3 = await prisma.admin.create({ @@ -55,7 +55,31 @@ async function main() { role: 'admin', signature: `Admin-Three-${Date.now()}`, profile_picture: 'https://placehold.co/150', - professional_bio: 'Design Mentor at Internify.' + professional_bio: 'Design Admin at Internify.' + } + }); + const mentor1 = await prisma.admin.create({ + data: { + nama_depan: 'Mentor', + nama_belakang: 'One', + email: 'mentor1@internify.com', + password: hashedPassword, + role: 'mentor', + signature: `Mentor-One-${Date.now()}`, + profile_picture: 'https://placehold.co/150', + professional_bio: 'Backend Mentor focused on API design, project review, and task evaluation.' + } + }); + const mentor2 = await prisma.admin.create({ + data: { + nama_depan: 'Mentor', + nama_belakang: 'Two', + email: 'mentor2@internify.com', + password: hashedPassword, + role: 'mentor', + signature: `Mentor-Two-${Date.now()}`, + profile_picture: 'https://placehold.co/150', + professional_bio: 'Product and UI/UX Mentor focused on design review and intern guidance.' } }); @@ -159,6 +183,12 @@ async function main() { const proj3 = await prisma.project.create({ data: { id_admin: admin1.id, project_icon: 'chart', project_name: 'Recruitment Analytics Dashboard', slug: slugify('Recruitment Analytics Dashboard', 'Project 3 slug'), description: 'Developing analytical charts for recruitment metrics.', start_date: new Date('2026-07-15'), end_date: new Date('2026-10-15'), status: 'active' } }); + const proj4 = await prisma.project.create({ + data: { id_admin: admin1.id, project_icon: 'gear', project_name: 'Mentor Backend Task Management Project', slug: slugify('Mentor Backend Project', 'Project 4 slug'), description: 'Project owned by mentor for backend project and task management.', start_date: new Date('2026-07-20'), end_date: new Date('2026-10-15'), status: 'active' } + }); + const proj5 = await prisma.project.create({ + data: { id_admin: admin1.id, project_icon: 'clipboard', project_name: 'Mentor UI UX Evaluation Project', slug: slugify('Mentor UI UX Evaluation Project', 'Project 5 slug'), description: 'Project owned by mentor for testing UI/UX mentoring workflow.', start_date: new Date('2026-07-18'), end_date: new Date('2026-10-15'), status: 'active' } + }); // 11. LamaranMagang const lamaran1 = await prisma.lamaranMagang.create({ @@ -181,6 +211,15 @@ async function main() { const task3 = await prisma.task.create({ data: { id_project: proj2.id, title: 'Implement JWT Validation', slug: slugify('Implement JWT Validation', 'Task 3 slug'), description: 'Setup middleware and keys for JWT validation.', deadline_at: new Date('2026-08-10'), submission_type: 'url_link' } }); + const task4 = await prisma.task.create({ + data: { id_project: proj4.id, slug: slugify('Review REST API Structure', 'task'), title: 'Review REST API Structure', description: 'Review endpoint structure, response format, and service-repository separation.', deadline_at: new Date('2026-08-20'), submission_type: 'url_link' } + }); + const task5 = await prisma.task.create({ + data: { id_project: proj4.id, slug: slugify('Prepare Backend Progress Report', 'task'), title: 'Prepare Backend Progress Report', description: 'Prepare a short report about implemented backend features and blockers.', deadline_at: new Date('2026-08-25'), submission_type: 'file_upload'} + }); + const task6 =await prisma.task.create({ + data: { id_project: proj5.id, slug: slugify('Create UI Review Notes', 'task'), title: 'Create UI Review Notes', description: 'Create UI/UX review notes for dashboard, project detail, and task submission pages.', deadline_at: new Date('2026-08-22'), submission_type: 'file_upload' } + }); // 13. User const user1 = await prisma.user.create({