1
This commit is contained in:
@@ -21,8 +21,9 @@ type Question struct {
|
||||
FirstLabelId *int64 `gorm:"column:first_label_id;type:bigint(19);comment:一级标签id" json:"first_label_id"`
|
||||
SecondLabelId *int64 `gorm:"column:second_label_id;type:bigint(19);comment:二级标签id" json:"second_label_id"`
|
||||
Model
|
||||
FirstLabel *Label `gorm:"foreignKey:FirstLabelId;references:label_id" json:"first_label"`
|
||||
SecondLabel *Label `gorm:"foreignKey:SecondLabelId;references:label_id" json:"second_label"`
|
||||
FirstLabel *Label `gorm:"foreignKey:FirstLabelId;references:label_id" json:"first_label"`
|
||||
SecondLabel *Label `gorm:"foreignKey:SecondLabelId;references:label_id" json:"second_label"`
|
||||
QuestionOption []*QuestionOption `gorm:"foreignKey:QuestionId;references:question_id" json:"question_option"`
|
||||
}
|
||||
|
||||
func (m *Question) TableName() string {
|
||||
|
||||
@@ -15,10 +15,11 @@ type QuestionQa struct {
|
||||
QaRuleContent string `gorm:"column:qa_rule_content;type:text;comment:规则解释" json:"qa_rule_content"`
|
||||
QaDisplayType int `gorm:"column:qa_display_type;type:tinyint(1);default:1;comment:展示类型(1:常规 2:飞花令)" json:"qa_display_type"`
|
||||
QaExpireTime LocalTime `gorm:"column:qa_expire_time;type:datetime;comment:过期时间" json:"qa_expire_time"`
|
||||
QaLink string `gorm:"column:qa_link;type:varchar(255);comment:分享链接" json:"qa_link"`
|
||||
QaShareId string `gorm:"column:qa_share_id;type:varchar(255);comment:分享标识" json:"qa_share_id"`
|
||||
QaPassword string `gorm:"column:qa_password;type:varchar(255);comment:分享密码" json:"qa_password"`
|
||||
OpenNumber int `gorm:"column:open_number;type:int(1);default:0;comment:打开的次数" json:"open_number"`
|
||||
Image string `gorm:"column:image;type:varchar(255);comment:背景图" json:"image"`
|
||||
ItemContent string `gorm:"column:item_content;type:text;comment:明细选题规则(json)" json:"item_content"`
|
||||
Model
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,8 @@ type QuestionQaItem struct {
|
||||
QuestionId int64 `gorm:"column:question_id;type:bigint(19);comment:题目id;NOT NULL" json:"question_id"`
|
||||
IsMustSelect int `gorm:"column:is_must_select;type:tinyint(1);default:0;comment:是否必被选中(0:否 1:是)" json:"is_must_select"`
|
||||
Model
|
||||
Question *Question `gorm:"foreignKey:QuestionId;references:question_id" json:"question"`
|
||||
QuestionQa *QuestionQa `gorm:"foreignKey:QaId;references:qa_id" json:"question_qa"`
|
||||
}
|
||||
|
||||
func (m *QuestionQaItem) TableName() string {
|
||||
|
||||
Reference in New Issue
Block a user