| | |
| | | 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:联系人电话"` |
| | |
| | | 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:"-"` |
| | | } |
| | |
| | | |
| | | func (slf *SalesLeadsSearch) Delete() error { |
| | | var db = slf.build() |
| | | db.Update("is_deleted", 1) |
| | | return db.Delete(&SalesLeads{}).Error |
| | | } |
| | | |