最新成果

This commit is contained in:
eson
2023-06-01 16:19:24 +08:00
parent 5446c4123a
commit 7ffbce7759
10 changed files with 241 additions and 20 deletions

View File

@@ -8,14 +8,16 @@ import (
)
type ServiceContext struct {
Config config.Config
FsFontModel model.FsFontModel
Config config.Config
FsFontModel model.FsFontModel
FsCanteenTypeModel model.FsCanteenTypeModel
}
func NewServiceContext(c config.Config) *ServiceContext {
conn := sqlx.NewMysql(c.DataSource)
return &ServiceContext{
Config: c,
FsFontModel: model.NewFsFontModel(sqlx.NewMysql(c.DataSource)),
Config: c,
FsFontModel: model.NewFsFontModel(conn),
FsCanteenTypeModel: model.NewFsCanteenTypeModel(conn),
}
}