UNPKG

@xompass/sdk-cloud-api

Version:

Xompass Client for cloud-api

144 lines (138 loc) 3.48 kB
import {ModelDefinition} from './BaseModels'; import {Log} from './Log'; import {Project} from './Project'; import {Manager} from './Manager'; declare var Object: any; export interface StoreVideoAnalyticDashboardInterface { name: string; description?: string; layers?: any; created?: Date; modified?: Date; deleted?: Date; id?: any; projectId?: any; trackingLogs?: Log[]; project?: Project; managers?: Manager[]; container?: any; } export class StoreVideoAnalyticDashboard implements StoreVideoAnalyticDashboardInterface { name: string; description: string; layers: any; created: Date; modified: Date; deleted: Date; id: any; projectId: any; trackingLogs?: Log[]; project?: Project; managers?: Manager[]; container?: any; constructor(data?: StoreVideoAnalyticDashboardInterface) { Object.assign(this, data); } /** * The name of the model represented by this $resource, * i.e. `StoreVideoAnalyticDashboard`. */ public static getModelName(): string { return 'StoreVideoAnalyticDashboard'; } /** * @method factory * @author Jonathan Casarrubias * @license MIT * This method creates an instance of StoreVideoAnalyticDashboard for dynamic purposes. */ public static factory(data: StoreVideoAnalyticDashboardInterface): StoreVideoAnalyticDashboard{ return new StoreVideoAnalyticDashboard(data); } /** * @method getModelDefinition * @author Julien Ledun * @license MIT * This method returns an object that represents some of the model * definitions. */ public static getModelDefinition(): ModelDefinition { return { name: 'StoreVideoAnalyticDashboard', plural: 'StoreVideoAnalyticDashboards', path: 'StoreVideoAnalyticDashboards', idName: 'id', properties: { name: { name: 'name', type: 'string' }, description: { name: 'description', type: 'string' }, layers: { name: 'layers', type: 'any' }, created: { name: 'created', type: 'Date' }, modified: { name: 'modified', type: 'Date' }, deleted: { name: 'deleted', type: 'Date', default: undefined }, id: { name: 'id', type: 'any' }, projectId: { name: 'projectId', type: 'any' }, }, relations: { trackingLogs: { name: 'trackingLogs', type: 'Log[]', model: 'Log', relationType: 'hasMany', keyFrom: 'id', keyTo: 'trackingModelId' }, project: { name: 'project', type: 'Project', model: 'Project', relationType: 'belongsTo', keyFrom: 'projectId', keyTo: 'id' }, managers: { name: 'managers', type: 'Manager[]', model: 'Manager', relationType: 'hasMany', modelThrough: 'ManagerStoreVideoAnalyticDashboard', keyThrough: 'managerId', keyFrom: 'id', keyTo: 'storeVideoAnalyticDashboardId' }, container: { name: 'container', type: 'any', model: '', relationType: 'hasOne', keyFrom: 'id', keyTo: 'storeVideoAnalyticDashboardId' }, } }; } }