package logic //微信url定义 const ( URL_WEIXINMSG_CHECK = "https://api.weixin.qq.com/wxa/msg_sec_check" URL_WEIXINGETACCESS_TOKEN = "https://api.weixin.qq.com/cgi-bin/token" ) //登录类型枚举 const ( LOGIN_TYPE_TOURIST = 1 //游客登录 LOGIN_TYPE_ACCOUNT = 2 //账号密码登录 LOGIN_TYPE_WECHAT = 3 //微信登录 ) type WechatLoginReq struct { Channel_id int `json:"channel_id"` Invite_type int `json:"invite_type"` Invite_res_id int `json:"invite_res_id"` User_invite_uid int `json:"user_invite_uid"` Code string `json:"code"` Signature string `json:"signature"` Iv string `json:"iv"` Raw_data string `json:"raw_data"` Encrypted_data string `json:"encrypted_data"` Token string `json:"token"` Version string `json:"version"` } type UserLoginReq struct { Channel_id int `json:"channel_id"` Invite_type int `json:"invite_type"` Invite_res_id int `json:"invite_res_id"` User_invite_uid int `json:"user_invite_uid"` Scene int `json:"scene"` RefAppId int `json:"refAppId"` Code string `json:"code"` Token string `json:"token"` Version string `json:"version"` } type UserBaseData struct { User_id int `json:"user_id"` User_gender int `json:"user_gender"` User_nickname string `json:"user_nickname"` User_openid string `json:"user_openid"` User_avatar_url string `json:"user_avatar_url"` User_city string `json:"user_city"` User_token string `json:"user_token"` } type UserExtData struct { User_id int `json:"user_id"` Hot int `json:"hot"` Coin int64 `json:"coin"` LoveExp int `json:"loveExp"` Bean int `json:"bean"` ShopNum int `json:"shopNum"` Lv int `json:"lv"` Exp int `json:"exp"` User_invite_uid int `json:"user_invite_uid"` User_reg_time int `json:"user_reg_time"` User_channel int `json:"user_channel"` User_is_black int `json:"user_is_black"` User_scene int `json:"user_scene"` Reg_time int `json:"reg_time"` Invite_uid int `json:"invite_uid"` } type UserLoginData struct { Dasedata UserBaseData `json:"UserBaseData"` Extdata UserExtData `json:"user_ext_data"` } type UserLoginResult struct { Code int `json:"code"` Data UserLoginData `json:"data"` } type UserLoginResp struct { Status string `json:"status"` Result UserLoginResult `json:"result"` } type QueryInviteReq struct{ Uuid int `json:"uuid"` } type QueryInviteData struct { Uuid int `json:"uuid"` Nickname string `json:"nickname"` Headurl string `json:"headurl"` Isfetched int `json:"isfetched"` } type QueryInviteDesc struct { Invite_data []QueryInviteData `json:"invite_data"` } type QueryInviteResult struct { Code int `json:"code"` Data QueryInviteDesc `json:"data"` } type QueryInviteResp struct { Status string `json:"status"` Result QueryInviteResult `json:"result"` } type InviteWorkReq struct{ Uuid int `json:"uuid"` } //邀请打工数据结构 type InviteWorkDesc struct { Uuid int `json:"uuid"` //打工者ID InviteTime int `json:"invitetime"`//开始打工时间 Nickname string `json:"nickname"`//昵称 HeadUrl string `json:"headurl"`//头像 } type InviteWorksDesc struct { Invite_data []InviteWorkDesc `json:"invite_data"` } type InviteWorkResult struct { Code int `json:"code"` Data InviteWorksDesc `json:"data"` } type InviteWorkResp struct { Status string `json:"status"` Result InviteWorkResult `json:"result"` } type SaveDataBackupReq struct{ Uuid int `json:"uuid"` Value string `json:"value"` } type SaveDataBackupResp struct { Code int `json:"code"` Message string `json:"message"` } type FetchInviteReq struct{ Selfuuid int `json:"selfuuid"` Fuuid int `json:"fuuid"` } type FetchInviteResp struct { Status string `json:"status"` Result CommonResult `json:"result"` } type EnterInviteReq struct{ Selfuuid int `json:"selfuuid"` Inviteuuid int `json:"inviteuuid"` Invitetype int `json:"invitetype"` } type EnterInviteResp struct { Status string `json:"status"` Result CommonResult `json:"result"` } type RegeisterReq struct{ Account string `json:"account"` Password string `json:"password"` } type RegeisteraResp struct { Status string `json:"status"` Result CommonResult `json:"result"` } type AccounLoginReq struct{ Account string `json:"account"` Password string `json:"password"` } type AccounLoginResp struct { Status string `json:"status"` Result UserLoginResult `json:"result"` } type SaveUserDataReq struct{ Token string `json:"token"` Hot int `json:"hot"` Coin int64 `json:"coin"` Loveexp int `json:"loveexp"` Bean int `json:"bean"` Shopnum int `json:"shopnum"` } type SaveUserDataResp struct { Status string `json:"status"` Result UserLoginResult `json:"result"` } type CommonResult struct { Code int `json:"code"` Data string `json:"data"` } type SaveDataReq struct{ Token string `json:"token"` Field string `json:"field"` Value string `json:"value"` } type SaveDataResp struct { Status string `json:"status"` Result CommonResult `json:"result"` } type GetDataDesc struct { Base_data string `json:"base_data"` } type GetDataResult struct { Code int `json:"code"` Data GetDataDesc `json:"data"` } type GetDataReq struct{ Token string `json:"token"` Field string `json:"field"` } type GetDataResp struct { Status string `json:"status"` Result GetDataResult `json:"result"` } type TextCheckReq struct{ Token string `json:"token"` Text string `json:"text"` } type TextCheckResp struct { Status string `json:"status"` Result CommonResult `json:"result"` } type MsgCheckDesc struct { Content string `json:"content"` } type MsgCheckResp struct { Errcode string `json:"errcode"` Errmsg string `json:"errmsg"` } type GetAccessTokenResp struct { Access_token string `json:"access_token"` Expires_in string `json:"expires_in"` } type CreateTeamReq struct{ Token string `json:"token"` Name string `json:"name"` Is_open int `json:"is_open"` Limit int `json:"limit"` } //队伍列表人员id type TeamMemInfo struct { MemList []int } //玩家投资信心 type TeamDevoteInfo struct { UserId int `json:"userid"` Type int `json:"type"` Assets int `json:"assets"` } //玩家buff type TeamBuffInfo struct { BeginTime int EndTime int } // type TeamAllBuff struct { Type int BuffInfo []TeamBuffInfo } //队伍建筑信息 type TeamBuildingInfo struct { Devote []TeamDevoteInfo Buff []TeamAllBuff } type CreateTeamInfo struct { Id int `json:"id"` Name string `json:"name"` Is_open int `json:"is_open"` Num int `json:"num"` Assets int `json:"assets"` Least int `json:"least"` Captain_id int `json:"captain_id"` Creator_id int `json:"creator_id"` Status int `json:"status"` Create_time int `json:"create_time"` Update_time int `json:"update_time"` } //队伍信息 type TeamInfo struct { BaseInfo CreateTeamInfo MemInfo TeamMemInfo BInfo TeamBuildingInfo } type CreateTeamDesc struct { Team_data CreateTeamInfo `json:"team_data"` } type CreateTeamData struct { Code int `json:"code"` Data CreateTeamDesc `json:"data"` } type CreateTeamResp struct { Status string `json:"status"` Result CreateTeamData `json:"result"` } type JoinTeamReq struct{ Token string `json:"token"` Team_id int `json:"team_id"` } type JoinTeamResp struct { Status string `json:"status"` Result CommonResult `json:"result"` } type JoinTeamByInviteReq struct{ Token string `json:"token"` Inviter_id int `json:"inviter_id"` } type JoinTeamByInviteResp struct { Status string `json:"status"` Result CommonResult `json:"result"` } type QuitTeamReq struct{ Token string `json:"token"` User_id int `json:"user_id"` Type int `json:"type"` } type QuitTeamResp struct { Status string `json:"status"` Result CommonResult `json:"result"` } type UpdateTeamBuildReq struct{ Token string `json:"token"` Build_type int `json:"build_type"` Assets int `json:"assets"` Muti int `json:"muti"` } type QuitTeamDesc struct { Build_list []TeamDevoteInfo `json:"build_list"` } type QuitTeamResult struct { Code int `json:"code"` Data QuitTeamDesc `json:"data"` } type UpdateTeamBuildResp struct { Status string `json:"status"` Result QuitTeamResult `json:"result"` } type AddTeamBuffReq struct{ Token string `json:"token"` Build_type int `json:"build_type"` Muti int `json:"muti"` } type BuffTimeInfo struct { Buff_begin_time int `json:"buff_begin_time"` Buff_end_time int `json:"buff_end_time"` } type AddTeamBuffSpec struct { Build_type int `json:"build_type"` Buff_time []BuffTimeInfo `json:"buff_time"` } type AddTeamBuffDesc struct { Build_list []AddTeamBuffSpec `json:"build_list"` } type AddTeamBuffResult struct { Code int `json:"code"` Data AddTeamBuffDesc `json:"data"` } type AddTeamBuffResp struct { Status string `json:"status"` Result AddTeamBuffResult `json:"result"` } type GetTeamBuffReq struct{ Token string `json:"token"` } type GetTeamBuffResp struct { Status string `json:"status"` Result AddTeamBuffResult `json:"result"` } type GetTeamDataReq struct{ Token string `json:"token"` } type GetTeamDataTeamUserList struct { Uuid int `json:"uuid"` } type GetTeamDataDesc struct { Team_data CreateTeamInfo `json:"team_data"` Team_user_list []GetTeamDataTeamUserList `json:"team_user_list"` Build_list QuitTeamDesc `json:"build_list"` } type GetTeamDataResult struct { Code int `json:"code"` Data GetTeamDataDesc `json:"data"` } type GetTeamDataResp struct { Status string `json:"status"` Result GetTeamDataResult `json:"result"` } type GetDataByUserIdReq struct{ Token string `json:"token"` Field string `json:"field"` User_id int `json:"user_id"` } type GetDataByUserIdDesc struct { Base_data string `json:"base_data"` User_base_data UserBaseData `json:"user_base_data"` Extdata UserExtData `json:"user_ext_data"` } type GetDataByUserIdResult struct { Code int `json:"code"` Data GetDataByUserIdDesc `json:"data"` } type GetDataByUserIdResp struct { Status string `json:"status"` Result GetDataByUserIdResult `json:"result"` } type GetTeamListReq struct{ Token string `json:"token"` Store_num int `json:"store_num"` Page int `json:"page"` } type GetTeamListDesc struct { Items []int `json:"items"` Count int `json:"count"` } type GetTeamListResult struct { Code int `json:"code"` Data GetTeamListDesc `json:"data"` } type GetTeamListResp struct { Status string `json:"status"` Result GetTeamListResult `json:"result"` } type SearchTeamReq struct{ Token string `json:"token"` Name string `json:"name"` Store_num int `json:"store_num"` Page int `json:"page"` } type SearchTeamResp struct { Status string `json:"status"` Result GetTeamListResult `json:"result"` } type FriendInfo struct { Uuid int `json:"uuid"` Status int `json:"status"` } type FriendList struct { Friends []FriendInfo `json:"friends"` } type ApplyInfo struct { Uuid int `json:"uuid"` Apply_time int `json:"apply_time"` } type ApplyList struct { Apply_info []ApplyInfo `json:"apply_info"` } type ApproveList struct { Approve_info []ApplyInfo `json:"approve_info"` } type SetFriendReq struct{ Token string `json:"token"` User_id int `json:"user_id"` } type SetFriendResp struct { Status string `json:"status"` Result CommonResult `json:"result"` } type GetFriendListReq struct{ Token string `json:"token"` } type GetFriendListDesc struct { Friend_list []FriendInfo `json:"friend_list"` } type GetFriendListResult struct { Code int `json:"code"` Data GetFriendListDesc `json:"data"` } type GetFriendListResp struct { Status string `json:"status"` Result GetFriendListResult `json:"result"` } type GetAuditListReq struct{ Token string `json:"token"` } type GetAuditListDesc struct { Approve_list []ApplyInfo `json:"approve_list"` } type GetAuditListResult struct { Code int `json:"code"` Data GetAuditListDesc `json:"data"` } type GetAuditListResp struct { Status string `json:"status"` Result GetAuditListResult `json:"result"` } type GetRecommendListReq struct{ Token string `json:"token"` } type GetRecommendListInfo struct { Userid int `json:"userid"` Nickname string `json:"nickname"` Avatar_url string `json:"avatar_url"` Gender int `json:"gender"` City string `json:"city"` Hot int `json:"hot"` Coin int64 `json:"coin"` Love_exp int `json:"love_exp"` Bean int `json:"bean"` Shop_num int `json:"shop_num"` Cat_num int `json:"cat_num"` Lv int `json:"lv"` Exp int `json:"exp"` Reg_time int `json:"reg_time"` } type GetRecommendListDesc struct { Recommend_list []GetRecommendListInfo `json:"recommend_list"` } type GetRecommendListResult struct { Code int `json:"code"` Data GetRecommendListDesc `json:"data"` } type GetRecommendListResp struct { Status string `json:"status"` Result GetRecommendListResult `json:"result"` } type HandleFriendRequestReq struct{ Token string `json:"token"` User_id int `json:"user_id"` Type int `json:"type"` } type HandleFriendRequestResp struct { Status string `json:"status"` Result CommonResult `json:"result"` } type DelFriendReq struct{ Token string `json:"token"` User_id int `json:"user_id"` } type DelFriendResp struct { Status string `json:"status"` Result CommonResult `json:"result"` } type QueryPlayerDataReq struct{ Token string `json:"token"` User_id int `json:"user_id"` } type QueryPlayerDataDesc struct { Player_data GetRecommendListInfo `json:"player_data"` } type QueryPlayerDataResult struct { Code int `json:"code"` Data QueryPlayerDataDesc `json:"data"` } type QueryPlayerDataResp struct { Status string `json:"status"` Result QueryPlayerDataResult `json:"result"` } //********************************************************************************************************** //玩家数据 type UserData struct { Userid int //玩家id Hot int Coin int64 //金币 Loevexp int Bean int //咖啡豆 Shopnum int //店铺数量 Lv int Exp int UserInviteId int Userregtime int Channel int Isblack int Scene int Regtime int InviteUid int LoginTime int LoginDay int }