Tribe.ID, Player.ID, Village.ID should not use PostgreSQL sequence

This commit is contained in:
Dawid Wysokiński 2020-07-07 09:51:51 +02:00
parent 0cd6cb6f1e
commit 722e4a520a
3 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,7 @@ import "time"
type Player struct {
tableName struct{} `pg:"?SERVER.players,alias:player"`
ID int `json:"id" pg:",pk" gqlgen:"id"`
ID int `json:"id" pg:"type:bigint,pk" gqlgen:"id"`
Name string `json:"name" gqlgen:"name"`
Exists *bool `json:"exists" pg:",use_zero" gqlgen:"exists"`
TotalVillages int `json:"totalVillages" pg:",use_zero" gqlgen:"totalVillages"`

View File

@ -5,7 +5,7 @@ import "time"
type Tribe struct {
tableName struct{} `pg:"?SERVER.tribes,alias:tribe"`
ID int `json:"id" gqlgen:"id"`
ID int `json:"id" pg:"type:bigint,pk" gqlgen:"id"`
Name string `json:"name" gqlgen:"name"`
Tag string `json:"tag" gqlgen:"tag"`
Exists *bool `json:"exists" gqlgen:"exists" pg:",use_zero"`

View File

@ -8,7 +8,7 @@ import (
type Village struct {
tableName struct{} `pg:"?SERVER.villages,alias:village"`
ID int `json:"id" pg:",pk" gqlgen:"id"`
ID int `json:"id" pg:"type:bigint,pk" gqlgen:"id"`
Name string `json:"name" gqlgen:"name"`
Points int `json:"points" pg:",use_zero" gqlgen:"points"`
X int `json:"x" pg:",use_zero" gqlgen:"x"`