package common import ( "gorm.io/gorm" "time" ) type Model struct { ID int `json:"id" gorm:"primaryKey;autoIncrement;comment:主键编码"` } type ModelTime struct { CreatedAt time.Time `json:"createdAt" gorm:"comment:创建时间"` UpdatedAt time.Time `json:"updatedAt" gorm:"comment:最后更新时间"` DeletedAt gorm.DeletedAt `json:"-" gorm:"index;comment:删除时间"` } type YearMonthWeek struct { Year int `json:"year" form:"year" gorm:"comment:年"` Month int `json:"month" form:"month" gorm:"comment:月"` Week int `json:"week" form:"week" gorm:"comment:周"` } type ControlBy struct { CreateBy int `json:"createBy" gorm:"index;comment:创建者"` UpdateBy int `json:"updateBy" gorm:"index;comment:更新者"` }