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"` // 备注 }