You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
96 lines
2.9 KiB
96 lines
2.9 KiB
package vo
|
|
|
|
import (
|
|
"time"
|
|
|
|
"laic-backend/common"
|
|
)
|
|
|
|
// ProfileVO 账户资料
|
|
type ProfileVO struct {
|
|
ID int64 `json:"id"`
|
|
Name string `json:"name"`
|
|
Phone string `json:"phone"`
|
|
Email string `json:"email"`
|
|
Role string `json:"role"`
|
|
Status int8 `json:"status"`
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
UpdatedAt time.Time `json:"updatedAt"`
|
|
}
|
|
|
|
// ProfileUpdateReq 更新个人资料
|
|
type ProfileUpdateReq struct {
|
|
Name string `json:"name" validate:"max=32"`
|
|
Email string `json:"email" validate:"omitempty,email"`
|
|
}
|
|
|
|
// TrafficBalanceVO 云媒体流量余额(Redis 权威,字节为基准)
|
|
type TrafficBalanceVO struct {
|
|
BalanceBytes int64 `json:"balanceBytes"`
|
|
BalanceGb float64 `json:"balanceGb"`
|
|
}
|
|
|
|
// UsagePageReq 流量消费流水分页
|
|
type UsagePageReq struct {
|
|
common.Pagination
|
|
SourceType string `json:"sourceType" form:"sourceType"` // live / replay / download
|
|
}
|
|
|
|
// OrderPageReq 流量订单分页
|
|
type OrderPageReq struct {
|
|
common.Pagination
|
|
PayStatus string `json:"payStatus" form:"payStatus"` // unpaid / paid
|
|
}
|
|
|
|
// TrafficOrderCreateReq 创建流量充值订单
|
|
type TrafficOrderCreateReq struct {
|
|
AmountGb int64 `json:"amountGb" validate:"omitempty,min=1"`
|
|
PackageID int64 `json:"packageId" validate:"omitempty,gt=0"`
|
|
}
|
|
|
|
type PaymentCreateReq struct {
|
|
BusinessType string `json:"businessType" validate:"required,oneof=traffic_order sim_recharge_order"`
|
|
BusinessOrderID int64 `json:"businessOrderId" validate:"required,gt=0"`
|
|
}
|
|
|
|
type PaymentCreateVO struct {
|
|
TransactionID int64 `json:"transactionId"`
|
|
BusinessType string `json:"businessType"`
|
|
BusinessOrderID int64 `json:"businessOrderId"`
|
|
Provider string `json:"provider"`
|
|
MerchantOrderNo string `json:"merchantOrderNo"`
|
|
TotalFeeFen int64 `json:"totalFeeFen"`
|
|
Status string `json:"status"`
|
|
ProviderPayload string `json:"providerPayload,omitempty"`
|
|
CallbackEnabled bool `json:"callbackEnabled"`
|
|
}
|
|
|
|
type PaymentTransactionVO struct {
|
|
ID int64 `json:"id"`
|
|
BusinessType string `json:"businessType"`
|
|
BusinessOrderID int64 `json:"businessOrderId"`
|
|
Provider string `json:"provider"`
|
|
MerchantOrderNo string `json:"merchantOrderNo"`
|
|
TotalFeeFen int64 `json:"totalFeeFen"`
|
|
Status string `json:"status"`
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
PaidAt *time.Time `json:"paidAt"`
|
|
}
|
|
|
|
// SimCardPageReq SIM 卡分页
|
|
type SimCardPageReq struct {
|
|
common.Pagination
|
|
Status string `json:"status" form:"status"` // active / expired
|
|
}
|
|
|
|
// SimRechargeLogPageReq SIM 卡充值记录分页
|
|
type SimRechargeLogPageReq struct {
|
|
common.Pagination
|
|
SimCardID int64 `json:"simCardId" form:"simCardId"`
|
|
RechargeStatus string `json:"rechargeStatus" form:"rechargeStatus"`
|
|
}
|
|
|
|
// SimRechargeReq SIM 卡续费订单
|
|
type SimRechargeReq struct {
|
|
PackageID int64 `json:"packageId" validate:"required,gt=0"`
|
|
}
|
|
|