From 9ec9a4987cb5fe4a3bd39d61029add5c51d3ab92 Mon Sep 17 00:00:00 2001
From: liujiandao <274878379@qq.com>
Date: 星期六, 02 十二月 2023 11:00:26 +0800
Subject: [PATCH] 添加来源
---
model/request/salesDetails.go | 52 +++++++++++++++++++++++++++++++---------------------
1 files changed, 31 insertions(+), 21 deletions(-)
diff --git a/model/request/salesDetails.go b/model/request/salesDetails.go
index 8acf6a8..ed2b4b6 100644
--- a/model/request/salesDetails.go
+++ b/model/request/salesDetails.go
@@ -3,7 +3,6 @@
import (
"aps_crm/constvar"
"aps_crm/model"
- "aps_crm/proto/code"
)
type AddSalesDetails struct {
@@ -11,30 +10,41 @@
}
type SalesDetails struct {
- ClientId int `json:"clientId" gorm:"column:client_id;type:int;comment:瀹㈡埛id"`
- Number string `json:"number" gorm:"column:number;type:varchar(255);comment:閿�鍞瓙鍗曞彿"`
- SaleChanceId int `json:"saleChanceId" gorm:"column:sale_chance_id;type:int;comment:閿�鍞満浼歩d"`
- SaleType int `json:"saleType" gorm:"column:sale_type;type:int;comment:閿�鍞被鍨�"`
- SignTime string `json:"signTime" gorm:"column:sign_time;type:datetime;comment:绛惧崟鏃堕棿"`
- MemberId int `json:"memberId" gorm:"column:member_id;type:int;comment:璐熻矗浜篿d"`
- DeliveryDate string `json:"deliveryDate" gorm:"column:delivery_date;type:datetime;comment:浜よ揣鏃ユ湡"`
- WechatOrderStatusId int `json:"wechatOrderStatusId" gorm:"column:wechat_order_status_id;type:int;comment:寰俊璁㈠崟鐘舵�乮d"`
- Address string `json:"address" gorm:"column:address;type:varchar(255);comment:鍦板潃"`
- Phone string `json:"phone" gorm:"column:phone;type:varchar(255);comment:鐢佃瘽"`
- Addressee string `json:"addressee" gorm:"column:addressee;type:varchar(255);comment:鏀朵欢浜�"`
- Conditions string `json:"conditions" gorm:"column:conditions;type:text;comment:鏉′欢"`
- Remark string `json:"remark" gorm:"column:remark;type:text;comment:澶囨敞"`
- Products []*model.Product `json:"products" gorm:"many2many:sales_details_product;"`
- LogisticCompany string `json:"logisticCompany" gorm:"column:logistic_company;type:varchar(255);comment:鐗╂祦鍏徃"`
- LogisticNumber string `json:"logisticNumber" gorm:"column:logistic_number;type:varchar(255);comment:鐗╂祦鍗曞彿"`
- LogisticCost float64 `json:"logisticCost" gorm:"column:logistic_cost;type:decimal(10,2);comment:鐗╂祦璐圭敤"`
- CodeStandID string `json:"codeStandID"` //缂栫爜id
- CodeRule code.CodeStandard `json:"codeRule"`
+ ClientId int `json:"clientId" gorm:"column:client_id;type:int;comment:瀹㈡埛id"`
+ Client model.Client `json:"client" gorm:"foreignKey:ClientId"`
+ Number string `json:"number" gorm:"column:number;type:varchar(255);comment:閿�鍞槑缁嗗崟鍙�"`
+ SaleChanceId int `json:"saleChanceId" gorm:"column:sale_chance_id;type:int;comment:閿�鍞満浼歩d"`
+ SaleType int `json:"saleType" gorm:"column:sale_type;type:int;comment:閿�鍞被鍨�"`
+ SignTime string `json:"signTime" gorm:"column:sign_time;type:datetime;comment:绛惧崟鏃堕棿"`
+ MemberId int `json:"memberId" gorm:"column:member_id;type:int;comment:璐熻矗浜篿d"`
+ Member model.User `json:"Member" gorm:"foreignKey:MemberId"`
+ DeliveryDate string `json:"deliveryDate" gorm:"column:delivery_date;type:datetime;comment:浜よ揣鏃ユ湡"`
+ WechatOrderStatusId int `json:"wechatOrderStatusId" gorm:"column:wechat_order_status_id;type:int;comment:寰俊璁㈠崟鐘舵�乮d"`
+ Address string `json:"address" gorm:"column:address;type:varchar(255);comment:鍦板潃"`
+ Phone string `json:"phone" gorm:"column:phone;type:varchar(255);comment:鐢佃瘽"`
+ Addressee string `json:"addressee" gorm:"column:addressee;type:varchar(255);comment:鏀朵欢浜�"`
+ Conditions string `json:"conditions" gorm:"column:conditions;type:text;comment:鏉′欢"`
+ Remark string `json:"remark" gorm:"column:remark;type:text;comment:澶囨敞"`
+ Products []*model.Product `json:"products" gorm:"many2many:sales_details_product;"`
+ LogisticCompany string `json:"logisticCompany" gorm:"column:logistic_company;type:varchar(255);comment:鐗╂祦鍏徃"`
+ LogisticNumber string `json:"logisticNumber" gorm:"column:logistic_number;type:varchar(255);comment:鐗╂祦鍗曞彿"`
+ LogisticCost float64 `json:"logisticCost" gorm:"column:logistic_cost;type:decimal(10,2);comment:鐗╂祦璐圭敤"`
+ CodeStandID string `json:"codeStandID"` //缂栫爜id
+ DeliverType int `json:"deliverType"` //浜や粯绫诲瀷:1.涓�娆″彂璐�,2.澶氭鍙戣揣
+ QuotationId int `json:"quotationId" gorm:"column:quotation_id;type:int;comment:鎶ヤ环鍗昳d"`
+ Status constvar.SalesDetailsStatus `json:"status" gorm:"column:status;type:int;comment:鐘舵��"`
+ Source string `json:"source" gorm:"column:source;type:varchar(255);comment:璁㈠崟鏉ユ簮"`
+ ProjectId string `json:"projectId" gorm:"column:project_id;type:varchar(255);comment:aps椤圭洰id"`
}
type UpdateSalesDetails struct {
Id int `json:"id"`
SalesDetails SalesDetails `json:"salesDetails"`
+}
+
+type UpdateSalesDetailsStatus struct {
+ Id int `json:"id"`
+ Status constvar.SalesDetailsStatus `json:"status" gorm:"column:status;type:int;comment:鐘舵��"`
}
type GetSalesDetailsList struct {
@@ -43,5 +53,5 @@
Keyword string `json:"keyword"`
SaleChanceId int `json:"saleChanceId"` //閿�鍞満浼歩d
ClientId int `json:"clientId"` //瀹㈡埛id
- Number string `json:"number"` //閿�鍞瓙鍗曞彿
+ Number string `json:"number"` //閿�鍞槑缁嗗崟鍙�
}
--
Gitblit v1.8.0