新增几大中心功能

This commit is contained in:
Administrator
2026-04-23 15:29:07 +08:00
parent 5c2a146a44
commit c6354ee065
123 changed files with 13074 additions and 229 deletions

View File

@@ -0,0 +1,48 @@
package app
import "time"
type AppWithdrawOrderStatus string
const (
AppWithdrawOrderStatusPending AppWithdrawOrderStatus = "pending" // 已提交,待审核
AppWithdrawOrderStatusApproved AppWithdrawOrderStatus = "approved" // 已审核通过,待打款
AppWithdrawOrderStatusRejected AppWithdrawOrderStatus = "rejected" // 审核拒绝(已解冻)
AppWithdrawOrderStatusPaid AppWithdrawOrderStatus = "paid" // 已打款(余额已扣减)
AppWithdrawOrderStatusFailed AppWithdrawOrderStatus = "failed" // 打款失败(已解冻)
)
// AppWithdrawOrder 提现订单(金额单位:厘)
type AppWithdrawOrder struct {
ID uint `json:"id" gorm:"primaryKey"`
AppUserID uint `json:"appUserId" gorm:"index;not null;comment:玩家ID"`
Username string `json:"username" gorm:"size:64;index;not null;comment:用户名快照"`
AmountLi int64 `json:"amountLi" gorm:"not null;comment:提现金额(厘)"`
FeeLi int64 `json:"feeLi" gorm:"not null;default:0;comment:手续费(厘)"`
NetLi int64 `json:"netLi" gorm:"not null;comment:实际打款金额(厘)"`
Status AppWithdrawOrderStatus `json:"status" gorm:"type:varchar(16);index;not null;default:'pending'"`
Channel string `json:"channel" gorm:"size:32;comment:打款渠道(预留)"`
PayeeAccount string `json:"payeeAccount" gorm:"size:128;comment:收款账号(脱敏/快照)"`
PayeeRealName string `json:"payeeRealName" gorm:"size:64;comment:收款人(快照)"`
ApplyRemark string `json:"applyRemark" gorm:"size:255;comment:申请备注(预留)"`
AuditRemark string `json:"auditRemark" gorm:"size:255;comment:审核备注"`
RejectReason string `json:"rejectReason" gorm:"size:255;comment:拒绝原因"`
FailureReason string `json:"failureReason" gorm:"size:255;comment:打款失败原因"`
ExternalTxID string `json:"externalTxId" gorm:"size:128;index;comment:外部流水号(预留)"`
OperatorUserID uint `json:"operatorUserId" gorm:"index;not null;comment:创建/最近操作人ID"`
ApprovedBy uint `json:"approvedBy" gorm:"index;comment:审核人ID"`
ApprovedAt *time.Time `json:"approvedAt" gorm:"index"`
PaidBy uint `json:"paidBy" gorm:"index;comment:打款确认人ID"`
PaidAt *time.Time `json:"paidAt" gorm:"index"`
CreatedAt time.Time `json:"createdAt" gorm:"index"`
UpdatedAt time.Time `json:"updatedAt"`
}
func (AppWithdrawOrder) TableName() string { return "app_withdraw_orders" }