diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 572c42f..7b1a5a0 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -48,6 +48,7 @@ model SpecialCourse { endTime String workday String price Int + type String @@id([businessId, courseId]) } diff --git a/src/course/special-course.service.ts b/src/course/special-course.service.ts index ebd224b..7396aa9 100644 --- a/src/course/special-course.service.ts +++ b/src/course/special-course.service.ts @@ -76,6 +76,18 @@ export class SpecialCourseService { } }); + const allTypes = [ + '지체', + '시각', + '청각/언어', + '지적/자폐', + '뇌병변', + '기타', + ] as const; + + const disableType = + allTypes[Math.floor(Math.random() * allTypes.length)]!; + courses.push({ businessId: item.busi_reg_no, courseId: item.course_num, @@ -85,6 +97,7 @@ export class SpecialCourseService { endTime: item.end_time, workday: workday.join(','), price: Number(item.settl_amt), + type: disableType, }); }