package svc import ( "fusenapi/model" "fusenapi/product/internal/config" "github.com/zeromicro/go-zero/core/stores/sqlx" ) type ServiceContext struct { Config config.Config FsProductModel model.FsProductModel } func NewServiceContext(c config.Config) *ServiceContext { return &ServiceContext{ Config: c, FsProductModel: model.NewFsProductModel(sqlx.NewMysql(c.DataSource)), } }