company_log.go 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. package company
  2. import (
  3. "github.com/beego/beego/v2/client/orm"
  4. "time"
  5. )
  6. type CompanyLog struct {
  7. Id int `orm:"column(id);pk"`
  8. CompanyId int `description:"客户id"`
  9. CompanyName string `description:"客户名称"`
  10. CreditCode string `description:"统一社会信用码"`
  11. CompanyCode string `description:"客户编码"`
  12. Sort int `description:"优先级"`
  13. IsFeeCustomer int `description:"是否付费用户"`
  14. Country string `description:"国家编码"`
  15. ProvinceId int `description:"省id"`
  16. CityId int `description:"市id"`
  17. Address string `description:"详细地址"`
  18. Ctype int `orm:"column(type)" description:"客户标签,1:付费客户,2:试用客户,3:流失客户,4:潜在客户" `
  19. Enabled int `description:"用户状态"`
  20. CreatedTime time.Time `description:"创建时间"`
  21. LastUpdatedTime time.Time `description:"最后修改时间"`
  22. Seller string `description:"销售员"`
  23. SellsId int `description:"销售员ID"`
  24. CompanyBelong string `description:"客户所属,ficc:ficc客户,public_offering:公募客户,partner:合作伙伴"`
  25. StartDate string `description:"合同开始日期"`
  26. EndDate string `description:"合同结束日期"`
  27. LoseReason string `description:"流失原因"`
  28. LastType int `description:"原客户标签"`
  29. FirstStartDate string `description:"首次设置为试用客户开始时间"`
  30. FirstEndDate string `description:"首次设置为试用客户结束时间"`
  31. DateType int `description:"日期类型"`
  32. AdminId int `description:"操作人id"`
  33. LogType string `description:"日志类型"`
  34. LogCreateTime time.Time `description:"日志创建时间"`
  35. Province string `description:"省"`
  36. City string `description:"市"`
  37. }
  38. //新增客户产品
  39. func AddCompanyLog(item *CompanyLog) (err error) {
  40. o := orm.NewOrm()
  41. _, err = o.Insert(item)
  42. return
  43. }