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