Skip to content

Commit

Permalink
Add comment about refactor in the future DiseaseOutbreakEventAttrs to…
Browse files Browse the repository at this point in the history
… use DiseaseOutbreakEventAggregateRoot
  • Loading branch information
anagperal committed Nov 7, 2024
1 parent 783d6c8 commit 325c262
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {
DataSource,
DiseaseOutbreakEvent,
DiseaseOutbreakEventBaseAttrs,
NationalIncidentStatus,
} from "../../../domain/entities/disease-outbreak-event/DiseaseOutbreakEvent";
Expand Down Expand Up @@ -120,7 +119,7 @@ export class DiseaseOutbreakEventTestRepository implements DiseaseOutbreakEventR
]);
}

save(_diseaseOutbreak: DiseaseOutbreakEvent): FutureData<Id> {
save(_diseaseOutbreak: DiseaseOutbreakEventBaseAttrs): FutureData<Id> {
return Future.success("");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ export type DiseaseOutbreakEventBaseAttrs = NamedRef & {
notes: Maybe<string>;
};

// NOTICE: in the future, refactor to use DiseaseOutbreakEventAggregateRoot instead of this entity
export type DiseaseOutbreakEventAttrs = DiseaseOutbreakEventBaseAttrs & {
createdBy: Maybe<TeamMember>;
mainSyndrome: Maybe<NamedRef>;
Expand All @@ -88,6 +87,9 @@ export type DiseaseOutbreakEventAttrs = DiseaseOutbreakEventBaseAttrs & {
* Not using event as it is a keyword and can also be confused with dhis event
**/

/**
* @deprecated In the future, refactor to use `DiseaseOutbreakEventAggregateRoot` entity instead
*/
export class DiseaseOutbreakEvent extends Struct<DiseaseOutbreakEventAttrs>() {
//TODO: Add required validations if exists:
static validate(_data: DiseaseOutbreakEventBaseAttrs): ValidationError[] {
Expand Down

0 comments on commit 325c262

Please sign in to comment.