feat(Model) : add JSON formatter in gorm Model
This commit is contained in:
parent
063b1ca0c4
commit
d958737cd0
8
model.go
8
model.go
@ -8,8 +8,8 @@ import "time"
|
|||||||
// gorm.Model
|
// gorm.Model
|
||||||
// }
|
// }
|
||||||
type Model struct {
|
type Model struct {
|
||||||
ID uint `gorm:"primarykey"`
|
ID uint `json:"id" gorm:"primarykey"`
|
||||||
CreatedAt time.Time
|
CreatedAt time.Time `json:"created_at"`
|
||||||
UpdatedAt time.Time
|
UpdatedAt time.Time `json:"updated_at"`
|
||||||
DeletedAt DeletedAt `gorm:"index"`
|
DeletedAt DeletedAt `json:"deleted_at" gorm:"index"`
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user