@xompass/sdk-cloud-api
Version:
Xompass Client for cloud-api
83 lines • 2.31 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Country = void 0;
var Country = /** @class */ (function () {
function Country(data) {
Object.assign(this, data);
}
/**
* The name of the model represented by this $resource,
* i.e. `Country`.
*/
Country.getModelName = function () {
return 'Country';
};
/**
* @method factory
* @author Jonathan Casarrubias
* @license MIT
* This method creates an instance of Country for dynamic purposes.
*/
Country.factory = function (data) {
return new Country(data);
};
/**
* @method getModelDefinition
* @author Julien Ledun
* @license MIT
* This method returns an object that represents some of the model
* definitions.
*/
Country.getModelDefinition = function () {
return {
name: 'Country',
plural: 'Countries',
path: 'Countries',
idName: 'id',
properties: {
name: {
name: 'name',
type: 'string'
},
iso: {
name: 'iso',
type: 'string'
},
code: {
name: 'code',
type: 'number'
},
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'
},
}
};
};
return Country;
}());
exports.Country = Country;
//# sourceMappingURL=Country.js.map