This commit is contained in:
2026-10-16 17:40:51 +08:00
parent f5749b87dc
commit 9c8ce51f4f
27 changed files with 1892 additions and 1 deletions
@@ -0,0 +1,22 @@
package svc
import (
"lone-services/pkg/utils"
"lone-services/services/water/internal/config"
"gorm.io/gorm"
)
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"),
}
}