-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodels.go
More file actions
35 lines (31 loc) · 1.41 KB
/
models.go
File metadata and controls
35 lines (31 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package models
import (
"encoding/json"
"time"
)
type AssessmentTemplate struct {
ID int64 `json:"id" db:"id"`
Title string `json:"title" db:"title"`
Description *string `json:"description,omitempty" db:"description"`
DurationMinutes int `json:"durationMinutes" db:"duration_minutes"`
CreatedAt time.Time `json:"createdAt" db:"created_at"`
UpdatedAt time.Time `json:"updatedAt" db:"updated_at"`
}
type Question struct {
ID int64 `json:"id" db:"id"`
AssessmentTemplateID int64 `json:"assessmentTemplateId" db:"assessment_template_id"`
Type string `json:"type" db:"type"`
Prompt string `json:"prompt" db:"prompt"`
Options *json.RawMessage `json:"options,omitempty" db:"options"`
CorrectAnswer *json.RawMessage `json:"correctAnswer,omitempty" db:"correct_answer"`
Score int `json:"score" db:"score"`
Language *string `json:"language,omitempty" db:"language"`
}
type TestCase struct {
ID int64 `json:"id" db:"id"`
QuestionID int64 `json:"questionId" db:"question_id"`
Input string `json:"input" db:"input"`
ExpectedOutput string `json:"expectedOutput" db:"expected_output"`
IsHidden bool `json:"isHidden" db:"is_hidden"`
Score int `json:"score" db:"score"`
}