cust_customer.go 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  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. FollowUpDate string `json:"followUpDate,omitempty"`
  22. request.PageReq
  23. }
  24. //导出参数
  25. type CustCustomerExport struct {
  26. CustCustomerSearchReq
  27. Columns []string `json:"columns"` // 导出列
  28. }
  29. //导出字节流
  30. type CustExport struct {
  31. Content []byte `json:"content"` // 导出数据流
  32. }
  33. // 添加客户信息表
  34. type AddCustCustomerReq struct {
  35. Cust *Customer
  36. Info *Information
  37. }
  38. // 单表添加客户信息表
  39. type Customer struct {
  40. CustName string `p:"custName" json:"custName" v:"required#客户名称不能为空"`
  41. AbbrName string `p:"abbrName" json:"abbrName" ` // 助计名
  42. CustLocation string `p:"custLocation" json:"custLocation" ` // 所在地区
  43. CustAddress string `p:"custAddress" json:"custAddress" ` // 详细地址
  44. FollowUpDate *gtime.Time `p:"followUpDate" json:"followUpDate" ` //跟进时间
  45. CustIndustry string `p:"custIndustry" json:"custIndustry" v:"required#客户行业不能为空"` //客户行业
  46. CustLevel string `p:"custLevel" json:"custLevel" v:"required#客户级别不能为空"` //客户级别
  47. CustSource string `p:"custSource" json:"source" v:"required#客户来源不能为空"` //客户级别
  48. CustDistCode int `p:"custDistCode" json:"custDistCode" v:"required#省份不能为空" ` // 省份Id
  49. Remark string `p:"remark" json:"remark""` //备注
  50. SalesName string `p:"salesName" json:"salesName" ` //
  51. SalesId int `p:"salesId" json:"salesId" ` //
  52. }
  53. //客户联系人信息
  54. type Information struct {
  55. CuctName string `p:"cuctName" json:"cuctName" v:"required#联系人名字不能为空"`
  56. TelePhone string `p:"telePhone" json:"telePhone" v:"required|phone#手机号不能为空|手机号格式错误" orm:"telephone"`
  57. CuctGender string `p:"cuctGender" json:"cuctGender" ` // 尊称 性别
  58. Postion string `p:"postion" json:"postion" ` // 职位
  59. Email string `p:"email" json:"email" v:"email#邮箱格式错误" orm:"email" ` // 邮箱
  60. Remark string `p:"remark" json:"remark" ` // 备注
  61. }
  62. //返回信息
  63. type CustList struct {
  64. Id int `orm:"id,primary" json:"id"` // 主键
  65. CustCode string `orm:"cust_code" json:"custCode"` // 客户编号
  66. CustName string `orm:"cust_name" json:"custName"` // 客户名称
  67. AbbrName string `orm:"abbr_name" json:"abbrName"` // 助记名
  68. CustLocation string `orm:"cust_location" json:"custLocation"` // 所在地区
  69. CustAddress string `orm:"cust_address" json:"custAddress"` // 详细地址
  70. CustStatus string `orm:"cust_status" json:"custStatus"` // 客户状态(10正常20)
  71. FollowUpDate string `orm:"follow_up_date" json:"followUpDate"` // 最后跟进时间
  72. CustIndustry string `orm:"cust_industry" json:"custIndustry"` // 客户行业
  73. CustLevel string `orm:"cust_level" json:"custLevel"` // 客户级别(10 重点客户 20 普通客户 30非优客户)
  74. CustSource string `orm:"cust_soucrce" json:"source"` // 客户来源
  75. CreatedName string `orm:"created_name" json:"createdName"` // 创建人
  76. CreatedTime string `orm:"created_time" json:"createdTime"` // 创建时间
  77. SalesId int `orm:"sales_id" json:"salesId"` //
  78. SalesName string `orm:"sales_name" json:"salesName"` //
  79. //Follow *Follow `json:"follow"`
  80. }
  81. //跟进摘要
  82. type Follow struct {
  83. FollowCount int `json:"followCount"` // 跟进次数
  84. NotFollowDay int `json:"notFollowDay"` // 未跟进天数
  85. Business int `json:"business"` // 商机数量
  86. BusinessTotal float64 `json:"businessTotal"` // 商机总额
  87. DealCount int `json "dealCotal"` // 成交次数
  88. DealTotal float64 `json "dealTotal"` // 成交总额
  89. PaymentTotal float64 `json "paymentTotal"` // 回款总额
  90. NotPaymentTotal float64 `json "notPaymentTotal"` // 未回款总额
  91. DrawTotal float64 `json "drawTotal"` // 开票总额
  92. }
  93. //转移客户参数
  94. type CustSalesReq struct {
  95. Ids []int64 `json:"ids,omitempty"`
  96. SalesIds int64 `json:"salesIds,omitempty"`
  97. SalesName string `json:"salesName,omitempty"`
  98. Remark string `json:"remark,omitempty"`
  99. Receive string `json:"receive,omitempty"` //有值领取 无值分配
  100. }
  101. //分配 领取 转移 客户参数
  102. type DistriCustomer struct {
  103. Ids []int64 `json:"ids,omitempty"` //客户id
  104. SalesId int64 `json:"salesId,omitempty"` //分配到销售人员的id
  105. SalesName string `json:"salesName,omitempty"` //分配到销售人员的姓名
  106. Remark string `json:"remark,omitempty"`
  107. Receive string `json:"receive,omitempty"` //有值领取 无值分配
  108. }
  109. //删除客户参数
  110. type DelCustomer struct {
  111. Id int `json:"id"` //客户id
  112. }
  113. type DelCustomerContact struct {
  114. Id int `json:"id"` //联系人id
  115. CustId int `json:custId` //客户Id
  116. }
  117. //合并客户参数
  118. type MergecustomerRep struct {
  119. Id int `json:"id"` //目标Id
  120. *Customer
  121. //*CustCustomerContactSeq
  122. *AddCustomerBelong
  123. ChooseId []int64 `json:"chooseId,omitempty"` //被合并的客户id
  124. }
  125. //修改客户
  126. type UpdateCustomer struct {
  127. Id int `json:"id,omitempty"` //客户id
  128. *Customer
  129. }
  130. //移入公海
  131. type MoveToPubicRep struct {
  132. Ids []int64 `json:"ids,omitempty"`
  133. Remark string `json:"remark,omitempty"`
  134. }