UNPKG

@xompass/sdk-cloud-api

Version:

Xompass Client for cloud-api

125 lines 3.92 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AssetType = void 0; var AssetType = /** @class */ (function () { function AssetType(data) { this.assetWizardTypeIds = []; this.eventTypeIds = []; this.sensorTypeIds = []; Object.assign(this, data); } /** * The name of the model represented by this $resource, * i.e. `AssetType`. */ AssetType.getModelName = function () { return 'AssetType'; }; /** * @method factory * @author Jonathan Casarrubias * @license MIT * This method creates an instance of AssetType for dynamic purposes. */ AssetType.factory = function (data) { return new AssetType(data); }; /** * @method getModelDefinition * @author Julien Ledun * @license MIT * This method returns an object that represents some of the model * definitions. */ AssetType.getModelDefinition = function () { return { name: 'AssetType', plural: 'AssetTypes', path: 'AssetTypes', idName: 'id', properties: { type: { name: 'type', type: 'string' }, name: { name: 'name', type: 'string' }, description: { name: 'description', type: 'string' }, created: { name: 'created', type: 'Date' }, modified: { name: 'modified', type: 'Date' }, deleted: { name: 'deleted', type: 'Date', default: undefined }, id: { name: 'id', type: 'any' }, assetWizardTypeIds: { name: 'assetWizardTypeIds', type: 'Array<any>', default: [] }, eventTypeIds: { name: 'eventTypeIds', type: 'Array<any>', default: [] }, sensorTypeIds: { name: 'sensorTypeIds', type: 'Array<any>', default: [] }, }, relations: { assetWizardTypes: { name: 'assetWizardTypes', type: 'AssetWizardType[]', model: 'AssetWizardType', relationType: 'referencesMany', keyFrom: 'assetWizardTypeIds', keyTo: 'id' }, eventTypes: { name: 'eventTypes', type: 'EventType[]', model: 'EventType', relationType: 'referencesMany', keyFrom: 'eventTypeIds', keyTo: 'id' }, trackingLogs: { name: 'trackingLogs', type: 'Log[]', model: 'Log', relationType: 'hasMany', keyFrom: 'id', keyTo: 'trackingModelId' }, sensorTypes: { name: 'sensorTypes', type: 'SensorType[]', model: 'SensorType', relationType: 'referencesMany', keyFrom: 'sensorTypeIds', keyTo: 'id' }, } }; }; return AssetType; }()); exports.AssetType = AssetType; //# sourceMappingURL=AssetType.js.map