Browse Source

update db err define

ls 2 years ago
parent
commit
3206fd98b8
1 changed files with 10 additions and 6 deletions
  1. 10 6
      db/config.go

+ 10 - 6
db/config.go

@@ -8,12 +8,16 @@ import (
 
 // DB error code
 const (
-	ErrOK         = 0 // ErrOK ok
-	ErrException  = 1 // ErrException exception
-	ErrExists     = 2 // ErrExists exists
-	ErrNotFound   = 3 // ErrNotFound not found
-	ErrAuthorized = 4 // ErrAuthorized authorized
-	ErrNotConnect = 5 // ErrNotConnect connect error
+	ErrOK                  = 0 // ErrOK ok
+	ErrException           = 1 // ErrException exception 异常
+	ErrExists              = 2 // ErrExists exists 数据存在
+	ErrNotFound            = 3 // ErrNotFound not found 未找到关键数据
+	ErrAuthorized          = 4 // ErrAuthorized authorized 未认证
+	ErrNotConnect          = 5 // ErrNotConnect connect error 数据库内部连接错误
+	ErrDataNotFound        = 6 // data not found 数据未找到
+	ErrExpired             = 7 // expired 已过期
+	ErrInsufficientBalance = 8 // insufficient balance 余额不足
+	ErrCreditLimit         = 9 // Credit Limit 超额
 )
 
 // Config config