package models import ( "time" "github.com/beego/beego/v2/client/orm" ) // ExamQuestion 对应表 yz_exam_question type ExamQuestion struct { Id int64 `orm:"column(id);auto" json:"id"` TenantId int `orm:"column(tenant_id)" json:"tenant_id"` QuestionType int8 `orm:"column(question_type)" json:"question_type"` QuestionTitle string `orm:"column(question_title);size(1000)" json:"question_title"` QuestionAnalysis string `orm:"column(question_analysis);size(2000);null" json:"question_analysis"` Score float64 `orm:"column(score);digits(5);decimals(2)" json:"score"` SortOrder int8 `orm:"column(sort_order);null" json:"sort_order"` Status int8 `orm:"column(status)" json:"status"` CreateTime time.Time `orm:"column(create_time);type(datetime);auto_now_add" json:"create_time"` UpdateTime time.Time `orm:"column(update_time);type(datetime);auto_now" json:"update_time"` DeleteTime *time.Time `orm:"column(delete_time);type(datetime);null" json:"delete_time,omitempty"` } func (q *ExamQuestion) TableName() string { return "yz_exam_question" } // ExamQuestionOption 对应表 yz_exam_question_option type ExamQuestionOption struct { Id int64 `orm:"column(id);auto" json:"id"` TenantId int `orm:"column(tenant_id)" json:"tenant_id"` QuestionId int64 `orm:"column(question_id)" json:"question_id"` OptionLabel string `orm:"column(option_label);size(10)" json:"option_label"` OptionContent string `orm:"column(option_content);size(500)" json:"option_content"` SortOrder int8 `orm:"column(sort_order);null" json:"sort_order"` CreateTime time.Time `orm:"column(create_time);type(datetime);auto_now_add" json:"create_time"` UpdateTime time.Time `orm:"column(update_time);type(datetime);auto_now" json:"update_time"` DeleteTime *time.Time `orm:"column(delete_time);type(datetime);null" json:"delete_time,omitempty"` } func (o *ExamQuestionOption) TableName() string { return "yz_exam_question_option" } // ExamQuestionAnswer 对应表 yz_exam_question_answer type ExamQuestionAnswer struct { Id int64 `orm:"column(id);auto" json:"id"` TenantId int `orm:"column(tenant_id)" json:"tenant_id"` QuestionId int64 `orm:"column(question_id)" json:"question_id"` AnswerContent string `orm:"column(answer_content);size(1000)" json:"answer_content"` CreateTime time.Time `orm:"column(create_time);type(datetime);auto_now_add" json:"create_time"` UpdateTime time.Time `orm:"column(update_time);type(datetime);auto_now" json:"update_time"` DeleteTime *time.Time `orm:"column(delete_time);type(datetime);null" json:"delete_time,omitempty"` } func (a *ExamQuestionAnswer) TableName() string { return "yz_exam_question_answer" } // ExamQuestionBank 对应表 yz_exam_question_bank type ExamQuestionBank struct { Id int64 `orm:"column(id);auto" json:"id"` TenantId int `orm:"column(tenant_id)" json:"tenant_id"` BankName string `orm:"column(bank_name);size(100)" json:"bank_name"` BankDesc string `orm:"column(bank_desc);size(500);null" json:"bank_desc"` Status int8 `orm:"column(status)" json:"status"` SortOrder int8 `orm:"column(sort_order);null" json:"sort_order"` CreateTime time.Time `orm:"column(create_time);type(datetime);auto_now_add" json:"create_time"` UpdateTime time.Time `orm:"column(update_time);type(datetime);auto_now" json:"update_time"` DeleteTime *time.Time `orm:"column(delete_time);type(datetime);null" json:"delete_time,omitempty"` } func (b *ExamQuestionBank) TableName() string { return "yz_exam_question_bank" } func init() { orm.RegisterModel(new(ExamQuestion), new(ExamQuestionOption), new(ExamQuestionAnswer), new(ExamQuestionBank)) }