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.
36 lines
1.1 KiB
36 lines
1.1 KiB
package model
|
|
|
|
import (
|
|
"database/sql"
|
|
"time"
|
|
)
|
|
|
|
const (
|
|
CustomerBrokerTypeSelect = 1 // 指定经纪人
|
|
CustomerBrokerTypeAuto = 2 // 系统分配
|
|
)
|
|
|
|
const (
|
|
CustomerBrokerAuditWait = 1 // 待审核
|
|
CustomerBrokerAuditAdopt = 2 // 审核通过
|
|
CustomerBrokerAuditReject = 3 // 审核驳回
|
|
)
|
|
|
|
type CustomerBrokerAudit struct {
|
|
Id uint `gorm:"primaryKey"`
|
|
OriginBrokerId uint // 原经纪人id
|
|
OriginBroker Broker `gorm:"foreignKey:OriginBrokerId"`
|
|
NewBrokerId uint // 新经纪人id
|
|
NewBroker Broker `gorm:"foreignKey:NewBrokerId"`
|
|
CustomerId uint // 用户id
|
|
Customer Customer `gorm:"foreignKey:CustomerId"`
|
|
Type uint // 1=指定经纪人 2=系统分配
|
|
Status uint // 1=未审核 2=审核通过 3=审核驳回
|
|
AuditAt sql.NullTime // 审核时间
|
|
Reason string // 驳回原因
|
|
AuditUserId uint // 审核人
|
|
AuditUser Manage `gorm:"foreignKey:AuditUserId"`
|
|
CreatedAt time.Time
|
|
UpdatedAt time.Time
|
|
}
|