feat: user base

This commit is contained in:
zzw
2026-08-13 15:43:03 +08:00
parent fd34f43ed5
commit d65eb9f55f
12 changed files with 1157 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
package svc
import (
"user/internal/config"
"gorm.io/gorm"
"pkg.local/utils"
)
type ServiceContext struct {
Config config.Config
DB *gorm.DB
Prefix string
}
func NewServiceContext(c config.Config, db *gorm.DB) *ServiceContext {
return &ServiceContext{
Config: c,
DB: db,
Prefix: utils.GetConfigString("mysql.prefix"),
}
}