IuryNogueira/myreef

View on GitHub
back/src/domain/entity/Buoy.ts

Summary

Maintainability
A
0 mins
Test Coverage
export class Buoy {
currentValue: boolean;
last_update!: string;
 
constructor (
readonly id: number,
readonly aquariumId: number,
readonly name: string,
readonly description: string,
currentValue: boolean
) {
this.currentValue = currentValue
}
 
isOn (): boolean {
return this.currentValue === true
}
 
update (newValue: boolean): void {
this.currentValue = newValue
}
}