179 lines
4.5 KiB
Go
179 lines
4.5 KiB
Go
package proto
|
||
|
||
import (
|
||
"service/api/base"
|
||
"service/dbstruct"
|
||
)
|
||
|
||
// op 创建
|
||
type ApiCreateReq struct {
|
||
base.BaseRequest
|
||
*dbstruct.Zone
|
||
AdmissionPrice int64 `json:"admission_price"` // 空间解锁价格, 单位: 分
|
||
IronfanshipPrice int64 `json:"ironfanship_price"` // 铁粉解锁价格, 单位: 分
|
||
IsSuperfanshipEnabled int `json:"is_superfanship_enabled"` // 是否开启超粉空间 0: 关闭, 1: 开启
|
||
SuperfanshipPrice int64 `json:"superfanship_price"` // 超粉价格, 单位: 分
|
||
SuperfanshipValidPeriod int `json:"superfanship_valid_period"` // 超粉有效期类型, SuperfanshipValidPeriod*
|
||
IsSuperfanshipGiveWechat int `json:"is_superfanship_give_wechat"` // 是否开启超粉空间赠送微信 0: 不赠送, 1: 赠送
|
||
}
|
||
|
||
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.Zone
|
||
AdmissionPrice int64 `json:"admission_price"` // 空间解锁价格, 单位: 分
|
||
IronfanshipPrice int64 `json:"ironfanship_price"` // 铁粉解锁价格, 单位: 分
|
||
IsSuperfanshipEnabled int `json:"is_superfanship_enabled"` // 是否开启超粉空间 0: 关闭, 1: 开启
|
||
SuperfanshipPrice int64 `json:"superfanship_price"` // 超粉价格, 单位: 分
|
||
SuperfanshipValidPeriod int `json:"superfanship_valid_period"` // 超粉有效期类型, SuperfanshipValidPeriod*
|
||
IsSuperfanshipGiveWechat int `json:"is_superfanship_give_wechat"` // 是否开启超粉空间赠送微信 0: 不赠送, 1: 赠送
|
||
}
|
||
|
||
type ApiUpdateData struct {
|
||
}
|
||
|
||
type ApiUpdateResp struct {
|
||
base.BaseResponse
|
||
Data *ApiUpdateData `json:"data"`
|
||
}
|
||
|
||
// op 列表
|
||
type ApiListReq struct {
|
||
base.BaseRequest
|
||
Offset int `json:"offset"`
|
||
Limit int `json:"limit"`
|
||
}
|
||
|
||
type ApiListData struct {
|
||
List []*dbstruct.Zone `json:"list"`
|
||
Offset int `json:"offset"`
|
||
More int `json:"more"`
|
||
}
|
||
|
||
type ApiListResp struct {
|
||
base.BaseResponse
|
||
Data *ApiListData `json:"data"`
|
||
}
|
||
|
||
// op 列表-访客查询
|
||
type ApiListByVisitorMidReq struct {
|
||
base.BaseRequest
|
||
Offset int `json:"offset"`
|
||
Limit int `json:"limit"`
|
||
}
|
||
|
||
type ApiListByVisitorMidData struct {
|
||
List []*ApiZoneVO `json:"list"`
|
||
Offset int `json:"offset"`
|
||
More int `json:"more"`
|
||
}
|
||
|
||
type ApiListByVisitorMidResp struct {
|
||
base.BaseResponse
|
||
Data *ApiListByVisitorMidData `json:"data"`
|
||
}
|
||
|
||
// op 列表-mid单查
|
||
type ApiListByMidReq struct {
|
||
base.BaseRequest
|
||
Uid *int64 `json:"mid"`
|
||
Offset int `json:"offset"`
|
||
Limit int `json:"limit"`
|
||
}
|
||
|
||
const (
|
||
AdmissionRefundStatusRefunding = 1 // 退款中
|
||
AdmissionRefundStatusFinish = 2 // 已退款
|
||
)
|
||
|
||
type ApiListByMidData struct {
|
||
List []*ApiZoneVO `json:"list"`
|
||
Offset int `json:"offset"`
|
||
More int `json:"more"`
|
||
RefundEnable int `json:"refund_enable"` // 1: 能退款,0: 不能退款
|
||
RefundStatus int `json:"refund_status"` // 退款状态, AdmissionRefundStatus*
|
||
}
|
||
|
||
type ApiListByMidResp struct {
|
||
base.BaseResponse
|
||
Data *ApiListByMidData `json:"data"`
|
||
}
|
||
|
||
// op 列表-访客查询
|
||
type OpListByVisitorMidReq struct {
|
||
base.BaseRequest
|
||
Offset int `json:"offset"`
|
||
Limit int `json:"limit"`
|
||
}
|
||
|
||
type OpListByVisitorMidData struct {
|
||
List []*ApiZoneVO `json:"list"`
|
||
Offset int `json:"offset"`
|
||
More int `json:"more"`
|
||
}
|
||
|
||
type OpListByVisitorMidResp struct {
|
||
base.BaseResponse
|
||
Data *OpListByVisitorMidData `json:"data"`
|
||
}
|
||
|
||
// op 列表-mid单查
|
||
type OpListByMidReq struct {
|
||
base.BaseRequest
|
||
Uid *int64 `json:"mid"`
|
||
Offset int `json:"offset"`
|
||
Limit int `json:"limit"`
|
||
}
|
||
|
||
type OpListByMidData struct {
|
||
List []*ApiZoneVO `json:"list"`
|
||
Offset int `json:"offset"`
|
||
More int `json:"more"`
|
||
}
|
||
|
||
type OpListByMidResp struct {
|
||
base.BaseResponse
|
||
Data *OpListByMidData `json:"data"`
|
||
}
|
||
|
||
// op 列表
|
||
type ApiListByUserIdFromOutsideReq struct {
|
||
base.BaseRequest
|
||
UserId int64 `json:"user_id"`
|
||
Offset int `json:"offset"`
|
||
Limit int `json:"limit"`
|
||
}
|
||
|
||
type ApiListByUserIdFromOutsideData struct {
|
||
List []*ApiZoneVO `json:"list"`
|
||
Offset int `json:"offset"`
|
||
More int `json:"more"`
|
||
}
|
||
|
||
type ApiListByUserIdFromOutsideResp struct {
|
||
base.BaseResponse
|
||
Data *ApiListByUserIdFromOutsideData `json:"data"`
|
||
}
|