service/api/proto/accountrelation/proto/accountrelation_op.go

121 lines
2.4 KiB
Go

package proto
import (
"service/api/base"
"service/dbstruct"
)
// op 创建
type OpCreateReq struct {
base.BaseRequest
AccountRelations []*dbstruct.AccountRelation `json:"account_relations"`
}
type OpCreateData struct {
}
type OpCreateResp struct {
base.BaseResponse
Data *OpCreateData `json:"data"`
}
// op 删除
type OpDeleteReq struct {
base.BaseRequest
Sentences []*dbstruct.AccountRelation `json:"sentences"` // 判断条件
}
type OpDeleteData struct {
}
type OpDeleteResp struct {
base.BaseResponse
Data *OpDeleteData `json:"data"`
}
// op 更新
type OpUpdateReq struct {
base.BaseRequest
*dbstruct.AccountRelation
Sentence *dbstruct.AccountRelation `json:"sentence"` // 判断条件
}
type OpUpdateData struct {
}
type OpUpdateResp struct {
base.BaseResponse
Data *OpUpdateData `json:"data"`
}
// op 列表
type OpListReq struct {
base.BaseRequest
Mid *int64 `json:"mid"`
Offset int `json:"offset"`
Limit int `json:"limit"`
}
type OpListData struct {
List []*dbstruct.AccountRelation `json:"list"`
Offset int `json:"offset"`
More int `json:"more"`
}
type OpListResp struct {
base.BaseResponse
Data *OpListData `json:"data"`
}
// 计数
type OpCountReq struct {
base.BaseRequest
Mid *int64 `json:"mid"`
}
type OpCountData struct {
FollowCount int64 `json:"follow_count"`
IsFollowedCount int64 `json:"is_followed_count"`
FriendCount int64 `json:"friend_count"`
}
type OpCountResp struct {
base.BaseResponse
Data *OpListData `json:"data"`
}
// 根据sentence查询
type OpListBySentenceReq struct {
base.BaseRequest
*dbstruct.AccountRelation
}
type OpListBySentenceData struct {
IsAccountRelationExisted bool `json:"is_account_relation_existed"`
}
type OpListBySentenceResp struct {
base.BaseResponse
Data *OpListData `json:"data"`
}
// 根据主语mid和谓词查询
type OpListBySubMidAndPredicateReq struct {
base.BaseRequest
SubMid *int64 `json:"sub_mid"`
Predicate *int64 `json:"predicate"`
Offset int `json:"offset"`
Limit int `json:"limit"`
}
type OpListBySubMidAndPredicateData struct {
List []*dbstruct.AccountRelation `json:"list"`
Offset int `json:"offset"`
More int `json:"more"`
}
type OpListBySubMidAndPredicateResp struct {
base.BaseResponse
Data *OpListBySubMidAndPredicateData `json:"data"`
}