company.go 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. package company
  2. //type Company struct {
  3. // CompanyId int `orm:"column(company_id);pk"`
  4. // CompanyName string `description:"客户名称"`
  5. // CompanyType int `orm:"column(type)"`
  6. // CreditCode string `description:"社会统一信用码"`
  7. // CompanyCode string `description:"客户编码"`
  8. // Sort int `description:"优先级"`
  9. // IsFeeCustomer int `description:"是否付费用户"`
  10. // Country string `description:"国家编码"`
  11. // Province string `description:"省"`
  12. // City string `description:"市"`
  13. // Address string `description:"详细地址"`
  14. // Enabled int `description:"用户状态"`
  15. // CreatedTime time.Time `description:"创建时间"`
  16. // LastUpdatedTime time.Time `description:"最后一次阅读时间"`
  17. // Seller string `description:"销售员"`
  18. // SellsId int `description:"销售员id"`
  19. // ShareSeller string `description:"共享销售员"`
  20. // ShareSellerId int `description:"共享销售员id"`
  21. // CompanyBelong string `description:"客户所属,ficc:ficc客户,public_offering:公募客户,partner:合作伙伴"`
  22. // StartDate string `description:"合同开始日期"`
  23. // EndDate string `description:"合同结束日期"`
  24. // LastType int `description:"原客户标签"`
  25. // IsVip int `description:"0:普通用户,1:大客户"`
  26. // IsShare int `description:"0:非共享用户,1:共享客户"`
  27. // FirstStartDate string `description:"首次设置为试用客户开始时间"`
  28. // FirstEndDate string `description:"首次设置为试用客户结束时间"`
  29. // DateType int `description:"设置流失类型,1:1个月,2:2个月,3:3个月"`
  30. // Remark string `description:"备注信息"`
  31. // RegionType string `description:"地区类型,国内,国外"`
  32. // OpenCompanyCode string `description:"开放给第三方的客户编码,不让第三方定位我们的客户信息"`
  33. //}
  34. // 更新客户基础信息
  35. //func (company *Company) Update(cols []string) (err error) {
  36. // o := orm.NewOrm()
  37. // _, err = o.Update(company, cols...)
  38. // return
  39. //}
  40. //func ModifyCompanyGroupId(sellerId, groupId int) (err error) {
  41. // o := orm.NewOrm()
  42. // sql := `UPDATE company_product SET group_id=? WHERE seller_id=? `
  43. // _, err = o.Raw(sql, groupId, sellerId).Exec()
  44. // return
  45. //}
  46. //func ModifyCompanyDepartmentId(sellerId, departmentId int) (err error) {
  47. // o := orm.NewOrm()
  48. // sql := `UPDATE company_product SET department_id=? WHERE seller_id=? `
  49. // _, err = o.Raw(sql, departmentId, sellerId).Exec()
  50. // return
  51. //}