Files
lone-services/services/sale/internal/svc/serviceContext.go
T
2026-08-28 10:49:09 +08:00

23 lines
379 B
Go

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