159 lines
3.2 KiB
Go
159 lines
3.2 KiB
Go
package proto
|
||
|
||
import (
|
||
"service/api/base"
|
||
"service/dbstruct"
|
||
)
|
||
|
||
// op 创建
|
||
type ApiCreateReq struct {
|
||
base.BaseRequest
|
||
*dbstruct.Moment
|
||
}
|
||
|
||
type ApiCreateData struct {
|
||
}
|
||
|
||
type ApiCreateResp struct {
|
||
base.BaseResponse
|
||
Data *ApiCreateData `json:"data"`
|
||
}
|
||
|
||
// op 删除
|
||
type ApiDeleteReq struct {
|
||
base.BaseRequest
|
||
Id *int64 `json:"id"`
|
||
}
|
||
|
||
type ApiDeleteData struct {
|
||
}
|
||
|
||
type ApiDeleteResp struct {
|
||
base.BaseResponse
|
||
Data *ApiDeleteData `json:"data"`
|
||
}
|
||
|
||
// op 更新
|
||
type ApiUpdateReq struct {
|
||
base.BaseRequest
|
||
*dbstruct.Moment
|
||
}
|
||
|
||
type ApiUpdateData struct {
|
||
}
|
||
|
||
type ApiUpdateResp struct {
|
||
base.BaseResponse
|
||
Data *ApiUpdateData `json:"data"`
|
||
}
|
||
|
||
// op 按mid查询
|
||
type ApiListByMidReq struct {
|
||
base.BaseRequest
|
||
Mid *int64 `json:"mid"` //用户id
|
||
CtUpperBound *int64 `json:"ct_upper_bound"` //创建时间上界,闭区间
|
||
CtLowerBound *int64 `json:"ct_lower_bound"` //创建时间下界,开区间,可为0
|
||
Offset int `json:"offset"`
|
||
Limit int `json:"limit"`
|
||
Status *int64
|
||
}
|
||
|
||
type ApiListByMidData struct {
|
||
List []*ApiMomentVO `json:"list"`
|
||
Offset int `json:"offset"`
|
||
More int `json:"more"`
|
||
}
|
||
|
||
type ApiListByMidResp struct {
|
||
base.BaseResponse
|
||
Data *ApiListByMidData `json:"data"`
|
||
}
|
||
|
||
// op 列表
|
||
type ApiListByMidsReq struct {
|
||
base.BaseRequest
|
||
Mids []int64 `json:"mids"` //用户id
|
||
CtUpperBound *int64 `json:"ct_upper_bound"` //创建时间上界,闭区间
|
||
CtLowerBound *int64 `json:"ct_lower_bound"` //创建时间下界,开区间,可为0
|
||
Offset int `json:"offset"`
|
||
Limit int `json:"limit"`
|
||
}
|
||
|
||
type ApiListByMidsData struct {
|
||
List []*ApiMomentVO `json:"list"`
|
||
Offset int `json:"offset"`
|
||
More int `json:"more"`
|
||
}
|
||
|
||
type ApiListByMidsResp struct {
|
||
base.BaseResponse
|
||
Data *ApiListByMidsData `json:"data"`
|
||
}
|
||
|
||
// op 列表-全查询
|
||
type ApiListReq struct {
|
||
base.BaseRequest
|
||
CtUpperBound *int64 `json:"ct_upper_bound"` //创建时间上界,闭区间
|
||
CtLowerBound *int64 `json:"ct_lower_bound"` //创建时间下界,开区间,可为0
|
||
Offset int `json:"offset"`
|
||
Limit int `json:"limit"`
|
||
}
|
||
|
||
type ApiListData struct {
|
||
List []*ApiMomentVO `json:"list"`
|
||
Offset int `json:"offset"`
|
||
More int `json:"more"`
|
||
}
|
||
|
||
type ApiListResp struct {
|
||
base.BaseResponse
|
||
Data *ApiListData `json:"data"`
|
||
}
|
||
|
||
// op 点赞
|
||
type ApiThumbsUpReq struct {
|
||
base.BaseRequest
|
||
MomentId *int64 `json:"moment_id"`
|
||
Mid *int64 `json:"mid"`
|
||
Times *int64 `json:"times"`
|
||
}
|
||
|
||
type ApiThumbsUpData struct {
|
||
*dbstruct.Moment
|
||
}
|
||
|
||
type ApiThumbsUpResp struct {
|
||
base.BaseResponse
|
||
Data *ApiThumbsUpData `json:"data"`
|
||
}
|
||
|
||
// op 列表-按id列表查询
|
||
type ApiListByIdsReq struct {
|
||
base.BaseRequest
|
||
Ids []int64 `json:"ids"`
|
||
}
|
||
|
||
type ApiListByIdsData struct {
|
||
List []*ApiMomentVO `json:"list"`
|
||
}
|
||
|
||
type ApiListByIdsResp struct {
|
||
base.BaseResponse
|
||
Data *ApiListByIdsData `json:"data"`
|
||
}
|
||
|
||
// api 推荐
|
||
type ApiRecommListReq struct {
|
||
base.BaseRequest
|
||
OpType int64 `json:"op_type"`
|
||
}
|
||
|
||
type ApiRecommListData struct {
|
||
RecommList []*ApiMomentVO `json:"recomm_list"`
|
||
}
|
||
|
||
type ApiRecommListResp struct {
|
||
base.BaseResponse
|
||
Data *ApiRecommListData `json:"data"`
|
||
}
|