package svc import ( "github.com/tal-tech/go-zero/core/stores/sqlx" "points_service/rpc/internal/config" "points_service/rpc/model" ) type ServiceContext struct { Config config.Config Model model.IntegralBalanceModel } func NewServiceContext(c config.Config) *ServiceContext { return &ServiceContext{ Config: c, Model: model.NewIntegralBalanceModel(sqlx.NewMysql(c.DataSource),c.Cache), } }