armisa-models
Version:
models of armisa!
30 lines (29 loc) • 1.19 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.StructrulCodeTreeViewCode = void 0;
class StructrulCodeTreeViewCode {
static deserialize(data, children) {
return new StructrulCodeTreeViewCode(data.id, data.parentId, data.code, data.name, data.isExpanded, data.isLoading, data.childCount, data.check ?? 0, children, data.fullName ?? [], data.firstName || '');
}
constructor(id, parentId, code, name, isExpanded, isLoading, childCount, check, children, fullName, firstName) {
this.id = id;
this.parentId = parentId;
this.code = code;
this.name = name;
this.isExpanded = isExpanded;
this.isLoading = isLoading;
this.childCount = childCount;
this.check = check;
this.fullName = fullName;
this.firstName = firstName;
if (children) {
this.children = children.map((item) => {
return StructrulCodeTreeViewCode.deserialize(item, item.children);
});
}
else {
this.children = null;
}
}
}
exports.StructrulCodeTreeViewCode = StructrulCodeTreeViewCode;