44 lines
1.0 KiB
JavaScript
44 lines
1.0 KiB
JavaScript
import CellsysStyle from './cellsysStyle.js';
|
|
import { CellsysType } from './cellsysUtil.js';
|
|
|
|
class CellsysMemberType {
|
|
constructor(params = {}) {
|
|
this.cellsysType = CellsysType.MemberType;
|
|
this.id = params.id;
|
|
this.name = params.name;
|
|
this.orgId = params.org_id;
|
|
this.orgName = params.org_name;
|
|
this.style = params.style || {};
|
|
this.description = params.description;
|
|
this.typeCount = params.type_count || 0;
|
|
this.isPublish = params.is_publish || 0;
|
|
}
|
|
|
|
setId(value) {
|
|
this.id = value;
|
|
}
|
|
|
|
setName(value) {
|
|
this.name = value;
|
|
}
|
|
|
|
setDescription(value) {
|
|
this.description = value;
|
|
}
|
|
|
|
setStyle(value) {
|
|
let styleObj = new CellsysStyle(value);
|
|
this.style = styleObj.getMemberStyle();
|
|
}
|
|
|
|
getIcon() {
|
|
return this.style ? this.style.icon : null;
|
|
}
|
|
|
|
getColor() {
|
|
return this.style ? this.style.color : null;
|
|
}
|
|
}
|
|
|
|
export default CellsysMemberType;
|