package model import ( "time" "gorm.io/gorm" ) type BaseModel struct { ID int `json:"id" form:"id" gorm:"primaryKey"` CreateAt time.Time `json:"-" gorm:"autoCreateTime"` //标签autoCreateTime设置如果字段名字不为CreatAt时候自动插入当前时间 UpdateAt time.Time `json:"-" gorm:"autoUpdateTime"` DeletedAt gorm.DeletedAt `json:"-" gorm:"column:delete_at"` }