fix
wangpengfei
2023-08-11 460e591f215fe64d6a097ff4b1ee836d181298ac
model/quotation.go
@@ -3,26 +3,25 @@
import (
   "aps_crm/pkg/mysqlx"
   "gorm.io/gorm"
   "time"
)
type (
   // Quotation 报价单
   Quotation struct {
      Id                int        `json:"id" gorm:"column:id;primary_key;AUTO_INCREMENT"`
      ClientId          int        `json:"client_id" gorm:"column:client_id;type:int;comment:客户id"`
      Number            string     `json:"number" gorm:"column:number;type:varchar(255);comment:报价单号"`
      QuotationStatusId int        `json:"quotation_status_id" gorm:"column:quotation_status_id;type:int;comment:报价单状态id"`
      ValidityDate      *time.Time `json:"validity_date" gorm:"column:validity_date;type:datetime;comment:有效期"`
      ContactId         int        `json:"contact_id" gorm:"column:contact_id;type:int;comment:联系人id"`
      MemberId          int        `json:"member_id" gorm:"column:member_id;type:int;comment:负责人id"`
      SaleChanceId      int        `json:"sale_chance_id" gorm:"column:sale_chance_id;type:int;comment:销售机会id"`
      Conditions        string     `json:"conditions" gorm:"column:conditions;type:text;comment:报价条件"`
      File              string     `json:"file" gorm:"column:file;type:varchar(255);comment:附件"`
      Client            Client     `json:"client" gorm:"foreignKey:ClientId"`
      Contact           Contact    `json:"contact" gorm:"foreignKey:ContactId"`
      SaleChance        SaleChance `json:"sale_chance" gorm:"foreignKey:SaleChanceId"`
      Products          []Product  `json:"products" gorm:"many2many:quotation_product"`
      Id                int         `json:"id" gorm:"column:id;primary_key;AUTO_INCREMENT"`
      ClientId          int         `json:"client_id" gorm:"column:client_id;type:int;comment:客户id"`
      Number            string      `json:"number" gorm:"column:number;type:varchar(255);comment:报价单号"`
      QuotationStatusId int         `json:"quotation_status_id" gorm:"column:quotation_status_id;type:int;comment:报价单状态id"`
      ValidityDate      *CustomTime `json:"validity_date" gorm:"column:validity_date;type:datetime;comment:有效期"`
      ContactId         int         `json:"contact_id" gorm:"column:contact_id;type:int;comment:联系人id"`
      MemberId          int         `json:"member_id" gorm:"column:member_id;type:int;comment:负责人id"`
      SaleChanceId      int         `json:"sale_chance_id" gorm:"column:sale_chance_id;type:int;comment:销售机会id"`
      Conditions        string      `json:"conditions" gorm:"column:conditions;type:text;comment:报价条件"`
      File              string      `json:"file" gorm:"column:file;type:varchar(255);comment:附件"`
      Client            Client      `json:"client" gorm:"foreignKey:ClientId"`
      Contact           Contact     `json:"contact" gorm:"foreignKey:ContactId"`
      SaleChance        SaleChance  `json:"sale_chance" gorm:"foreignKey:SaleChanceId"`
      Products          []Product   `json:"products" gorm:"many2many:quotation_product"`
      gorm.Model        `json:"-"`
   }