- more detail error info 4 RegisterUser

This commit is contained in:
gazebo
2019-03-04 17:25:29 +08:00
parent 2fe55bcb2b
commit 4071308185
5 changed files with 28 additions and 19 deletions

View File

@@ -5,10 +5,11 @@ import "errors"
const (
ErrorCodeIgnore = "ignore"
ErrCodeSuccess = "0"
ErrCodeGeneralFailed = "-1"
ErrCodeTokenIsInvalid = "-2"
ErrCodeUserNotExist = "-3"
ErrCodeSuccess = "0"
ErrCodeGeneralFailed = "-1"
ErrCodeTokenIsInvalid = "-2"
ErrCodeUserNotExist = "-3"
ErrCodeUserAlreadyExist = "-4"
)
var (

View File

@@ -20,7 +20,7 @@ func (*User) TableUnique() [][]string {
return [][]string{
[]string{"UserID", "DeletedAt"},
[]string{"UserID2", "DeletedAt"},
[]string{"Name", "DeletedAt"},
// []string{"Name", "DeletedAt"},
[]string{"Mobile", "DeletedAt"},
// []string{"Email", "DeletedAt"},
// []string{"IDCardNo", "DeletedAt"},