Skip to content

Commit

Permalink
feat: disease outbreak repo functions
Browse files Browse the repository at this point in the history
  • Loading branch information
9sneha-n committed Jun 26, 2024
1 parent 11a8739 commit 7df5658
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/data/repositories/DiseaseOutbreakD2Repository.ts
Original file line number Diff line number Diff line change
@@ -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<DiseaseOutbreak> {
throw new Error("Method not implemented.");
}
getAll(): FutureData<DiseaseOutbreak[]> {
throw new Error("Method not implemented.");
}
save(diseaseOutbreak: DiseaseOutbreak): FutureData<void> {
throw new Error("Method not implemented.");
}
delete(id: string): FutureData<void> {
throw new Error("Method not implemented.");
}
}
10 changes: 10 additions & 0 deletions src/domain/repositories/DiseaseOutbreakRepository.ts
Original file line number Diff line number Diff line change
@@ -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<DiseaseOutbreak>;
getAll(): FutureData<DiseaseOutbreak[]>;
save(diseaseOutbreak: DiseaseOutbreak): FutureData<void>;
delete(id: Id): FutureData<void>;
}

0 comments on commit 7df5658

Please sign in to comment.