cust_customer.go 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. // ==========================================================================
  2. // This is auto-generated by gf cli tool. Fill this file as you wish.
  3. // ==========================================================================
  4. package cust
  5. import (
  6. "dashoo.cn/opms_libary/request"
  7. "github.com/gogf/gf/os/gtime"
  8. "dashoo.cn/micro/app/model/cust/internal"
  9. )
  10. // CustCustomer is the golang structure for table cust_customer.
  11. type CustCustomer internal.CustCustomer
  12. // Fill with you ideas below.
  13. //列表搜索参数
  14. type CustCustomerSearchReq struct {
  15. IsPublic bool `json:"isPublic,omitempty"` //区分是否是公海用户列表
  16. CustCode string `json:"custCode"`
  17. CustName string `json:"custName"`
  18. CustIndustry string `json:"custIndustry"`
  19. CustLevel string `json:"custLevel"`
  20. TargetType string `json:"targetType,omitempty"`
  21. request.PageReq
  22. }
  23. // 添加客户信息表
  24. type AddCustCustomerReq struct {
  25. Cust *Customer
  26. Info *Information
  27. }
  28. // 单表添加客户信息表
  29. type Customer struct {
  30. CustName string `p:"custName" json:"custName" v:"required#客户名称不能为空"`
  31. AbbrName string `p:"abbrName" json:"abbrName" ` // 助计名
  32. CustLocation string `p:"custLocation" json:"custLocation" ` // 所在地区
  33. CustAddress string `p:"custAddress" json:"custAddress" ` // 详细地址
  34. FollowUpDate *gtime.Time `p:"followUpDate" json:"followUpDate" ` //跟进时间
  35. CustIndustry string `p:"custIndustry" json:"custIndustry" v:"required#客户行业不能为空"` //客户行业
  36. CustLevel string `p:"custLevel" json:"custLevel" v:"required#客户级别不能为空"` //客户级别
  37. CustDistCode int `p:"custDistCode" json:"custDistCode" v:"required#省份不能为空" ` // 省份Id
  38. Remark string `p:"remark" json:"remark""` //备注
  39. SalesName string `p:"salesName" json:"salesName" ` //
  40. SalesId string `p:"salesId" json:"salesId" ` //
  41. }
  42. //客户联系人信息
  43. type Information struct {
  44. CuctName string `p:"cuctName" json:"cuctName" v:"required#联系人名字不能为空"`
  45. TelePhone string `p:"telePhone" json:"telePhone" v:"required|phone#手机号不能为空|手机号格式错误" orm:"telephone"`
  46. CuctGender string `p:"cuctGender" json:"cuctGender" ` // 尊称 性别
  47. Postion string `p:"postion" json:"postion" ` // 职位
  48. Email string `p:"email" json:"email" v:"email#邮箱格式错误" orm:"email" ` // 邮箱
  49. Remark string `p:"remark" json:"remark" ` // 备注
  50. }
  51. //返回信息
  52. type CustList struct {
  53. Id int `orm:"id,primary" json:"id"` // 主键
  54. CustCode string `orm:"cust_code" json:"custCode"` // 客户编号
  55. CustName string `orm:"cust_name" json:"custName"` // 客户名称
  56. AbbrName string `orm:"abbr_name" json:"abbrName"` // 助记名
  57. CustLocation string `orm:"cust_location" json:"custLocation"` // 所在地区
  58. CustAddress string `orm:"cust_address" json:"custAddress"` // 详细地址
  59. CustStatus string `orm:"cust_status" json:"custStatus"` // 客户状态(10正常20)
  60. FollowUpDate *gtime.Time `orm:"follow_up_date" json:"followUpDate"` // 最后跟进时间
  61. CustIndustry string `orm:"cust_industry" json:"custIndustry"` // 客户行业
  62. CustLevel string `orm:"cust_level" json:"custLevel"` // 客户级别(10 重点客户 20 普通客户 30非优客户)
  63. CreatedName string `orm:"created_name" json:"createdName"` // 创建人
  64. CreatedTime *gtime.Time `orm:"created_time" json:"createdTime"` // 创建时间
  65. }
  66. //转移客户参数
  67. type CustSalesReq struct {
  68. Ids []int64 `json:"ids,omitempty"`
  69. SalesIds int64 `json:"salesIds,omitempty"`
  70. SalesName string `json:"salesName,omitempty"`
  71. Remark string `json:"remark,omitempty"`
  72. }
  73. //分配客户参数
  74. type DistriCustomer struct {
  75. Ids []int64 `json:"ids,omitempty"` //客户id
  76. SalesId int64 `json:"salesId,omitempty"` //分配到销售人员的id
  77. SalesName string `json:"salesName,omitempty"` //分配到销售人员的姓名
  78. Remark string `json:"remark,omitempty"`
  79. }
  80. //删除客户参数
  81. type DelCustomer struct {
  82. Id int `json:"id"` //客户id
  83. }
  84. type DelCustomerContact struct {
  85. Id int `json:"id"` //联系人id
  86. CustId int `json:custId` //客户Id
  87. }
  88. //合并客户参数
  89. type MergecustomerRep struct {
  90. Id int `json:"id"` //目标Id
  91. *Customer
  92. ChooseId []int64 `json:"chooseId,omitempty"` //被合并的客户id
  93. }
  94. //修改客户
  95. type UpdateCustomer struct {
  96. Id int `json:"id,omitempty"` //客户id
  97. *Customer
  98. }
  99. //移入公海
  100. type MoveToPubicRep struct {
  101. Ids []int64 `json:"ids,omitempty"`
  102. Remark string `json:"remark,omitempty"`
  103. }