cust_customer.go 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  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/micro/app/model/cust/internal"
  7. "dashoo.cn/opms_libary/request"
  8. )
  9. // CustCustomer is the golang structure for table cust_customer.
  10. type CustCustomer internal.CustCustomer
  11. // Fill with you ideas below.
  12. //CustCustomerSearchReq 列表搜索参数
  13. type CustCustomerSearchReq struct {
  14. IsPublic bool `json:"isPublic,omitempty"` //区分是否是公海用户列表
  15. CustCode string `json:"custCode"`
  16. CustName string `json:"custName"`
  17. CustIndustry string `json:"custIndustry"`
  18. CustLevel string `json:"custLevel"`
  19. TargetType string `json:"targetType,omitempty"`
  20. //FollowUpDate string `json:"followUpDate,omitempty"`
  21. Remark string `json:"remark"`
  22. IsRemovePage bool `json:"isRemovePage,omitempty"` //是否去掉分页
  23. CustProvince string `json:"custProvince"` // 所在省
  24. CustCity string `json:"custCity"` // 所在市
  25. SalesName string `json:"salesName"` // 所属于销售
  26. request.PageReq
  27. }
  28. // CustCustomerExport 导出参数
  29. type CustCustomerExport struct {
  30. CustCustomerSearchReq
  31. Columns []string `json:"columns"` // 导出列
  32. }
  33. //导出字节流
  34. type CustExport struct {
  35. Content []byte `json:"content"` // 导出数据流
  36. }
  37. // CustomerAddSeq 单表添加客户信息表
  38. type CustomerAddSeq struct {
  39. CustName string `p:"custName" json:"custName" v:"required#客户名称不能为空"` // 客户名称
  40. AbbrName string `p:"abbrName" json:"abbrName" ` // 助计名
  41. CustLocation string `p:"custLocation" json:"custLocation" ` // 所在地区
  42. CustAddress string `p:"custAddress" json:"custAddress" ` // 详细地址
  43. CustProvinceId int `json:"custProvinceId"` // 所在省ID
  44. CustProvince string `json:"custProvince"` // 所在省
  45. CustCityId int `json:"custCityId"` // 所在市ID
  46. CustCity string `json:"custCity"` // 所在市
  47. CustRegionId int `json:"custRegionId"` // 所在区县ID
  48. CustRegion string `json:"custRegion"` // 所在区县
  49. //FollowUpDate *gtime.Time `p:"followUpDate" json:"followUpDate" ` //跟进时间
  50. CustIndustry string `p:"custIndustry" json:"custIndustry" v:"required#客户行业不能为空"` //客户行业
  51. CustLevel string `p:"custLevel" json:"custLevel"` //客户级别
  52. CustSource string `p:"custSource" json:"custSource" v:"required#客户来源不能为空"` //客户来源
  53. CustDistCode int `p:"custDistCode" json:"custDistCode" v:"required#省份不能为空" ` // 省份Id
  54. Remark string `p:"remark" json:"remark"` //备注
  55. SalesName string `p:"salesName" json:"salesName" ` // 销售名称
  56. SalesId int `p:"salesId" json:"salesId" ` // 销售id
  57. InvoiceHeader string `json:"invoiceHeader"` // 开票抬头
  58. Keyword []string `json:"keyword"` // 招标关键字
  59. }
  60. // 客户联系人信息
  61. type Information struct {
  62. CuctName string `p:"cuctName" json:"cuctName" v:"required#联系人名字不能为空"`
  63. TelePhone string `p:"telePhone" json:"telePhone" v:"required|phone#手机号不能为空|手机号格式错误" orm:"telephone"`
  64. CuctGender string `p:"cuctGender" json:"cuctGender" ` // 尊称 性别
  65. Postion string `p:"postion" json:"postion" ` // 职位
  66. Email string `p:"email" json:"email" v:"email#邮箱格式错误" orm:"email" ` // 邮箱
  67. Remark string `p:"remark" json:"remark" ` // 备注
  68. }
  69. //返回信息
  70. type CustList struct {
  71. Id int `orm:"id,primary" json:"id"` // 主键
  72. CustCode string `orm:"cust_code" json:"custCode"` // 客户编号
  73. CustName string `orm:"cust_name" json:"custName"` // 客户名称
  74. AbbrName string `orm:"abbr_name" json:"abbrName"` // 助记名
  75. CustLocation string `orm:"cust_location" json:"custLocation"` // 所在地区
  76. CustAddress string `orm:"cust_address" json:"custAddress"` // 详细地址
  77. CustProvinceId int `json:"custProvinceId"` // 所在省ID
  78. CustProvince string `json:"custProvince"` // 所在省
  79. CustCityId int `json:"custCityId"` // 所在市ID
  80. CustCity string `json:"custCity"` // 所在市
  81. CustRegionId int `json:"custRegionId"` // 所在区县ID
  82. CustRegion string `json:"custRegion"` // 所在区县
  83. CustStatus string `orm:"cust_status" json:"custStatus"` // 客户状态(10正常20)
  84. FollowUpDate string `orm:"follow_up_date" json:"followUpDate"` // 最后跟进时间
  85. FollowUpMan string `json:"followUpMan"` // 最后跟进人
  86. CustIndustry string `orm:"cust_industry" json:"custIndustry"` // 客户行业
  87. CustLevel string `orm:"cust_level" json:"custLevel"` // 客户级别(10 重点客户 20 普通客户 30非优客户)
  88. CustSource string `orm:"cust_soucrce" json:"custSource"` // 客户来源
  89. CreatedName string `orm:"created_name" json:"createdName"` // 创建人
  90. CreatedTime string `orm:"created_time" json:"createdTime"` // 创建时间
  91. SalesId int `orm:"sales_id" json:"salesId"` //
  92. SalesName string `orm:"sales_name" json:"salesName"` //
  93. Keyword string `orm:"keyword" json:"keyword"` // 招标关键字
  94. Remark string `orm:"remark" json:"remark"`
  95. //Follow *Follow `json:"follow"`
  96. InvoiceHeader string `orm:"invoice_header" json:"invoiceHeader"` // 开票抬头
  97. }
  98. // 跟进摘要
  99. type Follow struct {
  100. FollowCount int `json:"followCount"` // 跟进次数
  101. NotFollowDay int `json:"notFollowDay"` // 未跟进天数
  102. Business int `json:"business"` // 商机数量
  103. BusinessTotal float64 `json:"businessTotal"` // 商机总额
  104. DealCount int `json: "dealCotal"` // 成交次数
  105. DealTotal float64 `json: "dealTotal"` // 成交总额
  106. PaymentTotal float64 `json: "paymentTotal"` // 回款总额
  107. NotPaymentTotal float64 `json: "notPaymentTotal"` // 未回款总额
  108. DrawTotal float64 `json: "drawTotal"` // 开票总额
  109. }
  110. // 分配 领取 转移 客户参数
  111. type AssignCustomerReq struct {
  112. Ids []int64 `json:"ids,omitempty"` //客户id
  113. SalesId int64 `json:"salesId,omitempty"` //分配到销售人员的id
  114. SalesName string `json:"salesName,omitempty"` //分配到销售人员的姓名
  115. Remark string `json:"remark,omitempty"`
  116. Receive string `json:"receive,omitempty"` //有值领取 无值分配
  117. ApplyRemark string `json:"applyRemark,omitempty"`
  118. }
  119. // 删除客户参数
  120. type DelCustomer struct {
  121. Ids []int64 `json:"ids"` //客户ids
  122. }
  123. type DelCustomerContact struct {
  124. Ids []int64 `json:"ids"` //联系人id
  125. CustId int `json:custId` //客户Id
  126. }
  127. // 合并客户参数
  128. type MergeCustomerRep struct {
  129. Id int64 `json:"id"` //目标Id
  130. *CustomerAddSeq
  131. *CustomerBelongAddSeq
  132. ChooseId []int64 `json:"chooseId,omitempty"` //被合并的客户id
  133. }
  134. // UpdateCustomer 修改客户
  135. type UpdateCustomer struct {
  136. Id int64 `json:"id,omitempty"` //客户id
  137. *CustomerAddSeq
  138. }
  139. // 移入公海
  140. type MoveToPubicRep struct {
  141. Ids []int64 `json:"ids,omitempty"`
  142. Remark string `json:"remark,omitempty"` // 移回原因
  143. }
  144. // 客户名称
  145. type IsExistsCustName struct {
  146. Id int `json:"id,omitempty"` //客户id
  147. CustName string `json:"custName"` // 客户名称
  148. }
  149. type ImportFile struct {
  150. Url string `json:"url"`
  151. }
  152. // CustomerAddSeq 导入客户信息表
  153. type CustomerAddImport struct {
  154. CustName string `import:"客户名称" p:"custName" json:"custName" v:"required#客户名称不能为空"` // 客户名称
  155. AbbrName string `import:"助计名" p:"abbrName" json:"abbrName" ` // 助计名
  156. CustIndustry string `import:"客户类型" p:"custIndustry" json:"custIndustry" v:"required#客户行业不能为空"` // 客户行业
  157. CustSource string `import:"客户来源" p:"custSource" json:"custSource" v:"required#客户来源不能为空"` // 客户来源
  158. CustProvince string `import:"所在省" json:"custProvince"` // 所在省
  159. CustCity string `import:"所在市" json:"custCity"` // 所在市
  160. CustRegion string `import:"所在区县" json:"custRegion"` // 所在区县
  161. CustAddress string `import:"详细地址" p:"custAddress" json:"custAddress" ` // 详细地址
  162. Keyword string `import:"招标关键字" json:"keyword"` // 招标关键字
  163. Remark string `import:"备注" p:"remark" json:"remark"` // 备注
  164. CuctName string `import:"姓名" p:"cuctName" json:"cuctName" v:"required#联系人名字不能为空"` // 姓名
  165. CuctGender string `import:"性别" p:"cuctGender" json:"cuctGender" v:"required|in:10,20#性别不能为空|填写错误"` // 性别(10男20女)
  166. Telephone string `import:"电话" p:"telephone" json:"telephone" v:"phone#手机号格式错误"` // 电话
  167. Wechat string `import:"微信" p:"wechat" json:"wechat"` // 微信
  168. Email string `import:"邮箱" p:"email" json:"email" v:"email#邮箱格式错误"` // 邮箱
  169. Dept string `import:"部门" p:"dept" json:"dept"` // 部门
  170. Postion string `import:"职位" p:"postion" json:"postion" v:"required#岗位不能为空" ` // 职位
  171. OfficeLocation string `import:"办公地点" p:"officeLocation" json:"officeLocation"` // 办公地点
  172. IsDecision string `import:"是否关键决策人" p:"isDecision" json:"isDecision" v:"required|in:10,20#是否关键决策人不能为空|填写错误"` // 关键决策人(10是20否)
  173. ContactRemark string `import:"联系人备注" p:"contactRemark" json:"contactRemark"` // 备注
  174. FailedReason string `json:"failedReason"`
  175. }