| | |
| | | MemberId int `json:"member_id" gorm:"column:member_id;type:int(11);comment:销售负责人ID"` |
| | | RegularCustomersId int `json:"regular_customers_id" gorm:"column:regular_customers_id;type:int(11);comment:常客ID"` |
| | | Competitors string `json:"competitors" gorm:"column:competitors;type:varchar(255);comment:竞争对手"` |
| | | Possibilities int `json:"possibilities" gorm:"column:possibilities;type:int(11);comment:可能性"` |
| | | PossibilitiesId int `json:"possibilities_id" gorm:"column:possibilities_id;type:int(11);comment:可能性ID"` |
| | | Budget float64 `json:"budget" gorm:"column:budget;type:decimal(10,2);comment:预算"` |
| | | ProjectedAmount float64 `json:"projected_amount" gorm:"column:projected_amount;type:decimal(10,2);comment:预计金额"` |
| | | Currency constvar.CurrencyType `json:"currency" gorm:"column:currency;type:int(11);comment:货币类型"` |
| | |
| | | Disadvantages string `json:"disadvantages" gorm:"column:disadvantages;type:text;comment:竞争劣势"` |
| | | Opportunities string `json:"opportunities" gorm:"column:opportunities;type:text;comment:竞争机会"` |
| | | Threats string `json:"threats" gorm:"column:threats;type:text;comment:竞争威胁"` |
| | | DetailAddress string `json:"detail_address" gorm:"column:detail_address;type:text;comment:详细地址"` |
| | | Remark string `json:"remark" gorm:"column:remark;type:text;comment:备注"` |
| | | Contact Contact `json:"contact" gorm:"foreignKey:ContactId;references:Id"` |
| | | Client Client `json:"client" gorm:"foreignKey:ClientId;references:Id"` |
| | | SalesSources SalesSources |
| | | Address |
| | | gorm.Model `json:"-"` |
| | | } |
| | |
| | | |
| | | func (slf *SaleChangeSearch) FindAll() (record []*SaleChance, err error) { |
| | | var db = slf.build() |
| | | err = db.Find(&record).Error |
| | | err = db.Preload("Client").Preload("Contact").Find(&record).Error |
| | | return |
| | | } |
| | | |