123456789101112131415161718 |
- package model
- import (
- "gorm.io/gorm"
- )
- type QuestionnaireTemplateSubject struct {
- ID int64 `gorm:"type:int(20);primaryKey;autoIncrement;comment:ID;" json:"id"`
- TemplateID int64 `gorm:"type:int(20);not null;comment:模板ID" json:"templateId"`
- SubjectID int64 `gorm:"type:int(20);not null;comment:题目ID" json:"subjectId"`
- Sort int64 `gorm:"type:int(11);comment:排序;default:0;" json:"sort"`
- Template QuestionnaireTemplate `gorm:"foreignKey:TemplateID;references:ID" json:"template"`
- Subject QuestionnaireSubject `gorm:"foreignKey:SubjectID;references:ID" json:"subject"`
- }
- func (o *QuestionnaireTemplateSubject) AfterFind(tx *gorm.DB) (err error) {
- return
- }
|