From 001cf568636ea7633493c7143e0111220d12a15e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Fri, 12 Aug 2022 15:51:56 +0800 Subject: [PATCH] 1 --- business/model/user.go | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/business/model/user.go b/business/model/user.go index d36f004c4..e806aa4c1 100644 --- a/business/model/user.go +++ b/business/model/user.go @@ -61,12 +61,17 @@ type User struct { UnionId string `json:"union_id" db:"union_id"` // 微信用户Id } -func (*User) TableUnique() [][]string { +func (user *User) TableUnique() [][]string { return [][]string{ - []string{"UserID"}, []string{"Mobile", "DeletedAt"}, - []string{"Email", "DeletedAt"}, - // []string{"IDCardNo", "DeletedAt"}, + } +} + +func (user *User) TableIndex() [][]string { + return [][]string{ + []string{"Mobile"}, + []string{"OpenId"}, + []string{"UserID"}, } }