questionnaire_subject.go 1005 B

123456789101112131415161718192021222324
  1. package model
  2. import (
  3. "time"
  4. "gorm.io/gorm"
  5. )
  6. type QuestionnaireSubject struct {
  7. ID int64 `gorm:"type:int(20);primaryKey;autoIncrement;comment:ID;" json:"id"`
  8. SN string `gorm:"type:varchar(255);not null;comment:编号" json:"sn"`
  9. Type int `gorm:"type:int(11);comment:类型;default:1;" json:"type"`
  10. Title string `gorm:"type:varchar(255);not null;comment:标题" json:"title"`
  11. Validator string `gorm:"type:longText;nullable;comment:校验器" json:"validator"`
  12. Remark string `gorm:"type:varchar(255);default:'';comment:备注" json:"remark"`
  13. Mark string `gorm:"type:varchar(255);default:'';comment:标记" json:"mark"`
  14. DeletedAt gorm.DeletedAt `gorm:"column:deleted_at" json:"-"`
  15. CreatedAt time.Time `gorm:"column:created_at" json:"createdAt"`
  16. UpdatedAt time.Time `gorm:"column:updated_at" json:"updatedAt"`
  17. }
  18. func (s *QuestionnaireSubject) AfterFind(tx *gorm.DB) (err error) {
  19. return
  20. }