DEVELOPMENT ENVIRONMENT

~liljamo/deck-builder

94ad247f963c88700cc2ed4d703b3d05bff4e581 — Jonni Liljamo 1 year, 10 months ago 7a4f6e5
fix(sdbapi): name fields correctly in JSON
2 files changed, 6 insertions(+), 6 deletions(-)

M sdbapi/models/game.go
M sdbapi/models/user.go
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"`