Files
rootandClaude Opus 5 8679200f41 Initial commit
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-15 13:57:10 +08:00

52 lines
2.7 KiB
Go

package rchgchanmod
import "time"
// ChannelReq 新增支付渠道
type ChannelReq struct {
ChannelName string `form:"channelName" json:"channelName"` //支付渠道名字
CID string `form:"cid" json:"cid"` //渠道id
PayType string `form:"payType" json:"payType"` //支付方式
MinMoney int `form:"minMoney,omitempty" json:"minMoney,omitempty"` //支持最小支付金额
MaxMoney int `form:"maxMoney,omitempty" json:"maxMoney,omitempty"` //支持最大支付金额
Weight int `form:"weight" json:"weight"` //权重
Active bool `json:"active" bson:"active"` //是否激活
Rate string `json:"rate" bson:"rate"` //渠道费率
ActivePeriod string `json:"activePeriod" bson:"activePeriod"` //激活时间段 6-23,7-5
Category CATTEGORY `json:"category,omitempty" bson:"category,omitempty"` //金额类别 固定 fixed 活动 active
AmountTypes []int64 `json:"amountTypes,omitempty" bson:"amountTypes,omitempty"` //金额种类
}
// EditInfo 支付渠道编辑
type EditInfo struct {
ChannelName *string `json:"channelName,omitempty" bson:"channelName,omitempty"` //支付渠道名字
CID *string `json:"cid,omitempty" bson:"cid,omitempty"` //渠道id
PayType *string `bson:"payType,omitempty" json:"payType,omitempty"` //支付方式
MinMoney *int `bson:"minMoney,omitempty" json:"minMoney,omitempty"` //支持最小支付金额
MaxMoney *int `bson:"maxMoney,omitempty" json:"maxMoney,omitempty"` //支持最大支付金额
Weight *int `bson:"weight,omitempty" json:"weight,omitempty"` //权重
Active *bool `json:"active,omitempty" bson:"active,omitempty"` //是否激活
Rate *string `json:"rate,omitempty" bson:"rate,omitempty"` //通道费率
ActivePeriod *string `json:"activePeriod,omitempty" bson:"activePeriod,omitempty"` //激活时间段 6-23,7-5
Category *CATTEGORY `json:"category,omitempty" bson:"category,omitempty"` //金额类别 固定 fixed 活动 active
AmountTypes *([]int64) `json:"amountTypes,omitempty" bson:"amountTypes,omitempty"` //金额种类
UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt"`
}
// EditReq 渠道编辑请求
type EditReq struct {
ID string `form:"id" json:"id"`
EditInfo
}
// DelReq 删除请求
type DelReq struct {
IDs []string `form:"ids" json:"ids"`
}
// OpeResp 操作应答
type OpeResp struct {
Count int64 `json:"count"`
}