Files
shop-user-trade/model/entity/wallet/wallet_log.go
2026-04-02 10:22:36 +08:00

25 lines
1.4 KiB
Go

package entity
import (
walletConsts "shop-user-trade/consts/wallet"
"gitea.com/red-future/common/beans"
)
// WalletLog 钱包操作日志实体
type WalletLog struct {
beans.SQLBaseDO `orm:",inherit"`
UserID int64 `orm:"user_id" json:"userId,string" description:"用户ID"`
WalletID int64 `orm:"wallet_id" json:"walletId,string" description:"钱包ID"`
OrderNo string `orm:"order_no" json:"orderNo" description:"业务订单号"`
TransactionNo string `orm:"transaction_no" json:"transactionNo" description:"钱包交易流水号"`
Type walletConsts.WalletLogType `orm:"type" json:"type" description:"操作类型"`
Amount int64 `orm:"amount" json:"amount" description:"金额(分)"`
BalanceBefore int64 `orm:"balance_before" json:"balanceBefore" description:"操作前余额"`
BalanceAfter int64 `orm:"balance_after" json:"balanceAfter" description:"操作后余额"`
Currency string `orm:"currency" json:"currency" description:"货币类型"`
Description string `orm:"description" json:"description" description:"描述"`
ExtraData map[string]interface{} `orm:"extra_data" json:"extraData" description:"额外数据(JSONB)"`
}