后端提现增加

This commit is contained in:
yml
2026-06-06 10:08:39 +08:00
parent 082fd908e9
commit 8a2d2f2a18
15 changed files with 2763 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
package model
import (
"time"
"gorm.io/datatypes"
)
type UserPaymentAccount struct {
ID uint64 `gorm:"primaryKey" json:"id"`
UserID uint64 `gorm:"not null;index" json:"user_id"`
AccountType string `gorm:"size:32;not null" json:"account_type"`
AccountName string `gorm:"size:128;not null" json:"account_name"`
AccountNo string `gorm:"size:255;not null" json:"account_no"`
BankName string `gorm:"size:128;not null;default:''" json:"bank_name"`
BankBranch string `gorm:"size:255;not null;default:''" json:"bank_branch"`
CertificateURLs datatypes.JSON `json:"certificate_urls"`
IsDefault bool `gorm:"not null;default:0" json:"is_default"`
Status string `gorm:"size:32;not null;default:'active'" json:"status"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
func (UserPaymentAccount) TableName() string {
return "user_payment_accounts"
}
+32
View File
@@ -0,0 +1,32 @@
package model
import "time"
type WithdrawalRequest struct {
ID uint64 `gorm:"primaryKey" json:"id"`
WithdrawNo string `gorm:"size:64;not null;uniqueIndex" json:"withdraw_no"`
UserID uint64 `gorm:"not null;index" json:"user_id"`
Amount float64 `gorm:"type:decimal(12,2);not null" json:"amount"`
Fee float64 `gorm:"type:decimal(12,2);not null;default:0.00" json:"fee"`
ActualAmount float64 `gorm:"type:decimal(12,2);not null" json:"actual_amount"`
PaymentAccountID *uint64 `json:"payment_account_id"`
AccountType string `gorm:"size:32;not null" json:"account_type"`
AccountName string `gorm:"size:128;not null" json:"account_name"`
AccountNo string `gorm:"size:128;not null" json:"account_no"`
BankName string `gorm:"size:128;not null;default:''" json:"bank_name"`
BankBranch string `gorm:"size:255;not null;default:''" json:"bank_branch"`
Status string `gorm:"size:32;not null;default:'pending'" json:"status"`
ReviewedBy *uint64 `json:"reviewed_by"`
ReviewedAt *time.Time `json:"reviewed_at"`
ReviewRemark string `gorm:"size:255;not null;default:''" json:"review_remark"`
PaidBy *uint64 `json:"paid_by"`
PaidAt *time.Time `json:"paid_at"`
PaymentProofURL string `gorm:"size:512;not null;default:''" json:"payment_proof_url"`
PaymentRemark string `gorm:"size:255;not null;default:''" json:"payment_remark"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
func (WithdrawalRequest) TableName() string {
return "withdrawal_requests"
}