| | |
| | | Number string `json:"number" gorm:"column:number;type:varchar(255);comment:合同编号"` |
| | | MemberId int `json:"memberId" gorm:"column:member_id;type:int;comment:负责人id"` |
| | | ContactId int `json:"contactId" gorm:"column:contact_id;type:int;comment:联系人id"` |
| | | Contact Contact `json:"contact" gorm:"foreignKey:ContactId"` |
| | | SaleChanceId int `json:"saleChanceId" gorm:"column:sale_chance_id;type:int;comment:销售机会id"` |
| | | SaleChance SaleChance `json:"SaleChance" gorm:"foreignKey:SaleChanceId"` |
| | | SalesDetailsId int `json:"salesDetailsId" gorm:"column:sales_details_id;type:int;comment:合同订单id"` |
| | |
| | | Quotation Quotation `json:"quotation" gorm:"foreignKey:QuotationId"` |
| | | ServiceContractTypeId int `json:"serviceContractTypeId" gorm:"column:service_contract_type_id;type:int;comment:合同类型id"` |
| | | ServiceContractType ServiceContractType `json:"serviceContractType" gorm:"foreignKey:ServiceContractTypeId"` |
| | | SignTime string `json:"signTime" gorm:"column:sign_time;type:datetime;comment:签约时间"` |
| | | StartTime string `json:"startTime" gorm:"column:start_time;type:datetime;comment:开始时间"` |
| | | EndTime string `json:"endTime" gorm:"column:end_time;type:datetime;comment:结束时间"` |
| | | SignTime string `json:"signTime" gorm:"column:sign_time;type:varchar(255);comment:签约时间"` |
| | | StartTime string `json:"startTime" gorm:"column:start_time;type:varchar(255);comment:开始时间"` |
| | | EndTime string `json:"endTime" gorm:"column:end_time;type:varchar(255);comment:结束时间"` |
| | | ServiceContractStatusId int `json:"serviceContractStatusId" gorm:"column:service_contract_status_id;type:int;comment:合同状态id"` |
| | | ServiceContractStatus ServiceContractStatus `json:"serviceContractStatus" gorm:"foreignKey:ServiceContractStatusId"` |
| | | ServiceTimes int `json:"serviceTimes" gorm:"column:service_times;type:int;comment:服务次数"` |
| | |
| | | Preload("Products"). |
| | | Preload("Client"). |
| | | Preload("ServiceContractType"). |
| | | Preload("ServiceContractStatus") |
| | | Preload("ServiceContractStatus"). |
| | | Preload("Contact") |
| | | } |
| | | |
| | | return db |