package model import ( "gorm.io/gorm" ) type QuestionnaireSurveyQuestionnaireSubject struct { ID int64 `gorm:"type:int(20);primaryKey;autoIncrement;comment:ID;" json:"id"` SurveyID int64 `gorm:"type:int(20);not null;comment:问卷ID" json:"surveyId"` SubjectID int64 `gorm:"type:int(20);not null;comment:题目ID" json:"subjectId"` IsRequired int `gorm:"type:int(1);comment:是否必填;default:1;" json:"isRequired"` Sort int64 `gorm:"type:int(11);comment:排序;default:0;" json:"sort"` Survey QuestionnaireSurvey `gorm:"foreignKey:SurveyID;references:ID" json:"survey"` Subject QuestionnaireSubject `gorm:"foreignKey:SubjectID;references:ID" json:"subject"` } func (o *QuestionnaireSurveyQuestionnaireSubject) AfterFind(tx *gorm.DB) (err error) { return }