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.

28 lines
1.0 KiB

  1. import { MetricsRepository } from '~/domain/models/metrics/metricsRepository'
  2. import { Progress, Distribution, MyProgress } 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. public async fetchRelationDistribution(projectId: string): Promise<Distribution> {
  17. return await this.repository.fetchRelationDistribution(projectId)
  18. }
  19. public async fetchMyProgress(projectId: string): Promise<MyProgress> {
  20. return await this.repository.fetchMyProgress(projectId)
  21. }
  22. }