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 |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/model/salesLeads.go b/model/salesLeads.go
index d9c52c6..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:鑱旂郴浜虹數璇�"`
@@ -108,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