Merge branch 'master' into zq
New file |
| | |
| | | package model |
| | | |
| | | import ( |
| | | "github.com/shopspring/decimal" |
| | | "gorm.io/gorm" |
| | | ) |
| | | |
| | | type MoneyAdder interface { |
| | | AmountReceivableAdd(*gorm.DB, decimal.Decimal) |
| | | AmountReceivedAdd(*gorm.DB, decimal.Decimal) |
| | | AmountInvoicedAdd(*gorm.DB, decimal.Decimal) |
| | | AmountNotInvoicedAdd(*gorm.DB, decimal.Decimal) |
| | | } |
| | |
| | | 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"` |
| | |
| | | Preload("Products"). |
| | | Preload("Client"). |
| | | Preload("ServiceContractType"). |
| | | Preload("ServiceContractStatus") |
| | | Preload("ServiceContractStatus"). |
| | | Preload("Contact") |
| | | } |
| | | |
| | | return db |