初始化项目

This commit is contained in:
lianghuanjie
2024-12-05 20:51:35 +08:00
commit e2ba6924b8
30 changed files with 1560 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
package svc
import (
"nova_task/internal/config"
"nova_task/internal/model"
)
type ServiceContext struct {
Config config.Config
TaskModel model.NhTaskModel
}
func NewServiceContext(c config.Config) *ServiceContext {
return &ServiceContext{
Config: c,
TaskModel: model.NewNhTaskModel(c.MySql.Conn()),
}
}