第 5 阶段:纠纷、通知与后台-3

This commit is contained in:
yml
2026-05-22 16:59:07 +08:00
parent aee3455e9a
commit e72decebc8
11 changed files with 447 additions and 5 deletions
@@ -0,0 +1,20 @@
package admindashboard
import "errors"
var ErrDependencyUnavailable = errors.New("dependency unavailable")
type Service struct {
repo *Repository
}
func NewService(repo *Repository) *Service {
return &Service{repo: repo}
}
func (s *Service) Summary() (*DashboardDTO, error) {
if s.repo == nil {
return nil, ErrDependencyUnavailable
}
return s.repo.Summary()
}