From 7df56581b8148d66177afa2a6390ed6fabb715d6 Mon Sep 17 00:00:00 2001 From: 9sneha-n <9sneha.n@gmail.com> Date: Wed, 26 Jun 2024 13:02:24 +0530 Subject: [PATCH] feat: disease outbreak repo functions --- .../DiseaseOutbreakD2Repository.ts | 21 +++++++++++++++++++ .../repositories/DiseaseOutbreakRepository.ts | 10 +++++++++ 2 files changed, 31 insertions(+) create mode 100644 src/data/repositories/DiseaseOutbreakD2Repository.ts create mode 100644 src/domain/repositories/DiseaseOutbreakRepository.ts diff --git a/src/data/repositories/DiseaseOutbreakD2Repository.ts b/src/data/repositories/DiseaseOutbreakD2Repository.ts new file mode 100644 index 00000000..bdf88e41 --- /dev/null +++ b/src/data/repositories/DiseaseOutbreakD2Repository.ts @@ -0,0 +1,21 @@ +import { D2Api } from "@eyeseetea/d2-api/2.36"; +import { DiseaseOutbreakRepository } from "../../domain/repositories/DiseaseOutbreakRepository"; +import { DiseaseOutbreak } from "../../domain/entities/DiseaseOutbreak"; +import { FutureData } from "../api-futures"; + +export class DiseaseOutbreakD2Repository implements DiseaseOutbreakRepository { + constructor(private api: D2Api) {} + + get(id: string): FutureData { + throw new Error("Method not implemented."); + } + getAll(): FutureData { + throw new Error("Method not implemented."); + } + save(diseaseOutbreak: DiseaseOutbreak): FutureData { + throw new Error("Method not implemented."); + } + delete(id: string): FutureData { + throw new Error("Method not implemented."); + } +} diff --git a/src/domain/repositories/DiseaseOutbreakRepository.ts b/src/domain/repositories/DiseaseOutbreakRepository.ts new file mode 100644 index 00000000..14fa7b44 --- /dev/null +++ b/src/domain/repositories/DiseaseOutbreakRepository.ts @@ -0,0 +1,10 @@ +import { Id } from "@eyeseetea/d2-api"; +import { FutureData } from "../../data/api-futures"; +import { DiseaseOutbreak } from "../entities/DiseaseOutbreak"; + +export interface DiseaseOutbreakRepository { + get(id: Id): FutureData; + getAll(): FutureData; + save(diseaseOutbreak: DiseaseOutbreak): FutureData; + delete(id: Id): FutureData; +}