feat: 客户关联产品并支持按产品圈选通知群体
新增客户-产品多对多关联,列表可按产品筛选并复制邮箱;发证/下单自动回填历史关联。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
d0e1ca3729
commit
4c46088f4f
10 files changed
+337
-89
No files matched your search
@@ -40,36 +40,47 @@ type ProductResponse struct {
|
||||
|
||||
// CustomerCreate 创建客户请求 // Logan.Li
|
||||
type CustomerCreate struct {
|
||||
Name string `json:"name" binding:"required"`
|
||||
Company string `json:"company"`
|
||||
Email string `json:"email" binding:"omitempty,email"`
|
||||
Phone string `json:"phone"`
|
||||
Address string `json:"address"`
|
||||
Notes string `json:"notes"`
|
||||
Status *int `json:"status"`
|
||||
Name string `json:"name" binding:"required"`
|
||||
Company string `json:"company"`
|
||||
Email string `json:"email" binding:"omitempty,email"`
|
||||
Phone string `json:"phone"`
|
||||
Address string `json:"address"`
|
||||
Notes string `json:"notes"`
|
||||
Status *int `json:"status"`
|
||||
ProductIDs []uint `json:"product_ids"` // 关联产品,便于按产品圈选通知 // Logan.Li
|
||||
}
|
||||
|
||||
// CustomerUpdate 更新客户请求 // Logan.Li
|
||||
// CustomerUpdate 更新客户请求(ProductIDs 用指针区分未传与清空) // Logan.Li
|
||||
type CustomerUpdate struct {
|
||||
Name string `json:"name"`
|
||||
Company string `json:"company"`
|
||||
Email string `json:"email" binding:"omitempty,email"`
|
||||
Phone string `json:"phone"`
|
||||
Address string `json:"address"`
|
||||
Notes string `json:"notes"`
|
||||
Status *int `json:"status"`
|
||||
Name string `json:"name"`
|
||||
Company string `json:"company"`
|
||||
Email string `json:"email" binding:"omitempty,email"`
|
||||
Phone string `json:"phone"`
|
||||
Address string `json:"address"`
|
||||
Notes string `json:"notes"`
|
||||
Status *int `json:"status"`
|
||||
ProductIDs *[]uint `json:"product_ids"`
|
||||
}
|
||||
|
||||
// CustomerProductBrief 客户关联产品简要信息 // Logan.Li
|
||||
type CustomerProductBrief struct {
|
||||
ID uint `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Code string `json:"code"`
|
||||
}
|
||||
|
||||
// CustomerResponse 客户响应 // Logan.Li
|
||||
type CustomerResponse struct {
|
||||
ID uint `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Company string `json:"company"`
|
||||
Email string `json:"email"`
|
||||
Phone string `json:"phone"`
|
||||
Address string `json:"address"`
|
||||
Notes string `json:"notes"`
|
||||
Status int `json:"status"`
|
||||
CreatedAt string `json:"created_at"`
|
||||
UpdatedAt string `json:"updated_at"`
|
||||
ID uint `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Company string `json:"company"`
|
||||
Email string `json:"email"`
|
||||
Phone string `json:"phone"`
|
||||
Address string `json:"address"`
|
||||
Notes string `json:"notes"`
|
||||
Status int `json:"status"`
|
||||
ProductIDs []uint `json:"product_ids"`
|
||||
Products []CustomerProductBrief `json:"products"`
|
||||
CreatedAt string `json:"created_at"`
|
||||
UpdatedAt string `json:"updated_at"`
|
||||
}
|
||||
Reference in new issue
Block a user