-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Third try to fix conflicts and... build!
- Loading branch information
Showing
3 changed files
with
64 additions
and
153 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
backend/lib/entities/state/attributes/OperationModeStateAttribute.js
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,40 @@ | ||
const StateAttribute = require("./StateAttribute"); | ||
|
||
class OperationModeStateAttribute extends StateAttribute { | ||
/** | ||
* @param {object} options | ||
* @param {OperationModeAttributeValue} options.value | ||
* @param {object} [options.metaData] | ||
*/ | ||
constructor(options) { | ||
super(options); | ||
|
||
this.value = options.value; | ||
} | ||
|
||
/** | ||
* | ||
* @param {OperationModeStateAttribute} otherAttribute | ||
* @return {boolean} | ||
*/ | ||
equals(otherAttribute) { | ||
return this.__class === otherAttribute.__class && | ||
this.type === otherAttribute.type && | ||
this.subType === otherAttribute.subType && | ||
this.value === otherAttribute.value; | ||
} | ||
} | ||
|
||
/** | ||
* @typedef {string} OperationModeAttributeValue | ||
* @enum {string} | ||
* | ||
*/ | ||
OperationModeStateAttribute.VALUE = Object.freeze({ | ||
VACUUM: "vacuum", | ||
MOP: "mop", | ||
VACUUM_AND_MOP: "vacuum_and_mop" | ||
}); | ||
|
||
|
||
module.exports = OperationModeStateAttribute; |
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