UNPKG

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

Version:

Tenant Management microservice for SaaS control plane

79 lines 2.57 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Contact = void 0; const tslib_1 = require("tslib"); const repository_1 = require("@loopback/repository"); const core_1 = require("@sourceloop/core"); const tenant_model_1 = require("./tenant.model"); let Contact = class Contact extends core_1.UserModifiableEntity { constructor(data) { super(data); } }; exports.Contact = Contact; tslib_1.__decorate([ (0, repository_1.property)({ type: 'string', id: true, generated: true, }), tslib_1.__metadata("design:type", String) ], Contact.prototype, "id", void 0); tslib_1.__decorate([ (0, repository_1.property)({ type: 'string', name: 'first_name', required: true, description: 'first name of the lead', }), tslib_1.__metadata("design:type", String) ], Contact.prototype, "firstName", void 0); tslib_1.__decorate([ (0, repository_1.property)({ type: 'string', name: 'last_name', required: true, description: 'last name of the lead', }), tslib_1.__metadata("design:type", String) ], Contact.prototype, "lastName", void 0); tslib_1.__decorate([ (0, repository_1.property)({ type: 'string', description: 'email id of the contact', required: true, }), tslib_1.__metadata("design:type", String) ], Contact.prototype, "email", void 0); tslib_1.__decorate([ (0, repository_1.property)({ name: 'is_primary', type: 'boolean', description: "boolean value denoting if the contact is a primary contact for it's tenant.", required: true, }), tslib_1.__metadata("design:type", Boolean) ], Contact.prototype, "isPrimary", void 0); tslib_1.__decorate([ (0, repository_1.property)({ name: 'contact_type', type: 'string', description: 'type of the contact', }), tslib_1.__metadata("design:type", String) ], Contact.prototype, "type", void 0); tslib_1.__decorate([ (0, repository_1.belongsTo)(() => tenant_model_1.Tenant, { name: 'tenant' }, { name: 'tenant_id', description: 'tenant id this contact belongs to', }), tslib_1.__metadata("design:type", String) ], Contact.prototype, "tenantId", void 0); exports.Contact = Contact = tslib_1.__decorate([ (0, repository_1.model)({ name: 'contacts', description: 'contacts belonging to a tenant', }), tslib_1.__metadata("design:paramtypes", [Object]) ], Contact); //# sourceMappingURL=contact.model.js.map