import { XMLElem, type IToXML } from "@/util/XmlElem"; export class UARolePermission implements IToXML{ constructor(public nodeId: string, public rolePermission: number) { } toXML(): XMLElem { return new XMLElem('RolePermission', this.nodeId).attr('Permissions', this.rolePermission.toString()); } static fromXML(xmlObject: any): UARolePermission { return new UARolePermission( xmlObject['@_Permissions'], Number(xmlObject['#text'])); } }