feat: 添加数据库配置和相关模型定义

This commit is contained in:
2026-03-31 14:44:14 +08:00
parent 776e085ea3
commit b7cce0befa
12 changed files with 284 additions and 60 deletions

26
consts/account/status.go Normal file
View File

@@ -0,0 +1,26 @@
package account
import "github.com/gogf/gf/v2/util/gconv"
var (
StatusDisable = newStatus(gconv.PtrInt8(0), "disable")
StatusEnable = newStatus(gconv.PtrInt8(1), "enable")
)
type Status *int8
type status struct {
code Status
desc string
}
func (s status) Code() Status {
return s.code
}
func (s status) Desc() string {
return s.desc
}
func newStatus(code Status, desc string) status {
return status{code: code, desc: desc}
}