package domain import dbgen "Yimaru-Backend/gen/db" type QuestionType string const ( MultipleChoice QuestionType = "MULTIPLE_CHOICE" TrueFalse QuestionType = "TRUE_FALSE" ShortAnswer QuestionType = "SHORT_ANSWER" ) type QuestionWithDetails struct { Question dbgen.AssessmentQuestion Options []QuestionOption } type QuestionOption struct { QuestionID int64 `json:"question_id"` OptionText string `json:"option_text"` } type CreateAssessmentQuestionInput struct { Title string Description *string QuestionType QuestionType DifficultyLevel string Points int32 IsActive bool // Multiple Choice only Options []CreateQuestionOptionInput // Short Answer only CorrectAnswer *string } type CreateQuestionOptionInput struct { Text string Order int32 IsCorrect bool } // type AssessmentQuestion struct { // ID int64 // QuestionText string // Type QuestionType // Options []string // CorrectAnswer string // } // type AssessmentOption struct { // ID int64 // OptionText string // IsCorrect bool // } // type AttemptAnswer struct { // QuestionID int64 // Answer string // IsCorrect *bool // } // type AssessmentAttempt struct { // ID int64 // UserID int64 // Answers []AttemptAnswer // Score int // Completed bool // }