feat(Model) : add JSON formatter in gorm Model

This commit is contained in:
Akecel 2020-10-11 12:31:04 +02:00
parent 063b1ca0c4
commit d958737cd0

View File

@ -8,8 +8,8 @@ import "time"
// gorm.Model
// }
type Model struct {
ID uint `gorm:"primarykey"`
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt DeletedAt `gorm:"index"`
ID uint `json:"id" gorm:"primarykey"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
DeletedAt DeletedAt `json:"deleted_at" gorm:"index"`
}