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