Basic Chat and Message model implementation

This commit is contained in:
Pedro Lopez
2019-02-17 21:14:31 -04:00
parent 1dab219764
commit 6442469437
10 changed files with 118 additions and 18 deletions

View File

@@ -11,6 +11,29 @@ class Base {
*/
Object.defineProperty(this, 'client', { value: client });
}
_clone() {
return Object.assign(Object.create(this), this);
}
_patch(data) { return data; }
/**
* Name that represents this model in the WhatsApp Web Store
* @readonly
*/
static get WAppModel() {
return this.name;
}
/**
* Extra fields to add to model serialization
* @readonly
*/
static get extraFields() {
return [];
}
}
module.exports = Base;