chore(seed): menambahkan akun mentor dan project mentor
This commit is contained in:
+41
-2
@@ -43,7 +43,7 @@ async function main() {
|
|||||||
role: 'admin',
|
role: 'admin',
|
||||||
signature: `Admin-Two-${Date.now()}`,
|
signature: `Admin-Two-${Date.now()}`,
|
||||||
profile_picture: 'https://placehold.co/150',
|
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({
|
const admin3 = await prisma.admin.create({
|
||||||
@@ -55,7 +55,31 @@ async function main() {
|
|||||||
role: 'admin',
|
role: 'admin',
|
||||||
signature: `Admin-Three-${Date.now()}`,
|
signature: `Admin-Three-${Date.now()}`,
|
||||||
profile_picture: 'https://placehold.co/150',
|
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({
|
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' }
|
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
|
// 11. LamaranMagang
|
||||||
const lamaran1 = await prisma.lamaranMagang.create({
|
const lamaran1 = await prisma.lamaranMagang.create({
|
||||||
@@ -181,6 +211,15 @@ async function main() {
|
|||||||
const task3 = await prisma.task.create({
|
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' }
|
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
|
// 13. User
|
||||||
const user1 = await prisma.user.create({
|
const user1 = await prisma.user.create({
|
||||||
|
|||||||
Reference in New Issue
Block a user