// TODO add position class // proper constructor export class Touchpoint { id: string; tenantId: string; // storeId: string; // type: string; // appId: string; // name: string; // description: string; // position: any; users: string[]; created: string; updated: string; cartId: string; public static fromJson (obj: any) { return new Touchpoint( obj.id, obj.tenantId, obj.storeId, obj.type, obj.appId, obj.name, obj.description, obj.position, obj.users, obj.created, obj.updated, obj.cartId ); // return new Touchpoint(); }; public toJson() { const TouchpointJson: any = { id: this.id, tenantId: this.tenantId, storeId: this.storeId, type: this.type, appId: this.appId, name: this.name, description: this.description, position: this.position, users : this.users, created: this.created, updated: this.updated, cartId: this.cartId }; return TouchpointJson; } constructor( id: string, // tenantId: string, // storeId: string, // type: string, // appId: string, // name: string, // description: string, // position: any, users: string[], created: string, updated: string, cartId: string /* { floor: String, department: String, table: String, x: String, y: String }, */ ) { this.id = id; this.tenantId = tenantId; this.storeId = storeId; this.type = type; this.appId = appId; this.name = name; this.description = description; this.position = position; this.users = users ? users : []; this.created = created; this.updated = updated; this.cartId = cartId; // class for position? // this.position = { // floor: 1, // department: 'home', // table: undefined, // x: 1234, // y: 889 // }; } // getters }