package proto const ( // ReqAddResourceId 添加资源 ReqAddResourceId = "add_rcoins" // ReqBatchAddResourceId 批量增加资源 ReqBatchAddResourceId = "add_batch_rcoins" ReqGetResourceId = "get_rcoins" NtfUpdateResourceId = "updateResource" ReqAddClubResourceId = "addClubResource" ReqGetClubResourceId = "getClubResource" NtfUpdateClubResourceId = "updateClubResource" ReqGetUserAllResourceId = "ReqGetUserAllResourceId" RspGetUserAllResourceId = "RspGetUserAllResourceId" ReqGetUserClubAllResourceId = "ReqGetUserClubAllResourceId" RspGetUserClubAllResourceId = "RspGetUserClubAllResourceId" ReqBankruptSubsidyId = "ReqBankruptSubsidyId" // 领取破产补助请求 RspBankruptSubsidyId = "RspBankruptSubsidyId" // 破产补助领取结果 NtfBankruptId = "NtfBankruptId" // 破产通知 ) type ResType string type ReqAddResource struct { UserId int64 `json:"u"` // 玩家id ClubId int `json:"cl"` // 俱乐部id ResType string `json:"t"` // 资源类型 ResValue int64 `json:"c"` // 操作金币 Reason string `json:"r"` // 操作原因 RoomId int `json:"ri"` // 房间id RoomType int `json:"rt"` // 房间类型 GameNo string `json:"g"` // game_no Desc string `json:"d"` // IsNotify bool `json:"n"` // 0:不通知 1:通知 } type RspAddResource struct { Code ErrorCode `json:"e"` // 错误码 0:正确 非0:错误 Msg string `json:"m"` // 错误原因 ClubId int `json:"cl"` // 俱乐部id ResType string `json:"t"` // 资源类型 ResValue int64 `json:"c"` // 资源值 } type ReqBatchAddResource struct { UserId int64 `json:"u"` // 玩家id ClubId int `json:"cl"` // 俱乐部id IsNotify bool `json:"n"` // 是否通知 ReqResources []ReqAddResource `json:"r"` // 批量请求 } type RspBatchAddResource struct { // 批量响应 RspResources []RspAddResource `json:"r"` } type ReqGetResource struct { UserId int64 `json:"u"` // 玩家id ResType string `json:"t"` // 资源类型 ClubId int `json:"cl"` // 俱乐部id } type RspGetResource struct { Code ErrorCode `json:"e"` // 错误码 Msg string `json:"m"` // 错误原因 ClubId int `json:"cl"` // 俱乐部id UserId int64 `json:"u"` // 玩家id ResType string `json:"t"` // 资源类型 ResValue int64 `json:"c"` // 资源值 } type NtfUpdateResource struct { ClubId int `json:"cl"` Type string `json:"type"` Num int64 `json:"num"` Amount int64 `json:"amount"` } type NtfBatchUpdateResource struct { Type int `json:"type"` Data []NtfUpdateResource `json:"data"` ClubId int `json:"cl"` Reason int `json:"reason"` } type ReqAddClubResource struct { UserId int64 `json:"u"` // 玩家id ClubId int `json:"cl"` // 俱乐部id ResType string `json:"t"` // 资源类型 ResValue int64 `json:"c"` // 操作金币 Reason string `json:"r"` // 操作原因 RoomId int `json:"ri"` // 房间id RoomType int `json:"rt"` // 房间类型 GameNo string `json:"g"` // game_no Desc string `json:"d"` // } type RspAddClubResource struct { Code ErrorCode `json:"e"` // 错误码 0:正确 非0:错误 Msg string `json:"m"` // 错误原因 ClubId int `json:"cl"` // 俱乐部id ResType string `json:"t"` // 资源类型 ResValue int64 `json:"c"` // 资源值 } type ReqGetClubResource struct { UserId int64 `json:"u"` // 玩家id ResType string `json:"t"` // 资源类型 ClubId int `json:"cl"` // 俱乐部id } type RspGetClubResource struct { Code ErrorCode `json:"e"` // 错误码 Msg string `json:"m"` // 错误原因 ClubId int `json:"cl"` // 俱乐部id UserId int64 `json:"u"` // 玩家id ResType string `json:"t"` // 资源类型 ResValue int64 `json:"c"` // 资源值 } type NtfUpdateClubResource struct { ClubId int `json:"cl"` Type string `json:"type"` Num int64 `json:"num"` Amount int64 `json:"amount"` } // ReqBankruptSubsidy 破产补助领取请求 type ReqBankruptSubsidy struct { } // RspBankruptSubsidy 破产补助领取结果 type RspBankruptSubsidy struct { Code ErrorCode `json:"c"` } // NtfBankrupt 破产通知 type NtfBankrupt struct { UsedSubsidyCount int `json:"u"` // 当日已领补贴次数 SubsidyCount int `json:"sc"` // 单日可领取补贴次数 SubsidyAmount int64 `json:"sa"` // 单次可领取的补贴金额 } type ReqGetAllResource struct { UserId int64 `json:"u"` // 玩家id } type RspGetAllResource struct { Code ErrorCode `json:"e"` // 错误码 Msg string `json:"m"` // 错误原因 UserId int64 `json:"u"` // 玩家id Res map[string]interface{} `json:"res"` // 资源 } type ReqGetUserClubAllResource struct { UserId int64 `json:"u"` // 玩家id ClubId int `json:"cl"` } type RspGetUserClubAllResource struct { Code ErrorCode `json:"e"` // 错误码 Msg string `json:"m"` // 错误原因 UserId int64 `json:"u"` // 玩家id ClubId int `json:"cl"` Res map[string]interface{} `json:"res"` // 资源 }