service/api/proto/account/proto/account_api.go

223 lines
4.2 KiB
Go

package proto
import (
"service/api/base"
"service/dbstruct"
)
// api 创建
type ApiCreateReq struct {
base.BaseRequest
*dbstruct.Account
}
type ApiCreateData struct {
}
type ApiCreateResp struct {
base.BaseResponse
Data *ApiCreateData `json:"data"`
}
// api 删除
type ApiDeleteReq struct {
base.BaseRequest
Id int64 `json:"id"`
}
type ApiDeleteData struct {
}
type ApiDeleteResp struct {
base.BaseResponse
Data *ApiDeleteData `json:"data"`
}
// api 更新
type ApiUpdateReq struct {
base.BaseRequest
*dbstruct.Account
}
type ApiUpdateData struct {
}
type ApiUpdateResp struct {
base.BaseResponse
Data *ApiUpdateData `json:"data"`
}
// 根据Mid查询
type ApiListByMidReq struct {
base.BaseRequest
Mid *int64 `json:"mid"` //单个查询
}
type ApiListByMidData struct {
Account *ApiListVO `json:"account"`
}
type ApiListByMidResp struct {
base.BaseResponse
Data *ApiListByMidData `json:"data"`
}
// 根据Mids查询
type ApiListByMidsReq struct {
base.BaseRequest
Mids []int64 `json:"mids"` //列表查询
Offset int `json:"offset"`
Limit int `json:"limit"`
Sort []string
}
type ApiListByMidsData struct {
List []*ApiListVO `json:"list"`
Offset int `json:"offset"`
More int `json:"more"`
}
type ApiListByMidsResp struct {
base.BaseResponse
Data *ApiListByMidsData `json:"data"`
}
// 根据UserId查询
type ApiListByUserIdReq struct {
base.BaseRequest
UserId *int64 `json:"user_id"` //user_id查询
}
type ApiListByUserIdData struct {
Account *ApiListVO `json:"account"`
}
type ApiListByUserIdResp struct {
base.BaseResponse
Data *ApiListByUserIdData `json:"data"`
}
// api 列表-查询他人
type ApiListOthersByMidReq struct {
base.BaseRequest
Mid *int64 `json:"mid"` //单个查询
}
type ApiListOthersByMidData struct {
Account *ApiListOthersVO `json:"account"`
}
type ApiListOthersByMidResp struct {
base.BaseResponse
Data *ApiListOthersByMidResp `json:"data"`
}
// api 列表-批量查询他人
type ApiListOthersByMidsReq struct {
base.BaseRequest
Mids []int64 `json:"mids"` //列表查询
Offset int `json:"offset"`
Limit int `json:"limit"`
Sort []string
}
type ApiListOthersByMidsData struct {
List []*ApiListOthersVO `json:"list"`
Offset int `json:"offset"`
More int `json:"more"`
}
type ApiListOthersByMidsResp struct {
base.BaseResponse
Data *ApiListOthersByMidsData `json:"data"`
}
// api 列表-查询他人
type ApiListOthersByUserIdReq struct {
base.BaseRequest
UserId *int64 `json:"user_id"` //单个查询
}
type ApiListOthersByUserIdData struct {
Account *ApiListOthersVO `json:"account"`
}
type ApiListOthersByUserIdResp struct {
base.BaseResponse
Data *ApiListOthersByUserIdResp `json:"data"`
}
// api 经验增长
type ApiExpIncReq struct {
base.BaseRequest
Mid *int64 `json:"mid"`
ExpIncrement *int64 `json:"exp_increment"` //经验增量
}
type ApiExpIncData struct {
IsLevelledUp int64 `json:"is_levelled_up"` //是否升级
Level int64 `json:"level"` //当前等级
CurrentExp int64 `json:"current_exp"` //当前经验
CurrentLevelExp int64 `json:"current_level_exp"` //当前等级总经验
}
type ApiExpIncResp struct {
base.BaseResponse
Data *ApiExpIncData `json:"data"`
}
// api 批量更新
type ApiUpdateByIdsReq struct {
base.BaseRequest
*dbstruct.Account
Ids []int64
}
type ApiUpdateByIdsData struct {
}
type ApiUpdateByIdsResp struct {
base.BaseResponse
Data *ApiUpdateByIdsData `json:"data"`
}
// 账号注销
type ApiCancelReq struct {
base.BaseRequest
}
type ApiCancelData struct {
}
type ApiCancelResp struct {
base.BaseResponse
Data *ApiCancelData `json:"data"`
}
// 取消账号注销
type ApiAbortCancellationReq struct {
base.BaseRequest
}
type ApiAbortCancellationData struct {
}
type ApiAbortCancellationResp struct {
base.BaseResponse
Data *ApiAbortCancellationData `json:"data"`
}
// api 列表-查询手机号
type ApiGetMobilePhoneReq struct {
Token string `form:"token"` // token
}
type ApiGetMobilePhoneData struct {
Data *ApiGetMobilePhoneVO `json:"data"`
}
type ApiGetMobilePhoneResp struct {
base.BaseResponse
Data *ApiGetMobilePhoneResp `json:"data"`
}