-
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.
Removed DTO references from irrigation programs service
- Loading branch information
1 parent
d9ffeba
commit fb16ed2
Showing
6 changed files
with
58 additions
and
46 deletions.
There are no files selected for viewing
16 changes: 9 additions & 7 deletions
16
src/irrigation-programs/entities/irrigation-program.entity.ts
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,8 +1,10 @@ | ||
export interface IrrigationProgramEntity { | ||
duration: number | ||
wateringPeriod: number | ||
startTime: string | ||
switches: number[] | ||
simultaneousIrrigation: boolean | ||
nextRunDate?: string | ||
export class IrrigationProgramEntity { | ||
constructor( | ||
public readonly duration: number, | ||
public readonly wateringPeriod: number, | ||
public readonly startTime: string, | ||
public readonly switches: number[], | ||
public readonly simultaneousIrrigation: boolean, | ||
public readonly nextRunDate?: string | ||
) {} | ||
} |
9 changes: 9 additions & 0 deletions
9
src/irrigation-programs/interfaces/irrigation-program.interface.ts
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 @@ | ||
export interface IrrigationProgram { | ||
id: string | ||
duration: number | ||
wateringPeriod: number | ||
startTime: string | ||
switches: number[] | ||
simultaneousIrrigation: boolean | ||
nextRunDate?: 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
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,5 @@ | ||
import { IrrigationProgram } from '../interfaces/irrigation-program.interface' | ||
|
||
export type CreateIrrigationProgram = Omit<IrrigationProgram, 'id'> | ||
|
||
export type UpdateIrrigationProgram = Partial<Omit<IrrigationProgram, 'id'>> |