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.

21 lines
721 B

  1. import { AnnotationRepository } from '~/domain/models/tasks/annotationRepository'
  2. import { AnnotationModel } from '~/domain/models/tasks/interface'
  3. export class AnnotationApplicationService<T extends AnnotationModel> {
  4. constructor(
  5. readonly repository: AnnotationRepository<T>
  6. ) {}
  7. public async delete(projectId: string, docId: number, annotationId: number): Promise<void> {
  8. await this.repository.delete(projectId, docId, annotationId)
  9. }
  10. public async clear(projectId: string, docId: number): Promise<void> {
  11. await this.repository.clear(projectId, docId)
  12. }
  13. public async autoLabel(projectId: string, docId: number): Promise<void> {
  14. await this.repository.autoLabel(projectId, docId)
  15. }
  16. }