feat: 实现平台抽成、提现审批、异步任务集成及安全审计功能
This commit is contained in:
@@ -1688,6 +1688,8 @@ const (
|
||||
OrderTypeContentPurchase OrderType = "content_purchase"
|
||||
// OrderTypeRecharge is a OrderType of type recharge.
|
||||
OrderTypeRecharge OrderType = "recharge"
|
||||
// OrderTypeWithdrawal is a OrderType of type withdrawal.
|
||||
OrderTypeWithdrawal OrderType = "withdrawal"
|
||||
)
|
||||
|
||||
var ErrInvalidOrderType = fmt.Errorf("not a valid OrderType, try [%s]", strings.Join(_OrderTypeNames, ", "))
|
||||
@@ -1695,6 +1697,7 @@ var ErrInvalidOrderType = fmt.Errorf("not a valid OrderType, try [%s]", strings.
|
||||
var _OrderTypeNames = []string{
|
||||
string(OrderTypeContentPurchase),
|
||||
string(OrderTypeRecharge),
|
||||
string(OrderTypeWithdrawal),
|
||||
}
|
||||
|
||||
// OrderTypeNames returns a list of possible string values of OrderType.
|
||||
@@ -1709,6 +1712,7 @@ func OrderTypeValues() []OrderType {
|
||||
return []OrderType{
|
||||
OrderTypeContentPurchase,
|
||||
OrderTypeRecharge,
|
||||
OrderTypeWithdrawal,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1727,6 +1731,7 @@ func (x OrderType) IsValid() bool {
|
||||
var _OrderTypeValue = map[string]OrderType{
|
||||
"content_purchase": OrderTypeContentPurchase,
|
||||
"recharge": OrderTypeRecharge,
|
||||
"withdrawal": OrderTypeWithdrawal,
|
||||
}
|
||||
|
||||
// ParseOrderType attempts to convert a string to a OrderType.
|
||||
@@ -2008,6 +2013,8 @@ const (
|
||||
TenantLedgerTypeDebitPurchase TenantLedgerType = "debit_purchase"
|
||||
// TenantLedgerTypeCreditRefund is a TenantLedgerType of type credit_refund.
|
||||
TenantLedgerTypeCreditRefund TenantLedgerType = "credit_refund"
|
||||
// TenantLedgerTypeCreditWithdrawal is a TenantLedgerType of type credit_withdrawal.
|
||||
TenantLedgerTypeCreditWithdrawal TenantLedgerType = "credit_withdrawal"
|
||||
// TenantLedgerTypeFreeze is a TenantLedgerType of type freeze.
|
||||
TenantLedgerTypeFreeze TenantLedgerType = "freeze"
|
||||
// TenantLedgerTypeUnfreeze is a TenantLedgerType of type unfreeze.
|
||||
@@ -2021,6 +2028,7 @@ var ErrInvalidTenantLedgerType = fmt.Errorf("not a valid TenantLedgerType, try [
|
||||
var _TenantLedgerTypeNames = []string{
|
||||
string(TenantLedgerTypeDebitPurchase),
|
||||
string(TenantLedgerTypeCreditRefund),
|
||||
string(TenantLedgerTypeCreditWithdrawal),
|
||||
string(TenantLedgerTypeFreeze),
|
||||
string(TenantLedgerTypeUnfreeze),
|
||||
string(TenantLedgerTypeAdjustment),
|
||||
@@ -2038,6 +2046,7 @@ func TenantLedgerTypeValues() []TenantLedgerType {
|
||||
return []TenantLedgerType{
|
||||
TenantLedgerTypeDebitPurchase,
|
||||
TenantLedgerTypeCreditRefund,
|
||||
TenantLedgerTypeCreditWithdrawal,
|
||||
TenantLedgerTypeFreeze,
|
||||
TenantLedgerTypeUnfreeze,
|
||||
TenantLedgerTypeAdjustment,
|
||||
@@ -2057,11 +2066,12 @@ func (x TenantLedgerType) IsValid() bool {
|
||||
}
|
||||
|
||||
var _TenantLedgerTypeValue = map[string]TenantLedgerType{
|
||||
"debit_purchase": TenantLedgerTypeDebitPurchase,
|
||||
"credit_refund": TenantLedgerTypeCreditRefund,
|
||||
"freeze": TenantLedgerTypeFreeze,
|
||||
"unfreeze": TenantLedgerTypeUnfreeze,
|
||||
"adjustment": TenantLedgerTypeAdjustment,
|
||||
"debit_purchase": TenantLedgerTypeDebitPurchase,
|
||||
"credit_refund": TenantLedgerTypeCreditRefund,
|
||||
"credit_withdrawal": TenantLedgerTypeCreditWithdrawal,
|
||||
"freeze": TenantLedgerTypeFreeze,
|
||||
"unfreeze": TenantLedgerTypeUnfreeze,
|
||||
"adjustment": TenantLedgerTypeAdjustment,
|
||||
}
|
||||
|
||||
// ParseTenantLedgerType attempts to convert a string to a TenantLedgerType.
|
||||
|
||||
@@ -402,7 +402,7 @@ func ContentAccessStatusItems() []requests.KV {
|
||||
// orders
|
||||
|
||||
// swagger:enum OrderType
|
||||
// ENUM( content_purchase, recharge )
|
||||
// ENUM( content_purchase, recharge, withdrawal )
|
||||
type OrderType string
|
||||
|
||||
// Description returns the Chinese label for the specific enum value.
|
||||
@@ -412,6 +412,8 @@ func (t OrderType) Description() string {
|
||||
return "购买内容"
|
||||
case OrderTypeRecharge:
|
||||
return "充值"
|
||||
case OrderTypeWithdrawal:
|
||||
return "提现"
|
||||
default:
|
||||
return "未知类型"
|
||||
}
|
||||
@@ -464,7 +466,7 @@ func OrderStatusItems() []requests.KV {
|
||||
// tenant_ledgers
|
||||
|
||||
// swagger:enum TenantLedgerType
|
||||
// ENUM( debit_purchase, credit_refund, freeze, unfreeze, adjustment )
|
||||
// ENUM( debit_purchase, credit_refund, credit_withdrawal, freeze, unfreeze, adjustment )
|
||||
type TenantLedgerType string
|
||||
|
||||
// Description returns the Chinese label for the specific enum value.
|
||||
@@ -474,6 +476,8 @@ func (t TenantLedgerType) Description() string {
|
||||
return "购买扣款"
|
||||
case TenantLedgerTypeCreditRefund:
|
||||
return "退款回滚"
|
||||
case TenantLedgerTypeCreditWithdrawal:
|
||||
return "提现扣款"
|
||||
case TenantLedgerTypeFreeze:
|
||||
return "冻结"
|
||||
case TenantLedgerTypeUnfreeze:
|
||||
|
||||
Reference in New Issue
Block a user