M sdbapi/models/game.go => sdbapi/models/game.go +3 -3
@@ 23,9 23,9 @@ const (
type Game struct {
ID string `json:"id" gorm:"primarykey;type:uuid;default:gen_random_uuid()"`
- CreatedAt time.Time
- UpdatedAt time.Time
- DeletedAt gorm.DeletedAt `gorm:"index"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ DeletedAt gorm.DeletedAt `json:"deleted_at" gorm:"index"`
P1 string `json:"p1" gorm:"foreignkey:ID"`
P2 string `json:"p2" gorm:"foreignkey:ID"`
State uint8 `json:"state" gorm:"type:smallint"`
M sdbapi/models/user.go => sdbapi/models/user.go +3 -3
@@ 17,9 17,9 @@ import (
type User struct {
ID string `json:"id" gorm:"primarykey;type:uuid;default:gen_random_uuid()"`
- CreatedAt time.Time
- UpdatedAt time.Time
- DeletedAt gorm.DeletedAt `gorm:"index"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ DeletedAt gorm.DeletedAt `json:"deleted_at" gorm:"index"`
Username string `json:"username" gorm:"unique"`
Email string `json:"email" gorm:"unique"`
Password string `json:"password"`