Files
lone-services/services/equipment/internal/svc/servicecontext.go
T
gjs eb96aaa2ef
CI / changes (push) Successful in 37s
CI / ad (push) Successful in 44s
CI / admin (push) Successful in 39s
CI / bff (push) Successful in 32s
CI / chore (push) Successful in 38s
CI / express (push) Successful in 42s
CI / product (push) Successful in 43s
CI / sale (push) Successful in 42s
CI / task (push) Successful in 42s
CI / user (push) Successful in 42s
CI / wecom (push) Successful in 41s
epuiment
2026-09-01 15:38:59 +08:00

24 lines
385 B
Go

package svc
import (
"lone-services/pkg/utils"
"lone-services/services/equipment/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"),
}
}