cust_customer.go 3.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. KeyWords string `json:"custCode"`
  16. CustName string `json:"custName"`
  17. CuctName string `json:"cuctName"`
  18. SalesName string `json:"salesName"`
  19. Telephone string `json:"telePhone"`
  20. CustStatus string `json:"custStatus"` //客户状态
  21. request.PageReq
  22. }
  23. // 添加客户信息表
  24. type AddCustCustomerReq struct {
  25. Cust *Customer
  26. Info *Information
  27. }
  28. type Customer struct {
  29. CustName string `p:"custName" json:"custName" v:"required#客户名称不能为空"`
  30. AbbrName string `p:"abbrName" json:"abbrName" ` // 助计名
  31. CustLocation string `p:"custLocation" json:"custLocation" ` // 所在地区
  32. CustAddress string `p:"custAddress" json:"custAddress" ` // 详细地址
  33. SalesName string `p:"salesName" json:"salesName" ` //
  34. SalesId string `p:"salesId" json:"salesId" ` //
  35. }
  36. //客户联系人信息
  37. type Information struct {
  38. CuctName string `p:"cuctName" json:"cuctName" v:"required#联系人名字不能为空"`
  39. TelePhone string `p:"telePhone" json:"telePhone" v:"required|phone#手机号不能为空|手机号格式错误" orm:"telephone"`
  40. CuctGender string `p:"cuctGender" json:"cuctGender" ` // 尊称 性别
  41. Postion string `p:"postion" json:"postion" ` // 职位
  42. Email string `p:"email" json:"email" v:"email#邮箱格式错误" orm:"email" ` // 邮箱
  43. Remark string `p:"remark" json:"remark" ` // 备注
  44. }
  45. //返回信息
  46. type CustList struct {
  47. Id int `orm:"id,primary" json:"id"` // 主键
  48. CustCode string `orm:"cust_code" json:"custCode"` // 客户编号
  49. CustName string `orm:"cust_name" json:"custName"` // 客户名称
  50. AbbrName string `orm:"abbr_name" json:"abbrName"` // 助记名
  51. CustLocation string `orm:"cust_location" json:"custLocation"` // 所在地区
  52. CustAddress string `orm:"cust_address" json:"custAddress"` // 详细地址
  53. CustStatus string `orm:"cust_status" json:"custStatus"` // 客户状态(10正常20)
  54. DeptId int `orm:"dept_id" json:"deptId"` // 所属部门ID
  55. DeptName string `orm:"dept_name" json:"deptName"` // 所属部门
  56. SalesId int `orm:"sales_id" json:"salesId"` // 所属销售ID
  57. FollowUpDate *gtime.Time `orm:"follow_up_date" json:"followUpDate"` // 最后跟进时间
  58. Contact *CustCustomerContact `orm:"with:cust_id=id"`
  59. CuctName string `p:"cuctName" json:"cuctName"`
  60. TelePhone string `p:"telePhone" json:"telePhone"`
  61. DistName string `p:"distName" json:"distName"`
  62. DistLevel string `p:"distLevel" json:"distLevel"` //商机评级
  63. Product string `p:"product" json:"product"` //产品样品
  64. }
  65. //转移客户参数
  66. type CustSalesReq struct {
  67. Ids []int64 `json:"ids,omitempty"`
  68. SalesIds int64 `json:"salesids,omitempty"`
  69. Remark string `json:"remark,omitempty"`
  70. }
  71. //分配客户参数
  72. type DistriCustomer struct {
  73. Ids []int64 `json:"ids,omitempty"` //客户id
  74. SalesId int64 `json:"salesid,omitempty"` //分配到销售人员的id
  75. }