UNPKG

@sourceloop/ctrl-plane-tenant-management-service

Version:

Tenant Management microservice for SaaS control plane

63 lines 2.23 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Resource = void 0; const tslib_1 = require("tslib"); const repository_1 = require("@loopback/repository"); const tenant_model_1 = require("./tenant.model"); const types_1 = require("../types"); const core_1 = require("@sourceloop/core"); let Resource = class Resource extends core_1.UserModifiableEntity { constructor(data) { super(data); } }; exports.Resource = Resource; tslib_1.__decorate([ (0, repository_1.property)({ type: 'string', id: true, generated: true, }), tslib_1.__metadata("design:type", String) ], Resource.prototype, "id", void 0); tslib_1.__decorate([ (0, repository_1.property)({ description: 'identifier for the resource in the external system it was provisioned', name: 'external_identifier', type: 'string', required: true, }), tslib_1.__metadata("design:type", String) ], Resource.prototype, "externalIdentifier", void 0); tslib_1.__decorate([ (0, repository_1.property)({ description: 'type of the resource like storage, compute, etc', name: 'type', type: 'string', required: true, }), tslib_1.__metadata("design:type", String) ], Resource.prototype, "type", void 0); tslib_1.__decorate([ (0, repository_1.property)({ description: 'any type specific metadata of the resource like connection info, size, etc', type: 'object', required: true, }), tslib_1.__metadata("design:type", Object) ], Resource.prototype, "metadata", void 0); tslib_1.__decorate([ (0, repository_1.belongsTo)(() => tenant_model_1.Tenant, { keyTo: 'id' }, { description: 'id of the tenant for which this resource is provisioned', name: 'tenant_id', }), tslib_1.__metadata("design:type", String) ], Resource.prototype, "tenantId", void 0); exports.Resource = Resource = tslib_1.__decorate([ (0, repository_1.model)({ name: 'resources', description: 'model for resources that are provisioned for a tenant', }), tslib_1.__metadata("design:paramtypes", [Object]) ], Resource); //# sourceMappingURL=resource.model.js.map