mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-11-13 19:23:33 +08:00
188a40b196
This will be better for future use of JSON.stringify() and JSON.parse() For now the difference between the PHP JSON being PascalCase and the JS object properties being camelCase is handled by AbstractModel
25 lines
480 B
JavaScript
25 lines
480 B
JavaScript
import ko from 'ko';
|
|
|
|
import { AbstractModel } from 'Knoin/AbstractModel';
|
|
|
|
class TemplateModel extends AbstractModel {
|
|
/**
|
|
* @param {string} id
|
|
* @param {string} name
|
|
* @param {string} body
|
|
*/
|
|
constructor(id = '', name = '', body = '') {
|
|
super();
|
|
|
|
this.id = id;
|
|
this.name = name;
|
|
this.body = body;
|
|
this.populated = true;
|
|
|
|
this.deleteAccess = ko.observable(false);
|
|
}
|
|
|
|
// static reviveFromJson(json) {}
|
|
}
|
|
|
|
export { TemplateModel, TemplateModel as default };
|