fix(dev): bind frontend to 127.0.0.1:8080 and avoid EACCES\nfix(backend): bind server to 127.0.0.1:8081, add permissive CORS whitelist\nfix(auth): login form UX remove default username, clarify placeholder, add test account autofill\nchore(api): set frontend API_BASE_URL to 127.0.0.1:8081\nrefactor(assignments): lifecycle/state logic and archive endpoint\nfeat(analytics): add exam stats endpoint and client method\nchore(lint): add eslint configs
This commit is contained in:
@@ -328,9 +328,11 @@ model Exam {
|
||||
id String @id @default(uuid()) @db.VarChar(36)
|
||||
subjectId String @map("subject_id") @db.VarChar(36)
|
||||
title String @db.VarChar(200)
|
||||
examType String @default("Uncategorized") @map("exam_type") @db.VarChar(50) // e.g. Midterm, Final, Unit, Weekly
|
||||
totalScore Decimal @map("total_score") @default(0) @db.Decimal(5, 1)
|
||||
suggestedDuration Int @map("suggested_duration")
|
||||
status ExamStatus @default(Draft)
|
||||
description String? @db.Text
|
||||
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
createdBy String @map("created_by") @db.VarChar(36)
|
||||
@@ -402,7 +404,8 @@ model Assignment {
|
||||
endTime DateTime @map("end_time")
|
||||
allowLateSubmission Boolean @map("allow_late_submission") @default(false)
|
||||
autoScoreEnabled Boolean @map("auto_score_enabled") @default(true)
|
||||
|
||||
status AssignmentStatus @default(Active)
|
||||
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
createdBy String @map("created_by") @db.VarChar(36)
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
@@ -425,6 +428,7 @@ model StudentSubmission {
|
||||
assignmentId String @map("assignment_id") @db.VarChar(36)
|
||||
studentId String @map("student_id") @db.VarChar(36)
|
||||
submissionStatus SubmissionStatus @map("submission_status") @default(Pending)
|
||||
startedAt DateTime? @map("started_at")
|
||||
submitTime DateTime? @map("submit_time")
|
||||
timeSpentSeconds Int? @map("time_spent_seconds")
|
||||
totalScore Decimal? @map("total_score") @db.Decimal(5, 1)
|
||||
@@ -478,6 +482,11 @@ enum SubmissionStatus {
|
||||
Graded
|
||||
}
|
||||
|
||||
enum AssignmentStatus {
|
||||
Active
|
||||
Archived
|
||||
}
|
||||
|
||||
enum JudgementResult {
|
||||
Correct
|
||||
Incorrect
|
||||
|
||||
Reference in New Issue
Block a user