You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
2.5 KiB
29 lines
2.5 KiB
package model
|
|
|
|
import "time"
|
|
|
|
type Bill struct {
|
|
BaseModel
|
|
Appid string `gorm:"size:20" json:"appid"` // appid
|
|
Mchid string `gorm:"size:20" json:"mchid"` // 商家id
|
|
TerminalType string `gorm:"type:enum('WEB','WAP','APP');" json:"terminalType"` // 设备类型
|
|
OsType string `gorm:"type:enum('WINDOWS','MAC','IOS','ANDROID');" json:"osType"` // 操作系统
|
|
OutTradeNo string `gorm:"size:50" json:"outTradeNo"` // 商户订单号
|
|
TransactionId string `gorm:"unique;size:50" json:"transactionId"` // 交易订单号
|
|
TradeType string `gorm:"size:10" json:"tradeType"` // 交易类型 PAY:支付 PAYOUT:提现 REFUND:退款
|
|
TradeState string `gorm:"type:enum('ING','SUCCESS','REFUND','CLOSED');default:'ING'" json:"tradeState"` // 交易状态 ING:未支付 SUCCESS:支付成功 REFUND:已退款 CLOSED:已关闭
|
|
PayChannel string `gorm:"size:10" json:"payChannel"` // 支付渠道 paypal alipay-g
|
|
PayId string `gorm:"size:100" json:"payId"` // 支付渠道对应的支付id
|
|
Currency string `gorm:"size:3" json:"currency"` // 支付单位
|
|
Amount float64 `gorm:"type:decimal(10,2)" json:"amount"` // 支付金额
|
|
InstCode string `gorm:"size:10" json:"instCode"` // 银行机构编码
|
|
BankSerialNo string `gorm:"size:32" json:"bankSerialNo"` // 银行流水号
|
|
PayTime *time.Time `gorm:"column:pay_time" json:"-"` // 支付成功时间
|
|
PayAccount string `gorm:"size:100" json:"pay_account"` // 支付/收款账号
|
|
PayUserId string `gorm:"size:50" json:"payUserId"` // 支付用户id 每个appid下唯一
|
|
PaymentMethod string `gorm:"size:50" json:"paymentMethod"` // 支付方式
|
|
}
|
|
|
|
func (Bill) TableName() string {
|
|
return "bill"
|
|
}
|
|
|