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.
49 lines
1.3 KiB
49 lines
1.3 KiB
8 months ago
|
package model
|
||
|
|
||
|
import (
|
||
|
"gorm.io/gorm"
|
||
|
"time"
|
||
|
)
|
||
|
|
||
|
const (
|
||
|
DealerStatusEnabled = 1 // 启用
|
||
|
DealerStatusDisabled = 2 // 停用
|
||
|
)
|
||
|
|
||
|
func (*Dealer) GetStatusName(status uint) (result string) {
|
||
|
switch status {
|
||
|
case 1:
|
||
|
return "启用"
|
||
|
case 2:
|
||
|
return "停用"
|
||
|
default:
|
||
|
return "未知"
|
||
|
}
|
||
|
}
|
||
|
|
||
|
type Dealer struct {
|
||
|
Id uint `gorm:"primaryKey"`
|
||
|
DealerNo string // 车商编号
|
||
|
Name string // 车商名称
|
||
|
Address string // 地址
|
||
|
ContractNo string // 合同编号
|
||
|
Contract string // 合同文件
|
||
|
ExpireDate time.Time // 到期日期
|
||
|
Liaison string // 联系人
|
||
|
LiaisonPhone string // 联系人手机号
|
||
|
Telephone string // 车商电话
|
||
|
BrokerId uint // 所属业务
|
||
|
Broker Broker `gorm:"foreignKey:BrokerId"`
|
||
|
Status uint // 状态
|
||
|
AuditingId uint // 审核id
|
||
|
Audit DealerAudit `gorm:"foreignKey:AuditingId"`
|
||
|
ApplyAt time.Time // 申请时间
|
||
|
ApplyUserId uint // 申请人
|
||
|
ApplyUser Manage `gorm:"foreignKey:ApplyUserId"`
|
||
|
Company DealerCompany `gorm:"foreignKey:DealerId"`
|
||
|
Finance DealerFinance `gorm:"foreignKey:DealerId"`
|
||
|
CreatedAt time.Time
|
||
|
UpdatedAt time.Time
|
||
|
DeletedAt gorm.DeletedAt
|
||
|
}
|