service/dbstruct/RavenIQTest.go

112 lines
3.2 KiB
Go
Raw Normal View History

2024-07-18 19:29:11 +08:00
package dbstruct
type RavenIQTest struct {
Id *int64 `json:"id" bson:"_id"` // 瑞文智商测试表id
2024-07-31 17:04:08 +08:00
UserId *string `json:"user_id" bson:"user_id"` // 用户id
2024-07-18 19:29:11 +08:00
Age *int64 `json:"age" bson:"age"` // 年龄
2024-07-19 17:46:58 +08:00
TotalScore *float64 `json:"total_score" bson:"total_score"` // 总得分
2024-07-19 18:31:15 +08:00
IQBlockId *int64 `json:"IQ_block_id" bson:"IQ_block_id"` // 智商值key
2024-07-25 19:59:35 +08:00
IQ *int64 `json:"IQ" bson:"IQ"` // 智商值
2024-07-18 19:29:11 +08:00
AnswerList []*RavenIQTestAnswer `json:"answer_list" bson:"answer_list"` // 答案list
ClassScoreList []*RavenIQTestClassScore `json:"class_score_list" bson:"class_score_list"` // 大类得分list
Ct *int64 `json:"ct" bson:"ct"` // 创建时间
Ut *int64 `json:"ut" bson:"ut"` // 更新时间
DelFlag *int64 `json:"del_flag" bson:"del_flag"` // 删除标记
}
type RavenIQTestAnswer struct {
QuestionId *int64 `json:"question_id" bson:"question_id"` // 问题Id
SelectedOption *int64 `json:"selected_option" bson:"selected_option"` // 选择的选项
}
type RavenIQTestClassScore struct {
2024-07-25 19:59:35 +08:00
ClassId *int64 `json:"class_id" bson:"class_id"` // 大类id
Score *int64 `json:"score" bson:"score"` // 得分
ClassBlockId *int64 `json:"class_block_id" bson:"class_block_id"` // 大类得分key
ConvertedScore *int64 `json:"converted_score" bson:"converted_score"` // 折算后得分
2024-07-18 19:29:11 +08:00
}
func (p *RavenIQTest) GetId() int64 {
if p == nil || p.Id == nil {
return -1
}
return *p.Id
}
2024-07-31 17:04:08 +08:00
func (p *RavenIQTest) GetUserId() string {
2024-07-18 19:29:11 +08:00
if p == nil || p.UserId == nil {
2024-07-31 17:04:08 +08:00
return ""
2024-07-18 19:29:11 +08:00
}
return *p.UserId
}
func (p *RavenIQTest) GetAge() int64 {
2024-07-24 14:14:26 +08:00
if p == nil || p.Age == nil {
2024-07-18 19:29:11 +08:00
return 0
}
return *p.Age
}
2024-07-19 17:46:58 +08:00
func (p *RavenIQTest) GetTotalScore() float64 {
if p == nil || p.TotalScore == nil {
2024-07-18 19:29:11 +08:00
return 0
}
2024-07-19 17:46:58 +08:00
return *p.TotalScore
2024-07-18 19:29:11 +08:00
}
2024-07-19 18:31:15 +08:00
func (p *RavenIQTest) GetIQBlockId() int64 {
if p == nil || p.IQBlockId == nil {
2024-07-18 19:29:11 +08:00
return 0
}
2024-07-19 18:31:15 +08:00
return *p.IQBlockId
2024-07-18 19:29:11 +08:00
}
2024-07-25 19:59:35 +08:00
func (p *RavenIQTest) GetIQ() int64 {
if p == nil || p.IQ == nil {
return 0
}
return *p.IQ
}
2024-07-19 17:46:58 +08:00
func (p *RavenIQTestAnswer) GetQuestionId() int64 {
if p == nil || p.QuestionId == nil {
return 0
}
return *p.QuestionId
}
func (p *RavenIQTestAnswer) GetSelectedOption() int64 {
if p == nil || p.SelectedOption == nil {
return 0
}
return *p.SelectedOption
}
2024-07-18 19:29:11 +08:00
func (p *RavenIQTestClassScore) GetClassId() int64 {
if p == nil || p.ClassId == nil {
return 0
}
return *p.ClassId
}
func (p *RavenIQTestClassScore) GetScore() int64 {
if p == nil || p.Score == nil {
return 0
}
return *p.Score
}
2024-07-22 09:17:49 +08:00
2024-07-25 19:59:35 +08:00
func (p *RavenIQTestClassScore) GetConvertedScore() int64 {
if p == nil || p.ConvertedScore == nil {
return 0
}
return *p.ConvertedScore
}
2024-07-22 09:17:49 +08:00
func (p *RavenIQTestClassScore) GetClassBlockId() int64 {
if p == nil || p.ClassBlockId == nil {
return 0
}
return *p.ClassBlockId
}