@xompass/sdk-cloud-api
Version:
Xompass Client for cloud-api
291 lines • 10 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Manager = void 0;
var Manager = /** @class */ (function () {
function Manager(data) {
Object.assign(this, data);
}
/**
* The name of the model represented by this $resource,
* i.e. `Manager`.
*/
Manager.getModelName = function () {
return 'Manager';
};
/**
* @method factory
* @author Jonathan Casarrubias
* @license MIT
* This method creates an instance of Manager for dynamic purposes.
*/
Manager.factory = function (data) {
return new Manager(data);
};
/**
* @method getModelDefinition
* @author Julien Ledun
* @license MIT
* This method returns an object that represents some of the model
* definitions.
*/
Manager.getModelDefinition = function () {
return {
name: 'Manager',
plural: 'Managers',
path: 'Managers',
idName: 'id',
properties: {
name: {
name: 'name',
type: 'string'
},
surname: {
name: 'surname',
type: 'string'
},
phone: {
name: 'phone',
type: 'string'
},
address: {
name: 'address',
type: 'string'
},
birthday: {
name: 'birthday',
type: 'Date'
},
created: {
name: 'created',
type: 'Date'
},
modified: {
name: 'modified',
type: 'Date'
},
deleted: {
name: 'deleted',
type: 'Date',
default: undefined
},
otpEnabled: {
name: 'otpEnabled',
type: 'boolean'
},
disabledPasswordLogin: {
name: 'disabledPasswordLogin',
type: 'boolean'
},
username: {
name: 'username',
type: 'string'
},
email: {
name: 'email',
type: 'string'
},
emailVerified: {
name: 'emailVerified',
type: 'boolean'
},
id: {
name: 'id',
type: 'any'
},
customerId: {
name: 'customerId',
type: 'any'
},
countryId: {
name: 'countryId',
type: 'any'
},
timeZoneId: {
name: 'timeZoneId',
type: 'any'
},
password: {
name: 'password',
type: 'string'
},
},
relations: {
accessTokens: {
name: 'accessTokens',
type: 'any[]',
model: '',
relationType: 'hasMany',
keyFrom: 'id',
keyTo: 'userId'
},
activityLogs: {
name: 'activityLogs',
type: 'Log[]',
model: 'Log',
relationType: 'hasMany',
keyFrom: 'id',
keyTo: 'userId'
},
trackingLogs: {
name: 'trackingLogs',
type: 'Log[]',
model: 'Log',
relationType: 'hasMany',
keyFrom: 'id',
keyTo: 'trackingModelId'
},
loginAttempts: {
name: 'loginAttempts',
type: 'any[]',
model: '',
relationType: 'hasMany',
keyFrom: 'id',
keyTo: 'userId'
},
credentials: {
name: 'credentials',
type: 'Credential[]',
model: 'Credential',
relationType: 'hasMany',
modelThrough: 'CredentialManager',
keyThrough: 'credentialId',
keyFrom: 'id',
keyTo: 'managerId'
},
customer: {
name: 'customer',
type: 'Customer',
model: 'Customer',
relationType: 'belongsTo',
keyFrom: 'customerId',
keyTo: 'id'
},
country: {
name: 'country',
type: 'Country',
model: 'Country',
relationType: 'belongsTo',
keyFrom: 'countryId',
keyTo: 'id'
},
assets: {
name: 'assets',
type: 'Asset[]',
model: 'Asset',
relationType: 'hasMany',
modelThrough: 'ManagerAsset',
keyThrough: 'assetId',
keyFrom: 'id',
keyTo: 'managerId'
},
cctvDashboards: {
name: 'cctvDashboards',
type: 'CctvDashboard[]',
model: 'CctvDashboard',
relationType: 'hasMany',
modelThrough: 'ManagerCctvDashboard',
keyThrough: 'cctvDashboardId',
keyFrom: 'id',
keyTo: 'managerId'
},
countReports: {
name: 'countReports',
type: 'CountReport[]',
model: 'CountReport',
relationType: 'hasMany',
modelThrough: 'ManagerCountReport',
keyThrough: 'countReportId',
keyFrom: 'id',
keyTo: 'managerId'
},
eventDashboards: {
name: 'eventDashboards',
type: 'EventDashboard[]',
model: 'EventDashboard',
relationType: 'hasMany',
modelThrough: 'ManagerEventDashboard',
keyThrough: 'eventDashboardId',
keyFrom: 'id',
keyTo: 'managerId'
},
container: {
name: 'container',
type: 'any',
model: '',
relationType: 'hasOne',
keyFrom: 'id',
keyTo: 'managerId'
},
peopleCounterReports: {
name: 'peopleCounterReports',
type: 'PeopleCounterReport[]',
model: 'PeopleCounterReport',
relationType: 'hasMany',
modelThrough: 'ManagerPeopleCounterReport',
keyThrough: 'peopleCounterReportId',
keyFrom: 'id',
keyTo: 'managerId'
},
permission: {
name: 'permission',
type: 'any',
model: '',
relationType: 'hasOne',
keyFrom: 'id',
keyTo: 'managerId'
},
reports: {
name: 'reports',
type: 'Report[]',
model: 'Report',
relationType: 'hasMany',
modelThrough: 'ManagerReport',
keyThrough: 'reportId',
keyFrom: 'id',
keyTo: 'managerId'
},
storeVideoAnalyticDashboards: {
name: 'storeVideoAnalyticDashboards',
type: 'StoreVideoAnalyticDashboard[]',
model: 'StoreVideoAnalyticDashboard',
relationType: 'hasMany',
modelThrough: 'ManagerStoreVideoAnalyticDashboard',
keyThrough: 'storeVideoAnalyticDashboardId',
keyFrom: 'id',
keyTo: 'managerId'
},
timeZone: {
name: 'timeZone',
type: 'TimeZone',
model: 'TimeZone',
relationType: 'belongsTo',
keyFrom: 'timeZoneId',
keyTo: 'id'
},
trafficFlowAnalysis: {
name: 'trafficFlowAnalysis',
type: 'TrafficFlowAnalysis[]',
model: 'TrafficFlowAnalysis',
relationType: 'hasMany',
modelThrough: 'ManagerTrafficFlowAnalysis',
keyThrough: 'trafficFlowAnalysisId',
keyFrom: 'id',
keyTo: 'managerId'
},
views: {
name: 'views',
type: 'View[]',
model: 'View',
relationType: 'hasMany',
modelThrough: 'ManagerView',
keyThrough: 'viewId',
keyFrom: 'id',
keyTo: 'managerId'
},
}
};
};
return Manager;
}());
exports.Manager = Manager;
//# sourceMappingURL=Manager.js.map