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.
38 lines
929 B
38 lines
929 B
package model
|
|
|
|
import (
|
|
"github.com/shopspring/decimal"
|
|
"time"
|
|
)
|
|
|
|
const (
|
|
OrderPartnerStatusUnPay = 1 // 待付款
|
|
OrderPartnerStatusPay = 2 // 付款成功
|
|
OrderPartnerKindJoin = 1 // 加入
|
|
OrderPartnerKindDelay = 2 // 续费
|
|
)
|
|
|
|
func (*OrderPartner) GetStatusName(status uint) (result string) {
|
|
switch status {
|
|
case OrderPartnerStatusUnPay:
|
|
return "待付款"
|
|
case OrderPartnerStatusPay:
|
|
return "付款成功"
|
|
default:
|
|
return "未知"
|
|
}
|
|
}
|
|
|
|
type OrderPartner struct {
|
|
Id uint `gorm:"primaryKey"`
|
|
OrderSn string // 订单编号
|
|
BrokerId uint // 经纪人id
|
|
Kind uint // 业务类型 1=加入 2=续费
|
|
ContractId uint // 合同id
|
|
Amount decimal.Decimal // 金额
|
|
PayType uint // 付款类型
|
|
Status uint // 订单状态 1=待付款 2=付款成功
|
|
CreatedAt time.Time
|
|
UpdatedAt time.Time
|
|
}
|