telco_server/app/admin/models/bus_models/m_transaction.go

17 lines
1.0 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package bus_models
import "go-admin/app/admin/models"
type BusCooperativeTransaction struct {
models.Model
CooperativeID uint64 `gorm:"not null;index" json:"cooperative_id"` // 关联的合作商ID
TransactionType uint8 `gorm:"type:tinyint(1);not null" json:"transaction_type"` // 交易类型1-加款, 2-减款)
Amount float64 `gorm:"type:decimal(10,3);not null" json:"amount"` // 交易金额
SourceFundingType uint8 `gorm:"not null;index" json:"source_funding_type"` // 资金来源ID关联 BusFundSource
GiftAmount float64 `gorm:"type:decimal(10,2);not null;default:0.00" json:"gift_amount"` // 赠送金额
BalanceBefore float64 `gorm:"type:decimal(10,3);not null" json:"balance_before"` // 交易前余额
BalanceAfter float64 `gorm:"type:decimal(10,3);not null" json:"balance_after"` // 交易后余额
Remark string `gorm:"type:varchar(255)" json:"remark,omitempty"` // 备注
}