mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-20 04:29:15 +00:00
39 lines
698 B
JavaScript
39 lines
698 B
JavaScript
'use strict';
|
|
|
|
/**
|
|
* Represents a data model
|
|
*/
|
|
class Base {
|
|
constructor(client) {
|
|
/**
|
|
* The client that instantiated this
|
|
* @readonly
|
|
*/
|
|
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; |