You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
724 B

  1. import { MetricsRepository } from '~/domain/models/metrics/metricsRepository'
  2. import { Progress, Distribution } from '~/domain/models/metrics/metrics'
  3. export class MetricsApplicationService {
  4. constructor(
  5. private readonly repository: MetricsRepository
  6. ) {}
  7. public async fetchMemberProgress(projectId: string): Promise<Progress> {
  8. return await this.repository.fetchMemberProgress(projectId)
  9. }
  10. public async fetchCategoryDistribution(projectId: string): Promise<Distribution> {
  11. return await this.repository.fetchCategoryDistribution(projectId)
  12. }
  13. public async fetchSpanDistribution(projectId: string): Promise<Distribution> {
  14. return await this.repository.fetchSpanDistribution(projectId)
  15. }
  16. }