117 lines
2.0 KiB
Go
117 lines
2.0 KiB
Go
package proto
|
|
|
|
import (
|
|
"service/api/base"
|
|
"service/dbstruct"
|
|
)
|
|
|
|
// op 创建
|
|
type OpCreateReq struct {
|
|
base.BaseRequest
|
|
*dbstruct.StreamerLink
|
|
}
|
|
|
|
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.StreamerLink
|
|
}
|
|
|
|
type OpUpdateData struct {
|
|
}
|
|
|
|
type OpUpdateResp struct {
|
|
base.BaseResponse
|
|
Data *OpUpdateData `json:"data"`
|
|
}
|
|
|
|
// op 列表-单个mid
|
|
type OpListByMidReq struct {
|
|
base.BaseRequest
|
|
Mid *int64 `json:"mid"`
|
|
Offset int `json:"offset"`
|
|
Limit int `json:"limit"`
|
|
Sort []string
|
|
}
|
|
|
|
type OpListByMidData struct {
|
|
List []*dbstruct.StreamerLink `json:"list"`
|
|
Offset int `json:"offset"`
|
|
More int `json:"more"`
|
|
}
|
|
|
|
type OpListByMidResp struct {
|
|
base.BaseResponse
|
|
Data *OpListByMidData `json:"data"`
|
|
}
|
|
|
|
// op 列表-多个mid
|
|
type OpListByMidsReq struct {
|
|
base.BaseRequest
|
|
Mids []int64 `json:"mids"`
|
|
Offset int `json:"offset"`
|
|
Limit int `json:"limit"`
|
|
Sort []string
|
|
}
|
|
|
|
type OpListByMidsData struct {
|
|
List []*dbstruct.StreamerLink `json:"list"`
|
|
Offset int `json:"offset"`
|
|
More int `json:"more"`
|
|
}
|
|
|
|
type OpListByMidsResp struct {
|
|
base.BaseResponse
|
|
Data *OpListByMidsData `json:"data"`
|
|
}
|
|
|
|
// op 批量创建
|
|
type OpCreateBatchReq struct {
|
|
base.BaseRequest
|
|
StreamerLinks []*dbstruct.StreamerLink `json:"streamer_links"`
|
|
}
|
|
|
|
type OpCreateBatchData struct {
|
|
}
|
|
|
|
type OpCreateBatchResp struct {
|
|
base.BaseResponse
|
|
Data *OpCreateBatchData `json:"data"`
|
|
}
|
|
|
|
// op 批量删除
|
|
type OpDeleteBatchReq struct {
|
|
base.BaseRequest
|
|
Ids []int64
|
|
}
|
|
|
|
type OpDeleteBatchData struct {
|
|
}
|
|
|
|
type OpDeleteBatchResp struct {
|
|
base.BaseResponse
|
|
Data *OpDeleteBatchData `json:"data"`
|
|
}
|