questionnaire_survey_questionnaire_subject.go 873 B

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