| | |
| | | Client Client `json:"client" gorm:"foreignKey:ClientId"` |
| | | Number string `json:"number" gorm:"column:number;type:varchar(255);comment:合同编号"` |
| | | MemberId int `json:"memberId" gorm:"column:member_id;type:int;comment:负责人id"` |
| | | Member User `json:"member" gorm:"foreignKey:MemberId"` |
| | | 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"` |
| | |
| | | } |
| | | if slf.Preload { |
| | | db = db. |
| | | Preload("Client"). |
| | | Preload("Member"). |
| | | Preload("Contact"). |
| | | Preload("SaleChance"). |
| | | Preload("SalesDetails"). |
| | | Preload("Quotation"). |