@xompass/sdk-cloud-api
Version:
Xompass Client for cloud-api
91 lines • 2.75 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.DeviceEventType = void 0;
var DeviceEventType = /** @class */ (function () {
function DeviceEventType(data) {
Object.assign(this, data);
}
/**
* The name of the model represented by this $resource,
* i.e. `DeviceEventType`.
*/
DeviceEventType.getModelName = function () {
return 'DeviceEventType';
};
/**
* @method factory
* @author Jonathan Casarrubias
* @license MIT
* This method creates an instance of DeviceEventType for dynamic purposes.
*/
DeviceEventType.factory = function (data) {
return new DeviceEventType(data);
};
/**
* @method getModelDefinition
* @author Julien Ledun
* @license MIT
* This method returns an object that represents some of the model
* definitions.
*/
DeviceEventType.getModelDefinition = function () {
return {
name: 'DeviceEventType',
plural: 'DeviceEventTypes',
path: 'DeviceEventTypes',
idName: 'id',
properties: {
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'
},
customerId: {
name: 'customerId',
type: 'any'
},
},
relations: {
customer: {
name: 'customer',
type: 'Customer',
model: 'Customer',
relationType: 'belongsTo',
keyFrom: 'customerId',
keyTo: 'id'
},
trackingLogs: {
name: 'trackingLogs',
type: 'Log[]',
model: 'Log',
relationType: 'hasMany',
keyFrom: 'id',
keyTo: 'trackingModelId'
},
}
};
};
return DeviceEventType;
}());
exports.DeviceEventType = DeviceEventType;
//# sourceMappingURL=DeviceEventType.js.map