This repository was archived by the owner on Jul 14, 2024. It is now read-only.
generated from GabrielGuedess/NestJs-Boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add delete, delete many and update many in incident
- Loading branch information
1 parent
6b45874
commit 59bb13c
Showing
10 changed files
with
193 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { type IIncident } from 'domain/entities/OrdersEntities/IncidentEntity/Incident'; | ||
|
||
export abstract class UpdateManyIncidentDTO implements Partial<IIncident> { | ||
id: string; | ||
date_incident?: Date; | ||
date_resolved?: Date; | ||
order_process_id?: string; | ||
description?: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,19 @@ | ||
import { type GetIncidentDTO } from 'domain/dto/repositories/getDataDtos/GetIncidentDto'; | ||
import { type FindAllIncidentWhereRequestDTO } from 'domain/dto/repositories/whereDtos/FreightIncidentRepository.Dto'; | ||
import { | ||
type CountIncidentRequestDTO, | ||
type FindAllIncidentWhereRequestDTO, | ||
} from 'domain/dto/repositories/whereDtos/FreightIncidentRepository.Dto'; | ||
import { type Incident } from 'domain/entities/OrdersEntities/IncidentEntity/Incident'; | ||
|
||
export abstract class IncidentRepository { | ||
abstract countIncident(request: CountIncidentRequestDTO): Promise<number>; | ||
abstract getIncident(request: GetIncidentDTO): Promise<Incident>; | ||
abstract findAllIncident( | ||
parameters: FindAllIncidentWhereRequestDTO, | ||
): Promise<Incident[]>; | ||
abstract createIncident(expense: Incident): Promise<Incident>; | ||
abstract updateIncident(id: string, expense: Incident): Promise<Incident>; | ||
abstract updateManyIncident(data: Incident[]): Promise<Incident[]>; | ||
abstract deleteIncident(id: string): Promise<Incident>; | ||
abstract deleteManyIncident(ids: string[]): Promise<Incident[]>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters