service/api/proto/account/proto/account_op.go

241 lines
4.7 KiB
Go

package proto
import (
"service/api/base"
"service/dbstruct"
)
// op 创建
type OpCreateReq struct {
base.BaseRequest
*dbstruct.Account
}
type OpCreateData struct {
}
type OpCreateResp struct {
base.BaseResponse
Data *OpCreateData `json:"data"`
}
// op 删除
type OpDeleteReq struct {
base.BaseRequest
Id int64 `json:"id"`
}
type OpDeleteData struct {
}
type OpDeleteResp struct {
base.BaseResponse
Data *OpDeleteData `json:"data"`
}
// op 更新
type OpUpdateReq struct {
base.BaseRequest
*dbstruct.Account
}
type OpUpdateData struct {
}
type OpUpdateResp struct {
base.BaseResponse
Data *OpUpdateData `json:"data"`
}
// 根据Mid查询
type OpListByMidReq struct {
base.BaseRequest
Mid *int64 `json:"mid"` //单个查询
}
type OpListByMidData struct {
Account *OpListVO `json:"account"`
}
type OpListByMidResp struct {
base.BaseResponse
Data *OpListByMidData `json:"data"`
}
// 根据Mids查询
type OpListByMidsReq struct {
base.BaseRequest
Mids []int64 `json:"mids"` //列表查询
Offset int `json:"offset"`
Limit int `json:"limit"`
Sort []string
}
type OpListByMidsData struct {
List []*OpListVO `json:"list"`
Offset int `json:"offset"`
More int `json:"more"`
}
type OpListByMidsResp struct {
base.BaseResponse
Data *OpListByMidsData `json:"data"`
}
// 根据UserId查询
type OpListByUserIdReq struct {
base.BaseRequest
UserId *int64 `json:"user_id"` //user_id查询
}
type OpListByUserIdData struct {
Account *OpListVO `json:"account"`
}
type OpListByUserIdResp struct {
base.BaseResponse
Data *OpListByUserIdData `json:"data"`
}
// 根据UserId查询手机号
type OpGetMobilePhoneByUserIdReq struct {
base.BaseRequest
UserId *int64 `json:"user_id"` //user_id查询
}
type OpGetMobilePhoneByUserIdData struct {
MobilePhone string `json:"mobile_phone"`
}
type OpGetMobilePhoneByUserIdResp struct {
base.BaseResponse
Data *OpGetMobilePhoneByUserIdData `json:"data"`
}
// 根据UserId模糊查询(和姓名取交集)
type OpListFuzzilyByUserIdReq struct {
base.BaseRequest
UserId *int64 `json:"user_id"` //user_id模糊匹配
Role *int64 `json:"role"` //角色
Offset int `json:"offset"`
Limit int `json:"limit"`
Sort []string
}
type OpListFuzzilyByUserIdData struct {
List []*OpListVO `json:"list"`
Offset int `json:"offset"`
More int `json:"more"`
}
type OpListFuzzilyByUserIdResp struct {
base.BaseResponse
Data *OpListFuzzilyByUserIdData `json:"data"`
}
// 根据Name模糊查询
type OpListFuzzilyByNameReq struct {
base.BaseRequest
Name string `json:"name"` //name模糊匹配
Role *int64 `json:"role"` //角色
Offset int `json:"offset"`
Limit int `json:"limit"`
Sort []string
}
type OpListFuzzilyByNameData struct {
List []*OpListVO `json:"list"`
Offset int `json:"offset"`
More int `json:"more"`
}
type OpListFuzzilyByNameResp struct {
base.BaseResponse
Data *OpListFuzzilyByNameData `json:"data"`
}
// op 列表-查询他人
type OpListOthersByMidReq struct {
base.BaseRequest
Mid *int64 `json:"mid"` //单个查询
}
type OpListOthersByMidData struct {
Account *OpListOthersVO `json:"account"`
}
type OpListOthersByMidResp struct {
base.BaseResponse
Data *OpListOthersByMidResp `json:"data"`
}
// op 列表-批量查询他人
type OpListOthersByMidsReq struct {
base.BaseRequest
Mids []int64 `json:"mids"` //列表查询
Offset int `json:"offset"`
Limit int `json:"limit"`
Sort []string
}
type OpListOthersByMidsData struct {
List []*OpListOthersVO `json:"list"`
Offset int `json:"offset"`
More int `json:"more"`
}
type OpListOthersByMidsResp struct {
base.BaseResponse
Data *OpListOthersByMidsData `json:"data"`
}
// op 经验增长
type OpExpIncReq struct {
base.BaseRequest
Mid *int64 `json:"mid"`
ExpIncrement *int64 `json:"exp_increment"` //经验增量
}
type OpExpIncData struct {
IsLevelledUp int64 `json:"is_levelled_up"` //是否升级
Level int64 `json:"level"` //当前等级
CurrentExp int64 `json:"current_exp"` //当前经验
CurrentLevelExp int64 `json:"current_level_exp"` //当前等级总经验
}
type OpExpIncResp struct {
base.BaseResponse
Data *OpExpIncData `json:"data"`
}
// op 批量更新
type OpUpdateByIdsReq struct {
base.BaseRequest
*dbstruct.Account
Ids []int64
}
type OpUpdateByIdsData struct {
}
type OpUpdateByIdsResp struct {
base.BaseResponse
Data *OpUpdateByIdsData `json:"data"`
}
// 统计数量
type OpCountReq struct {
base.BaseRequest
CtUpperBound *int64 `json:"ct_upper_bound"`
CtLowerBound *int64 `json:"ct_lower_bound"`
}
type OpCountData struct {
Count int64 `json:"count"`
}
type OpCountResp struct {
base.BaseResponse
Data *OpCountData `json:"data"`
}