52 lines
1.5 KiB
Plaintext
52 lines
1.5 KiB
Plaintext
syntax = "v1"
|
|
|
|
@server (
|
|
prefix: /gapi/transfercastile/v1
|
|
jwt: Auth
|
|
group: transfercastile
|
|
)
|
|
service novatask {
|
|
@doc "提取castile到游戏"
|
|
@handler TransferCastileToGame
|
|
post /save (TransferCastileToGameReq) returns (TransferCastileToGameResp)
|
|
|
|
@doc "获取提取castile到游戏的记录"
|
|
@handler TransferCastileToGameList
|
|
post /list (TransferCastileToGameListReq) returns (TransferCastileToGameListResp)
|
|
|
|
@doc "查询castile代币余额"
|
|
@handler GetCastileBalance
|
|
post /getBalance returns (UserCastileBalanceResp)
|
|
}
|
|
|
|
type TransferCastileToGameReq {
|
|
RoleID int64 `json:"role_id"` // 角色id
|
|
Amount int64 `json:"amount,range=[1:]"` // 数量
|
|
}
|
|
|
|
type TransferCastileToGameListReq {
|
|
RoleID int64 `json:"role_id,optional"` // 角色id
|
|
Page int `form:"page,range=[1:],optional,default=1"` // 页码
|
|
Size int `form:"size,range=[10:100],optional,default=10"` // 每页数量
|
|
}
|
|
|
|
type TransferCastileToGameResp {
|
|
Id int `json:"id"` // id
|
|
RoleID int64 `json:"role_id"` // 角色id
|
|
Amount int64 `json:"amount"` // 数量
|
|
Status int64 `json:"status"` // 状态
|
|
CreatedAt string `json:"created_at"` // 创建时间
|
|
}
|
|
|
|
type TransferCastileToGameListResp {
|
|
Total int `json:"total"` // 总数
|
|
List []TransferCastileToGameResp `json:"list"` // 列表
|
|
}
|
|
|
|
type UserCastileBalanceResp {
|
|
TotalCastile int `json:"total_castile"` //总数
|
|
TransferAmount int `json:"transfer_amount"` //已转回游戏内的数量
|
|
TotalBalance int `json:"total_balance"` //castile当前余额
|
|
}
|
|
|