feat: add payout account review flow
This commit is contained in:
29
backend/pkg/consts/payout_account.go
Normal file
29
backend/pkg/consts/payout_account.go
Normal file
@@ -0,0 +1,29 @@
|
||||
package consts
|
||||
|
||||
import "quyun/v2/app/requests"
|
||||
|
||||
// swagger:enum PayoutAccountStatus
|
||||
// ENUM( pending, approved, rejected )
|
||||
type PayoutAccountStatus string
|
||||
|
||||
func (t PayoutAccountStatus) Description() string {
|
||||
switch t {
|
||||
case PayoutAccountStatusPending:
|
||||
return "待审核"
|
||||
case PayoutAccountStatusApproved:
|
||||
return "已通过"
|
||||
case PayoutAccountStatusRejected:
|
||||
return "已驳回"
|
||||
default:
|
||||
return "未知状态"
|
||||
}
|
||||
}
|
||||
|
||||
func PayoutAccountStatusItems() []requests.KV {
|
||||
values := PayoutAccountStatusValues()
|
||||
items := make([]requests.KV, 0, len(values))
|
||||
for _, v := range values {
|
||||
items = append(items, requests.NewKV(string(v), v.Description()))
|
||||
}
|
||||
return items
|
||||
}
|
||||
Reference in New Issue
Block a user