Files
full/module/finance/wallet/internal/models/wallet_payment.go

41 lines
2.2 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.
// Models generated by mesh dev cli,@Author: David Yan(david.yan@qq.com).
package models
import (
"git.apinb.com/bsm-sdk/core/database"
"git.apinb.com/bsm-sdk/core/types"
"gorm.io/gorm"
)
/*
* WalletPayment
* Comment: 支付记录表
* Version: 10
* Created: 2022-04-14 22:19:57 , Updated:0001-01-01 00:00:00
*/
type WalletPayment struct {
gorm.Model
types.Std_Identity
types.Std_Passport
WalletIdentity string `gorm:"column:wallet_identity;type:varchar(36);not null;" json:"wallet_identity"` // 钱包唯一码
OrderNo string `gorm:"column:order_no;type:varchar(255);not null;" json:"order_no"` // 订单号
TradeNo string `gorm:"column:trade_no;type:varchar(255);default:'';" json:"trade_no"` // 第三方交易流水号(创建时可为空,回调后更新)
Type int8 `gorm:"column:type;default:0;" json:"type"` // 类型:1充值;2支付电商订单
PayChannel int8 `gorm:"column:pay_channel;default:0;" json:"pay_channel"` // 方式 1:微信 2:支付宝 3:银行卡
PayType string `gorm:"column:pay_type;type:varchar(255);not null;" json:"pay_type"` // 支付类型 JSAPI:微信浏览器内支付 APP:app支付 MINI:小程序 NATIVE:Native支付,pc端生成二维码供用户扫码支付,QUICK_MSECURITY_PAY:app支付 QUICK_WAP_WAY:手机网站支付 FAST_INSTANT_TRADE_PAY:pc网站支付
Amount int64 `gorm:"column:amount;default:0;" json:"amount"` // 金额,单位分
Args string `gorm:"column:args;type:varchar(255);default:'';" json:"args"` // 相关参数
Remark string `gorm:"column:remark;type:varchar(255);default:'';" json:"remark"` // 备注
CallBackMsg string `gorm:"column:callback_msg;type:varchar(255);default:'';" json:"callback_msg"` // 支付回调信息
types.Std_Status // 支付状态:-3手动取消-2超时自动取消-1支付失败0创建1支付中2支付成功
}
func init() {
database.AppendMigrate(&WalletPayment{})
}
// TableName .
func (table *WalletPayment) TableName() string {
return "wallet_payment" //对应数据库表名
}