Files
lone-services/product/internal/svc/servicecontext.go
T
2026-08-05 17:37:32 +08:00

22 lines
309 B
Go

package svc
import (
"product/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: c.Mysql.Prefix,
}
}