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.
51 lines
1.8 KiB
51 lines
1.8 KiB
package user
|
|
|
|
import (
|
|
"github.com/golangkit/formatime"
|
|
"github.com/shopspring/decimal"
|
|
)
|
|
|
|
type Withdraw struct {
|
|
ID int64 `gorm:"column:id" json:"id" form:"id"`
|
|
UserId uint `gorm:"column:user_id" json:"user_id" form:"userId"`
|
|
UserName string `gorm:"column:user_name" json:"user_name" form:"userName"`
|
|
Type int64 `gorm:"column:type" json:"type"`
|
|
Amount float64 `gorm:"column:amount" json:"amount" form:"amount"`
|
|
Alipay string `gorm:"column:alipay" json:"alipay" form:"alipay"`
|
|
BankAccount string `gorm:"column:bank_account" json:"bank_account" form:"bankAccount"`
|
|
BankName string `gorm:"column:bank_name" json:"bank_name" form:"bankName"`
|
|
Status int64 `gorm:"column:status" json:"status" form:"status"`
|
|
AuditTime formatime.Second `gorm:"column:audit_time" json:"auditTime"`
|
|
DoneTime formatime.Second `gorm:"column:done_time" json:"doneTime"`
|
|
CreatedAt formatime.Second `gorm:"column:created_at" json:"created_at" form:"createdAt"`
|
|
WaitStatus int64
|
|
UserTrueName string `gorm:"-" json:"user_true_name"`
|
|
UserTrueNo string `gorm:"-" json:"user_true_no"`
|
|
UserPhone string `gorm:"-" json:"user_phone"`
|
|
FailReason string `gorm:"fail_reason" json:"failReason"`
|
|
TaxFee decimal.Decimal `json:"tax_fee"`
|
|
ActualAmount decimal.Decimal `json:"actual_amount"`
|
|
}
|
|
|
|
const (
|
|
UndoneWithdrawStatus = 1
|
|
DoneWithdrawStatus = 2
|
|
|
|
AlipayType = 1
|
|
BankType = 2
|
|
)
|
|
|
|
var WithdrawTypeMap = map[string]int64{
|
|
"alipay": AlipayType,
|
|
"bank": BankType,
|
|
}
|
|
|
|
var WithdrawStatusMap = map[string]int64{
|
|
"undone": UndoneWithdrawStatus,
|
|
"done": DoneWithdrawStatus,
|
|
}
|
|
|
|
func (w *Withdraw) TableName() string {
|
|
return "recook_user_withdraw"
|
|
}
|