Files
hfb_sys/backend/internal/model/withdrawal.go
T
yml2213 e024319860 feat(distribution): 分销站点消息中心与钱包提现多租户独立分支隔离
- 新增 000070 数据库迁移:支持 chat_conversations、wallet_accounts、wallet_ledger、withdrawal_requests 按 distribution_site_id 隔离
- 消息中心:会话列表、未读数统计、站点专属客服及订单群聊与主站实现双向完全隔离
- 资金账户与提现:独立按 (user_id, distribution_site_id) 建账,分销订单自动结算至对应分站钱包,提现与流水相互独立
- 前台界面:Axios 自动透传 X-Distribution-Site-Code,钱包、提现与消息页面呈现分站专属标牌与独立说明
2026-09-07 18:11:27 +08:00

34 lines
1.8 KiB
Go

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:idx_withdrawal_user_site" json:"user_id"`
DistributionSiteID uint64 `gorm:"not null;default:0;index:idx_withdrawal_user_site" json:"distribution_site_id"`
AmountCent int64 `gorm:"not null;default:0" json:"-"`
FeeCent int64 `gorm:"not null;default:0" json:"-"`
ActualAmountCent int64 `gorm:"not null;default:0" json:"-"`
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"
}