fix: int64 ID 字段序列化为 JSON string
This commit is contained in:
+6
-6
@@ -11,9 +11,9 @@ import "common.api"
|
||||
|
||||
type (
|
||||
PlayerService {
|
||||
Id int64 `json:"id,optional"`
|
||||
PlayerId int64 `json:"playerId"`
|
||||
GameId int64 `json:"gameId"`
|
||||
Id int64 `json:"id,string,optional"`
|
||||
PlayerId int64 `json:"playerId,string"`
|
||||
GameId int64 `json:"gameId,string"`
|
||||
GameName string `json:"gameName"`
|
||||
Title string `json:"title"`
|
||||
Description string `json:"description"`
|
||||
@@ -27,7 +27,7 @@ type (
|
||||
Meta PageMeta `json:"meta"`
|
||||
}
|
||||
CreateServiceReq {
|
||||
GameId int64 `json:"gameId,optional"`
|
||||
GameId int64 `json:"gameId,string,optional"`
|
||||
Title string `json:"title,optional"`
|
||||
Description string `json:"description,optional"`
|
||||
Price float64 `json:"price"`
|
||||
@@ -37,7 +37,7 @@ type (
|
||||
}
|
||||
UpdateServiceReq {
|
||||
Id int64 `path:"id"`
|
||||
GameId *int64 `json:"gameId,optional"`
|
||||
GameId *int64 `json:"gameId,string,optional"`
|
||||
Title *string `json:"title,optional"`
|
||||
Description *string `json:"description,optional"`
|
||||
Price *float64 `json:"price,optional"`
|
||||
@@ -46,7 +46,7 @@ type (
|
||||
Availability []string `json:"availability"`
|
||||
}
|
||||
PlayerProfile {
|
||||
Id int64 `json:"id"`
|
||||
Id int64 `json:"id,string"`
|
||||
User UserProfile `json:"user"`
|
||||
Rating float64 `json:"rating"`
|
||||
TotalOrders int64 `json:"totalOrders"`
|
||||
|
||||
Reference in New Issue
Block a user