diff --git a/manager/model/models.go b/manager/model/models.go index 2a00b17ca..a00926f1e 100644 --- a/manager/model/models.go +++ b/manager/model/models.go @@ -30,8 +30,8 @@ import ( type Model struct { ID uint `gorm:"primarykey;comment:id" json:"id"` - CreatedAt time.Time `gorm:"column:created_at" json:"created_at"` - UpdatedAt time.Time `gorm:"column:updated_at" json:"updated_at"` + CreatedAt time.Time `gorm:"column:created_at;type:timestamp;default:current_timestamp" json:"created_at"` + UpdatedAt time.Time `gorm:"column:updated_at;type:timestamp;default:current_timestamp" json:"updated_at"` IsDel soft_delete.DeletedAt `gorm:"softDelete:flag;comment:soft delete flag" json:"-"` }