fix: int64 ID 字段序列化为 JSON string

This commit is contained in:
zetaloop
2026-05-03 05:54:48 +08:00
parent 83fa982749
commit cf639f1bca
22 changed files with 86 additions and 82 deletions
+6 -6
View File
@@ -4,7 +4,7 @@
package types
type CreateServiceReq struct {
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"`
@@ -56,7 +56,7 @@ type PlayerListResp struct {
}
type PlayerProfile struct {
Id int64 `json:"id"`
Id int64 `json:"id,string"`
User UserProfile `json:"user"`
Rating float64 `json:"rating"`
TotalOrders int64 `json:"totalOrders"`
@@ -71,9 +71,9 @@ type PlayerProfile struct {
}
type PlayerService struct {
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"`
@@ -100,7 +100,7 @@ type UpdatePlayerStatusReq struct {
type UpdateServiceReq struct {
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"`