@xompass/sdk-cloud-api
Version:
Xompass Client for cloud-api
139 lines • 4.17 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Summary = void 0;
var Summary = /** @class */ (function () {
function Summary(data) {
Object.assign(this, data);
}
/**
* The name of the model represented by this $resource,
* i.e. `Summary`.
*/
Summary.getModelName = function () {
return 'Summary';
};
/**
* @method factory
* @author Jonathan Casarrubias
* @license MIT
* This method creates an instance of Summary for dynamic purposes.
*/
Summary.factory = function (data) {
return new Summary(data);
};
/**
* @method getModelDefinition
* @author Julien Ledun
* @license MIT
* This method returns an object that represents some of the model
* definitions.
*/
Summary.getModelDefinition = function () {
return {
name: 'Summary',
plural: 'Summaries',
path: 'Summaries',
idName: 'id',
properties: {
id: {
name: 'id',
type: 'string'
},
type: {
name: 'type',
type: 'string'
},
from: {
name: 'from',
type: 'Date'
},
to: {
name: 'to',
type: 'Date'
},
length: {
name: 'length',
type: 'number'
},
detail: {
name: 'detail',
type: 'any'
},
updated: {
name: 'updated',
type: 'boolean'
},
created: {
name: 'created',
type: 'Date'
},
modified: {
name: 'modified',
type: 'Date'
},
deleted: {
name: 'deleted',
type: 'Date',
default: undefined
},
assetId: {
name: 'assetId',
type: 'any'
},
sensorId: {
name: 'sensorId',
type: 'any'
},
summaryForAssetId: {
name: 'summaryForAssetId',
type: 'string'
},
},
relations: {
trackingLogs: {
name: 'trackingLogs',
type: 'Log[]',
model: 'Log',
relationType: 'hasMany',
keyFrom: 'id',
keyTo: 'trackingModelId'
},
asset: {
name: 'asset',
type: 'Asset',
model: 'Asset',
relationType: 'belongsTo',
keyFrom: 'assetId',
keyTo: 'id'
},
sensor: {
name: 'sensor',
type: 'Sensor',
model: 'Sensor',
relationType: 'belongsTo',
keyFrom: 'sensorId',
keyTo: 'id'
},
datasets: {
name: 'datasets',
type: 'Dataset[]',
model: 'Dataset',
relationType: 'hasMany',
keyFrom: 'id',
keyTo: 'summaryId'
},
summaryForAsset: {
name: 'summaryForAsset',
type: 'SummaryForAsset',
model: 'SummaryForAsset',
relationType: 'belongsTo',
keyFrom: 'summaryForAssetId',
keyTo: 'id'
},
}
};
};
return Summary;
}());
exports.Summary = Summary;
//# sourceMappingURL=Summary.js.map