feat: add is_recommended to Course and allow_multiple_attempts to Quiz

- Add is_recommended field to Course model (default: false)
- Add allow_multiple_attempts field to Quiz model (default: true)
- Create migration: add_recommended_and_quiz_attempts
This commit is contained in:
JakkrapartXD 2026-02-11 13:03:40 +07:00
parent 0afbd3f08b
commit 623f797763

View file

@ -137,6 +137,7 @@ model Course {
price Decimal @default(0) @db.Decimal(10, 2) price Decimal @default(0) @db.Decimal(10, 2)
is_free Boolean @default(false) is_free Boolean @default(false)
have_certificate Boolean @default(false) have_certificate Boolean @default(false)
is_recommended Boolean @default(false)
status CourseStatus @default(DRAFT) status CourseStatus @default(DRAFT)
approved_by Int? approved_by Int?
approved_at DateTime? approved_at DateTime?
@ -304,6 +305,7 @@ model Quiz {
shuffle_choices Boolean @default(false) shuffle_choices Boolean @default(false)
show_answers_after_completion Boolean @default(true) show_answers_after_completion Boolean @default(true)
is_skippable Boolean @default(true) is_skippable Boolean @default(true)
allow_multiple_attempts Boolean @default(true)
created_at DateTime @default(now()) created_at DateTime @default(now())
created_by Int created_by Int
updated_at DateTime? @updatedAt updated_at DateTime? @updatedAt