From 250cbfa1ddcb3cf38e0d0505c1c7e282b940d25b Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期五, 13 十月 2023 10:30:05 +0800
Subject: [PATCH] admin user id 转crm user id

---
 model/salesLeads.go |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/model/salesLeads.go b/model/salesLeads.go
index a2cc2aa..75ff864 100644
--- a/model/salesLeads.go
+++ b/model/salesLeads.go
@@ -9,7 +9,8 @@
 type (
 	SalesLeads struct {
 		Id              int                  `json:"id" gorm:"column:id;primary_key;AUTO_INCREMENT"`
-		Name            string               `json:"name" gorm:"column:name;unique;type:varchar(255);comment:鍏徃鍚嶇О"`
+		Name            string               `json:"name" gorm:"column:name;uniqueIndex:name_isDeleted_idx;;type:varchar(255);comment:鍏徃鍚嶇О"`
+		IsDeleted       bool                 `json:"-" gorm:"column:is_deleted;uniqueIndex:name_isDeleted_idx;type:tinyint(1);comment:鏄惁鍒犻櫎"`
 		Number          string               `json:"number" gorm:"column:number;type:varchar(255);comment:閿�鍞嚎绱㈢紪鍙�"`
 		ContactName     string               `json:"contact_name" gorm:"column:contact_name;type:varchar(255);comment:鑱旂郴浜哄鍚�"`
 		ContactPhone    string               `json:"contact_phone" gorm:"column:contact_phone;type:varchar(255);comment:鑱旂郴浜虹數璇�"`
@@ -22,6 +23,7 @@
 		Desc            string               `json:"desc" gorm:"column:desc;type:varchar(255);comment:澶囨敞"`
 		Reason          string               `json:"reason" gorm:"column:reason;type:text;comment:澶辫触鍘熷洜"`
 		FollowRecord    []FollowRecord       `gorm:"foreignKey:SalesLeadsId"`
+		DetailAddress   string               `json:"detail_address" gorm:"column:detail_address;type:varchar(255);comment:璇︾粏鍦板潃"`
 		Address
 		gorm.Model `json:"-"`
 	}
@@ -107,6 +109,7 @@
 
 func (slf *SalesLeadsSearch) Delete() error {
 	var db = slf.build()
+	db.Update("is_deleted", 1)
 	return db.Delete(&SalesLeads{}).Error
 }
 

--
Gitblit v1.8.0