feat: 完善平台总后台模块
This commit is contained in:
16
backend/api/internal/models/wallet_ledger.go
Normal file
16
backend/api/internal/models/wallet_ledger.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package models
|
||||
|
||||
import "git.apinb.com/bsm-sdk/core/database"
|
||||
|
||||
// WalletLedger 对应 wallet_ledger,保存不可变资金流水。
|
||||
type WalletLedger struct {
|
||||
Entity
|
||||
WalletID uint64 `gorm:"column:wallet_id;not null;index" json:"wallet_id"`
|
||||
Amount int64 `gorm:"column:amount;not null" json:"amount"`
|
||||
Direction string `gorm:"column:direction;type:varchar(16);not null" json:"direction"`
|
||||
BalanceAfter int64 `gorm:"column:balance_after;not null" json:"balance_after"`
|
||||
ReferenceIdentity string `gorm:"column:reference_identity;type:varchar(36);not null;default:'';index" json:"reference_identity"`
|
||||
}
|
||||
|
||||
func init() { database.AppendMigrate(&WalletLedger{}) }
|
||||
func (table *WalletLedger) TableName() string { return "wallet_ledger" }
|
||||
Reference in New Issue
Block a user