chore: 同步管理端构建与余额模块调整
- 更新 soul-admin dist 构建产物 - 调整 soul-api balance 路由与模型文件 Made-with: Cursor
This commit is contained in:
@@ -1,24 +0,0 @@
|
||||
package model
|
||||
|
||||
import "time"
|
||||
|
||||
// UserBalance 对应表 user_balances
|
||||
type UserBalance struct {
|
||||
UserID string `gorm:"column:user_id;primaryKey;size:50"`
|
||||
Balance float64 `gorm:"column:balance;type:decimal(10,2);default:0"`
|
||||
UpdatedAt time.Time `gorm:"column:updated_at"`
|
||||
}
|
||||
|
||||
func (UserBalance) TableName() string { return "user_balances" }
|
||||
|
||||
// BalanceTransaction 对应表 balance_transactions
|
||||
type BalanceTransaction struct {
|
||||
ID string `gorm:"column:id;primaryKey;size:50"`
|
||||
UserID string `gorm:"column:user_id;size:50"`
|
||||
Type string `gorm:"column:type;size:20"` // recharge, consume, refund, gift
|
||||
Amount float64 `gorm:"column:amount;type:decimal(10,2)"`
|
||||
OrderID *string `gorm:"column:order_id;size:50"`
|
||||
CreatedAt time.Time `gorm:"column:created_at"`
|
||||
}
|
||||
|
||||
func (BalanceTransaction) TableName() string { return "balance_transactions" }
|
||||
Reference in New Issue
Block a user