init: web_hgdjc_server
This commit is contained in:
@@ -0,0 +1,88 @@
|
||||
package srv_rechargepackage
|
||||
|
||||
import (
|
||||
"time"
|
||||
"videoweb/pub/models/rechargepackagemod"
|
||||
"videoweb/pub/pubdef"
|
||||
)
|
||||
|
||||
// RechargePackageListReq Web后台购买套餐分页列表请求
|
||||
type RechargePackageListReq struct {
|
||||
pubdef.Page
|
||||
Id *int64 `json:"id"` // 套餐ID
|
||||
PackageType *rechargepackagemod.PackageType `json:"packageType"` // 套餐类型:1-会员畅享 2-金币充值
|
||||
Status *rechargepackagemod.Status `json:"status"` // 状态:1-启用 2-停用
|
||||
Name string `json:"name"` // 展示标题,模糊搜索
|
||||
}
|
||||
|
||||
// RechargePackageListResp Web后台购买套餐分页列表响应
|
||||
type RechargePackageListResp struct {
|
||||
Total int64 `json:"total"` // 总数量
|
||||
List []*RechargePackageItem `json:"list"` // 当前页列表
|
||||
}
|
||||
|
||||
// VipPackageOption 会员畅享下拉列表项。
|
||||
type VipPackageOption struct {
|
||||
Id int64 `json:"id"` // 套餐ID
|
||||
Name string `json:"name"` // 套餐名称
|
||||
}
|
||||
|
||||
// RechargePackageItem Web后台购买套餐列表项
|
||||
type RechargePackageItem struct {
|
||||
Id int64 `json:"id"` // 套餐ID
|
||||
PackageType rechargepackagemod.PackageType `json:"packageType"` // 套餐类型:1-会员畅享 2-金币充值
|
||||
Name string `json:"name"` // 展示标题
|
||||
SubTitle string `json:"subTitle"` // 展示副标题
|
||||
Price int64 `json:"price"` // 售价,单位分
|
||||
OriginalPrice int64 `json:"originalPrice"` // 原价,单位分
|
||||
DurationDays int64 `json:"durationDays"` // 会员有效天数
|
||||
DurationHours int64 `json:"durationHours"` // 会员有效小时数,由durationDays计算
|
||||
BaseCoin int64 `json:"baseCoin"` // 基础金币数
|
||||
GiftCoin int64 `json:"giftCoin"` // 赠送金币数
|
||||
TotalCoin int64 `json:"totalCoin"` // 到账总金币数,由baseCoin+giftCoin计算
|
||||
Sort int32 `json:"sort"` // 排序,越小越靠前
|
||||
Status rechargepackagemod.Status `json:"status"` // 状态:1-启用 2-停用
|
||||
Remark string `json:"remark"` // 后台备注
|
||||
CreatedAt time.Time `json:"createdAt"` // 创建时间
|
||||
UpdatedAt time.Time `json:"updatedAt"` // 更新时间
|
||||
}
|
||||
|
||||
// RechargePackageAddReq Web后台新增购买套餐请求
|
||||
type RechargePackageAddReq struct {
|
||||
PackageType rechargepackagemod.PackageType `json:"packageType" binding:"required"` // 套餐类型:1-会员畅享 2-金币充值
|
||||
Name string `json:"name" binding:"required"` // 展示标题
|
||||
Price int64 `json:"price" binding:"required"` // 售价,单位分
|
||||
OriginalPrice int64 `json:"originalPrice"` // 原价,单位分
|
||||
DurationDays int64 `json:"durationDays"` // 会员有效天数,金币套餐传0
|
||||
BaseCoin int64 `json:"baseCoin"` // 基础金币数,会员套餐传0
|
||||
GiftCoin int64 `json:"giftCoin"` // 赠送金币数
|
||||
Sort int32 `json:"sort"` // 排序,越小越靠前
|
||||
Status rechargepackagemod.Status `json:"status"` // 状态:1-启用 2-停用,默认1
|
||||
Remark string `json:"remark"` // 后台备注
|
||||
}
|
||||
|
||||
// RechargePackageUpdateReq Web后台更新购买套餐请求
|
||||
type RechargePackageUpdateReq struct {
|
||||
Id int64 `json:"id" binding:"required"` // 套餐ID
|
||||
PackageType *rechargepackagemod.PackageType `json:"packageType"` // 套餐类型:1-会员畅享 2-金币充值
|
||||
Name *string `json:"name"` // 展示标题
|
||||
Price *int64 `json:"price"` // 售价,单位分
|
||||
OriginalPrice *int64 `json:"originalPrice"` // 原价,单位分
|
||||
DurationDays *int64 `json:"durationDays"` // 会员有效天数
|
||||
BaseCoin *int64 `json:"baseCoin"` // 基础金币数
|
||||
GiftCoin *int64 `json:"giftCoin"` // 赠送金币数
|
||||
Sort *int32 `json:"sort"` // 排序
|
||||
Status *rechargepackagemod.Status `json:"status"` // 状态:1-启用 2-停用
|
||||
Remark *string `json:"remark"` // 后台备注
|
||||
}
|
||||
|
||||
// RechargePackageDelReq Web后台删除购买套餐请求。
|
||||
type RechargePackageDelReq struct {
|
||||
Id int64 `json:"id" binding:"required"` // 套餐ID
|
||||
}
|
||||
|
||||
// RechargePackageStatusSetReq Web后台单/批量设置购买套餐状态请求。
|
||||
type RechargePackageStatusSetReq struct {
|
||||
Ids []int64 `json:"ids"` // 套餐ID集合
|
||||
Status rechargepackagemod.Status `json:"status"` // 状态:1-启用 2-停用
|
||||
}
|
||||
Reference in New Issue
Block a user