lonelog to record
CI / changes (push) Successful in 35s
CI / ad (push) Successful in 3s
CI / admin (push) Successful in 1s
CI / bff (push) Successful in 1s
CI / chore (push) Successful in 2s
CI / equipment (push) Successful in 2s
CI / express (push) Successful in 2s
CI / product (push) Successful in 2s
CI / record (push) Successful in 27s
CI / sale (push) Successful in 2s
CI / task (push) Successful in 2s
CI / user (push) Successful in 2s
CI / wecom (push) Successful in 2s
CI / changes (push) Successful in 35s
CI / ad (push) Successful in 3s
CI / admin (push) Successful in 1s
CI / bff (push) Successful in 1s
CI / chore (push) Successful in 2s
CI / equipment (push) Successful in 2s
CI / express (push) Successful in 2s
CI / product (push) Successful in 2s
CI / record (push) Successful in 27s
CI / sale (push) Successful in 2s
CI / task (push) Successful in 2s
CI / user (push) Successful in 2s
CI / wecom (push) Successful in 2s
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package svc
|
||||
|
||||
import (
|
||||
"lone-services/pkg/utils"
|
||||
"lone-services/services/record/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"),
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user