12345678910111213141516171819202122 |
- package model
- import (
- "time"
- "gorm.io/gorm"
- )
- type QuestionnaireTemplate struct {
- ID int64 `gorm:"type:int(20);primaryKey;autoIncrement;comment:ID;" json:"id"`
- SN string `gorm:"type:varchar(255);not null;comment:编号" json:"sn"`
- Title string `gorm:"type:varchar(255);not null;comment:标题" json:"title"`
- Peg string `gorm:"type:longText;not null;comment:校验器" json:"peg"`
- SubjectRelations []*QuestionnaireTemplateSubject `gorm:"foreignKey:TemplateID;References:ID" json:"subjectRelations"`
- DeletedAt gorm.DeletedAt `gorm:"column:deleted_at" json:"-"`
- CreatedAt time.Time `gorm:"column:created_at" json:"createdAt"`
- UpdatedAt time.Time `gorm:"column:updated_at" json:"updatedAt"`
- }
- func (s *QuestionnaireTemplate) AfterFind(tx *gorm.DB) (err error) {
- return
- }
|