112 lines
3.2 KiB
Go
112 lines
3.2 KiB
Go
package dbstruct
|
|
|
|
type RavenIQTest struct {
|
|
Id *int64 `json:"id" bson:"_id"` // 瑞文智商测试表id
|
|
UserId *int64 `json:"user_id" bson:"user_id"` // 用户id
|
|
Age *int64 `json:"age" bson:"age"` // 年龄
|
|
TotalScore *float64 `json:"total_score" bson:"total_score"` // 总得分
|
|
IQBlockId *int64 `json:"IQ_block_id" bson:"IQ_block_id"` // 智商值key
|
|
IQ *int64 `json:"IQ" bson:"IQ"` // 智商值
|
|
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 {
|
|
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"` // 折算后得分
|
|
}
|
|
|
|
func (p *RavenIQTest) GetId() int64 {
|
|
if p == nil || p.Id == nil {
|
|
return -1
|
|
}
|
|
return *p.Id
|
|
}
|
|
|
|
func (p *RavenIQTest) GetUserId() int64 {
|
|
if p == nil || p.UserId == nil {
|
|
return -1
|
|
}
|
|
return *p.UserId
|
|
}
|
|
|
|
func (p *RavenIQTest) GetAge() int64 {
|
|
if p == nil || p.Age == nil {
|
|
return 0
|
|
}
|
|
return *p.Age
|
|
}
|
|
|
|
func (p *RavenIQTest) GetTotalScore() float64 {
|
|
if p == nil || p.TotalScore == nil {
|
|
return 0
|
|
}
|
|
return *p.TotalScore
|
|
}
|
|
|
|
func (p *RavenIQTest) GetIQBlockId() int64 {
|
|
if p == nil || p.IQBlockId == nil {
|
|
return 0
|
|
}
|
|
return *p.IQBlockId
|
|
}
|
|
|
|
func (p *RavenIQTest) GetIQ() int64 {
|
|
if p == nil || p.IQ == nil {
|
|
return 0
|
|
}
|
|
return *p.IQ
|
|
}
|
|
|
|
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
|
|
}
|
|
|
|
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
|
|
}
|
|
|
|
func (p *RavenIQTestClassScore) GetConvertedScore() int64 {
|
|
if p == nil || p.ConvertedScore == nil {
|
|
return 0
|
|
}
|
|
return *p.ConvertedScore
|
|
}
|
|
|
|
func (p *RavenIQTestClassScore) GetClassBlockId() int64 {
|
|
if p == nil || p.ClassBlockId == nil {
|
|
return 0
|
|
}
|
|
return *p.ClassBlockId
|
|
}
|