修改标签

This commit is contained in:
2024-10-12 17:09:44 +08:00
parent 44818c206b
commit 34c9bb3215
8 changed files with 90 additions and 52 deletions
-2
View File
@@ -21,8 +21,6 @@ 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"`
QuestionOption []*QuestionOption `gorm:"foreignKey:QuestionId;references:question_id" json:"question_option"`
}