File size: 1,426 Bytes
e56783d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4a9d886
e56783d
 
 
 
7ce61af
6ba468f
 
 
 
7ce61af
6ba468f
 
 
76a3612
 
 
 
 
5d3ad03
71a0a2c
 
 
 
 
 
 
 
 
759b5de
71a0a2c
2d345d7
759b5de
 
 
 
 
 
 
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package models

type SuccessResponse struct {
	Status   string `json:"status"`
	Message  string `json:"message"`
	Data     any    `json:"data"`
	MetaData any    `json:"meta_data"`
}

type ErrorResponse struct {
	Status   string    `json:"status"`
	Message  string    `json:"message"`
	Errors   Exception `json:"errors"`
	MetaData any       `json:"meta_data"`
}

type AuthenticatedUser struct {
	Account Account `json:"account"`
	Token   string  `json:"token"`
}

type Options struct {
	OptionCategory OptionCategory `json:"option_category"`
	OptionValues   []OptionValues `json:"option_values"`
}

type OptionsResponse struct {
	Options []Options `json:"options"`
}

type UserProfileResponse struct {
	Account Account        `json:"account"`
	Details AccountDetails `json:"details"`
}

type AttemptExamResponse struct {
	Exam      Quiz       `json:"exam"`
	Questions []Question `json:"questions"`
}

type QuestionResponse struct {
	Question   Question `json:"question"`
	Answer     []Answer `json:"answer_options"`
	UserAnswer int      `json:"current_user_answer"`
	IsDoubt    bool     `json:"is_doubt"`
}

type OnExamUserAnswerResponse struct {
	ID             uint `gorm:"primaryKey" json:"id"`
	QuizAttemptID  uint `json:"quiz_attempt_id"`
	QuestionID     uint `json:"question_id"`
	SelectedAnswer uint `json:"selected_answer"`
	IsDoubt        bool `json:"is_doubt"`
}