feat: user base
This commit is contained in:
@@ -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"),
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user