25 lines
1.6 KiB
Go
25 lines
1.6 KiB
Go
|
|
package model
|
|||
|
|
|
|||
|
|
import "time"
|
|||
|
|
|
|||
|
|
// Withdrawal 对应表 withdrawals
|
|||
|
|
type Withdrawal struct {
|
|||
|
|
ID string `gorm:"column:id;primaryKey;size:50" json:"id"`
|
|||
|
|
UserID string `gorm:"column:user_id;size:50" json:"userId"`
|
|||
|
|
Amount float64 `gorm:"column:amount;type:decimal(10,2)" json:"amount"`
|
|||
|
|
Status *string `gorm:"column:status;size:20" json:"status"`
|
|||
|
|
WechatID *string `gorm:"column:wechat_id;size:100" json:"wechatId"`
|
|||
|
|
WechatOpenid *string `gorm:"column:wechat_openid;size:100" json:"wechatOpenid"`
|
|||
|
|
BatchNo *string `gorm:"column:batch_no;size:100" json:"batchNo,omitempty"` // 商家批次单号
|
|||
|
|
DetailNo *string `gorm:"column:detail_no;size:100" json:"detailNo,omitempty"` // 商家明细单号
|
|||
|
|
BatchID *string `gorm:"column:batch_id;size:100" json:"batchId,omitempty"` // 微信批次单号
|
|||
|
|
PackageInfo *string `gorm:"column:package_info;size:500" json:"packageInfo,omitempty"` // 微信返回的 package_info,供小程序 wx.requestMerchantTransfer
|
|||
|
|
Remark *string `gorm:"column:remark;size:200" json:"remark,omitempty"` // 提现备注
|
|||
|
|
FailReason *string `gorm:"column:fail_reason;size:500" json:"failReason,omitempty"` // 失败原因
|
|||
|
|
UserConfirmedAt *time.Time `gorm:"column:user_confirmed_at" json:"userConfirmedAt,omitempty"` // 用户点击「确认收款」时间
|
|||
|
|
CreatedAt time.Time `gorm:"column:created_at" json:"createdAt"`
|
|||
|
|
ProcessedAt *time.Time `gorm:"column:processed_at" json:"processedAt"`
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
func (Withdrawal) TableName() string { return "withdrawals" }
|