add
wangpengfei
2023-07-18 7ffcc41e597c5af4169e3e2ab809fdbf869c2154
model/saleChance.go
@@ -20,7 +20,7 @@
      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:货币类型"`
@@ -37,6 +37,9 @@
      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:竞争威胁"`
      Contact            Contact               `json:"contact" gorm:"foreignKey:ContactId;references:Id"`
      Client             Client                `json:"client" gorm:"foreignKey:ClientId;references:Id"`
      SalesSources       SalesSources
      Address
      gorm.Model `json:"-"`
   }
@@ -93,7 +96,7 @@
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
}