fix(wallet): enforce consistent withdrawal accounting

This commit is contained in:
david
2026-07-31 09:54:17 +08:00
parent 36a5ced1c0
commit 42a2322c8e
23 changed files with 1405 additions and 250 deletions

View File

@@ -25,6 +25,7 @@ type WalletApplyCash struct {
ReviewedAt *time.Time `gorm:"column:reviewed_at;type:timestamptz" json:"reviewed_at"` // 审核时间
ReviewReason string `gorm:"column:review_reason;type:text;not null;default:''" json:"review_reason"` // 审核原因
CompletedAt *time.Time `gorm:"column:completed_at;type:timestamptz" json:"completed_at"` // 完成时间
BalanceReserved bool `gorm:"column:balance_reserved;not null;default:false;index" json:"balance_reserved"` // 是否已在申请时同时预扣总余额和可提现余额
}
func init() { database.AppendMigrate(&WalletApplyCash{}) }