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.
72 lines
2.3 KiB
72 lines
2.3 KiB
package vo
|
|
|
|
import (
|
|
"time"
|
|
|
|
"laic-backend/common"
|
|
)
|
|
|
|
type PlatformPurchaseCreateReq struct {
|
|
BatchNo string `json:"batchNo" validate:"required,max=64"`
|
|
Provider string `json:"provider" validate:"required,max=32"`
|
|
TotalBytes int64 `json:"totalBytes" validate:"required,gt=0"`
|
|
UnitCost float64 `json:"unitCost"`
|
|
TotalCost float64 `json:"totalCost"`
|
|
ExpiresAt *time.Time `json:"expiresAt"`
|
|
Remark string `json:"remark" validate:"max=256"`
|
|
}
|
|
|
|
// TrafficTestGrantReq is an admin-only test helper for crediting a regular
|
|
// user's cloud-media balance without creating a payment order.
|
|
type TrafficTestGrantReq struct {
|
|
UserID int64 `json:"userId" validate:"required,gt=0"`
|
|
AmountGb int64 `json:"amountGb" validate:"required,gt=0"`
|
|
Reason string `json:"reason" validate:"max=256"`
|
|
}
|
|
|
|
type PlatformPurchasePageReq struct {
|
|
common.Pagination
|
|
Status string `json:"status" form:"status"`
|
|
Provider string `json:"provider" form:"provider"`
|
|
Keyword string `json:"keyword" form:"keyword"`
|
|
}
|
|
|
|
type TrafficPackageCreateReq struct {
|
|
Code string `json:"code" validate:"required,max=64"`
|
|
Name string `json:"name" validate:"required,max=128"`
|
|
AmountBytes int64 `json:"amountBytes" validate:"required,gt=0"`
|
|
Price float64 `json:"price" validate:"gte=0"`
|
|
ValidityDays int `json:"validityDays" validate:"gte=0"`
|
|
Sort int `json:"sort"`
|
|
}
|
|
|
|
type TrafficPackageUpdateReq struct {
|
|
Name string `json:"name" validate:"max=128"`
|
|
AmountBytes int64 `json:"amountBytes" validate:"gt=0"`
|
|
Price float64 `json:"price" validate:"gte=0"`
|
|
ValidityDays int `json:"validityDays" validate:"gte=0"`
|
|
Status string `json:"status"`
|
|
Sort int `json:"sort"`
|
|
}
|
|
|
|
type TrafficPackagePageReq struct {
|
|
common.Pagination
|
|
Status string `json:"status" form:"status"`
|
|
}
|
|
|
|
type TrafficPackageVO struct {
|
|
ID int64 `json:"id"`
|
|
Code string `json:"code"`
|
|
Name string `json:"name"`
|
|
AmountBytes int64 `json:"amountBytes"`
|
|
Price float64 `json:"price"`
|
|
ValidityDays int `json:"validityDays"`
|
|
Sort int `json:"sort"`
|
|
}
|
|
|
|
type TrafficLedgerPageReq struct {
|
|
common.Pagination
|
|
AccountType string `json:"accountType" form:"accountType"`
|
|
AccountID int64 `json:"accountId" form:"accountId"`
|
|
SourceType string `json:"sourceType" form:"sourceType"`
|
|
}
|
|
|