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.
57 lines
2.7 KiB
57 lines
2.7 KiB
package model
|
|
|
|
import (
|
|
"database/sql"
|
|
"github.com/shopspring/decimal"
|
|
"time"
|
|
)
|
|
|
|
const (
|
|
ContractConsignmentCompulsoryInsuranceFalse = 0 // 无交强险
|
|
ContractConsignmentCompulsoryInsuranceTrue = 1 // 有交强险
|
|
|
|
ContractConsignmentCommercialInsuranceFalse = 0 // 无商业险
|
|
ContractConsignmentCommercialInsuranceTrue = 1 // 有商业险
|
|
|
|
)
|
|
|
|
type ContractConsignment struct {
|
|
Id uint `gorm:"primaryKey"`
|
|
CustomerId uint // 客户id
|
|
Customer Customer `gorm:"foreignKey:CustomerId"`
|
|
Order OrderConsignment `gorm:"foreignKey:ContractId"`
|
|
BrokerId uint // 经纪人id
|
|
BrokerPriceId uint // 费用id
|
|
ContractSn string // 合同编码
|
|
EssFlow ThirdTencentEssFlow `gorm:"foreignKey:ContractId"`
|
|
Vin string // 车架号
|
|
ModelId uint // 车型id
|
|
Model CarModel `gorm:"foreignKey:ModelId;references:ModelId"`
|
|
LicensePlate string // 车牌
|
|
LicensingDate time.Time // 上牌日期
|
|
Color string // 车身颜色
|
|
Engine string // 发动机号
|
|
Mileage decimal.Decimal // 里程
|
|
Transfer uint // 过户次数
|
|
KeyCount uint // 钥匙数量
|
|
UseCharacter uint // 使用性质 1=非运营 2=运营 3=营转非 4=租赁非运营 5=租赁运营
|
|
CompulsoryInsurance uint // 交强险
|
|
CompulsoryInsuranceDate sql.NullTime // 交强险到期日期
|
|
CommercialInsurance uint // 商业险
|
|
CommercialInsuranceDate sql.NullTime // 商业险到期日期
|
|
CommercialInsurancePrice decimal.Decimal // 商业险金额
|
|
ReckonPrice decimal.Decimal // 估算价格
|
|
Price decimal.Decimal // 合同价格
|
|
Exterior string // 外观
|
|
InteriorTrim string // 内饰
|
|
WorkingCondition string // 工况
|
|
ServiceFeeRate decimal.Decimal // 服务费比例
|
|
Status uint // 状态
|
|
MasterId uint
|
|
Master ContractMaster `gorm:"foreignKey:MasterId"`
|
|
SignAt sql.NullTime // 签订时间
|
|
CancelAt sql.NullTime // 取消时间
|
|
CreatedAt time.Time
|
|
UpdatedAt time.Time
|
|
}
|