init: taotie-api 项目初始化

This commit is contained in:
2026-05-16 00:14:19 +08:00
commit eb15ef4b87
33 changed files with 1746 additions and 0 deletions

18
common/errsys.go Normal file
View File

@@ -0,0 +1,18 @@
package common
import (
"github.com/duke-git/lancet/v2/xerror"
)
var (
ErrSysOk = xerror.New("ok").Id("0") // 成功
ErrSysInternal = xerror.New("未知内部错误").Id("50") // 未知内部错误
ErrSysNil = xerror.New("空指针").Id("51") // 空指针
ErrSysValidationFailed = xerror.New("校验失败").Id("52") // 校验失败
ErrSysDbError = xerror.New("数据库错误").Id("53") // 数据库错误
ErrSysDuplicate = xerror.New("重复数据").Id("s0001") // 重复数据
ErrSysInvalid = xerror.New("数据无效").Id("s0002") // 数据无效
ErrSysDataNotFound = xerror.New("数据不存在").Id("s0003") // 数据不存在
)