package models import "gorm.io/gorm" type Question struct { gorm.Model Question string `gorm:"chat type:varchar(100) not null comment '问题'"` NextQuestionId *uint8 `gorm:"next_question_id comment '下一个问题编号:如果此编号不为空,则说明此问题为陈述,没有答案信息'"` QuestionType *uint8 `gorm:"question_type not null default '0' comment '题目类型:0选择题;1填空题'"` } type CreateQuestion struct { Question string `json:"chat" binding:"required"` NextQuestionId *uint8 `json:"nextQuestionId"` QuestionType *uint8 `json:"questionType" binding:"required,gte=0" ` }