// TODO add position class // proper constructor export class Beacon { id: string; uuid: string; major: number; minor: number; identifier: string; tenantId: string; storeId: string; touchpointId: string; position: any; public static fromJson (obj: any) { return new Beacon( obj.id, obj.uuid, obj.major, obj.minor, obj.identifier, obj.tenantId, obj.storeId, obj.touchpointId, obj.position ); // return new Beacon(); }; public toJson() { const beaconJson: any = { id: this.id, uuid: this.uuid, major: this.major, minor: this.minor, identifier: this.identifier, tenantId: this.tenantId, storeId: this.storeId, touchpointId: this.touchpointId, position: this.position }; return beaconJson; } // constructor() { // this.uuid = 'ec20d782-2fbd-430f-925a-0444de483b71'; // this.major = 12; // this.minor = 232; // this.identifier = 'omnixell xyz'; // this.tenantId = '56ea50cb8f535eecb185917f'; // this.storeId = '57a9594774b4839936128133'; // this.touchpointId = undefined;` // this.position = { // floor: 1, // department: 'home', // table: undefined, // x: 1234, // y: 889 // }; // } constructor(id: string, uuid: string, major: number, minor: number, identifier: string, tenantId: string, storeId: string, touchpointId: string, position: any ) { this.id = id; this.uuid = uuid; this.major = major; this.minor = minor; this.identifier = identifier; this.tenantId = tenantId; this.storeId = storeId; this.touchpointId = touchpointId; this.position = position; } getId() { return this.id; }; getUuid() { return this.uuid; }; getMajor() { return this.major; }; getMinor() { return this.minor; }; getIdentifier() { return this.identifier; }; getStoreId() { return this.storeId; }; gettenantId() { return this.tenantId; }; getTouchpointId() { return this.touchpointId; }; getPosition() { return this.position; }; }