@sourceloop/ctrl-plane-tenant-management-service
Version:
Tenant Management microservice for SaaS control plane
86 lines • 2.85 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Lead = 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");
const address_model_1 = require("./address.model");
let Lead = class Lead extends core_1.UserModifiableEntity {
constructor(data) {
super(data);
}
};
exports.Lead = Lead;
tslib_1.__decorate([
(0, repository_1.property)({
type: 'string',
id: true,
generated: true,
}),
tslib_1.__metadata("design:type", String)
], Lead.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)
], Lead.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)
], Lead.prototype, "lastName", void 0);
tslib_1.__decorate([
(0, repository_1.property)({
name: 'company_name',
type: 'string',
required: true,
description: `name of the lead's company`,
}),
tslib_1.__metadata("design:type", String)
], Lead.prototype, "companyName", void 0);
tslib_1.__decorate([
(0, repository_1.property)({
type: 'string',
description: 'email of the lead',
required: true,
}),
tslib_1.__metadata("design:type", String)
], Lead.prototype, "email", void 0);
tslib_1.__decorate([
(0, repository_1.property)({
name: 'is_validated',
type: 'boolean',
description: 'whether the lead`s email has been validated or not',
required: true,
default: false,
}),
tslib_1.__metadata("design:type", Boolean)
], Lead.prototype, "isValidated", void 0);
tslib_1.__decorate([
(0, repository_1.hasOne)(() => tenant_model_1.Tenant, { keyTo: 'leadId' }),
tslib_1.__metadata("design:type", tenant_model_1.Tenant)
], Lead.prototype, "tenant", void 0);
tslib_1.__decorate([
(0, repository_1.belongsTo)(() => address_model_1.Address, undefined, {
name: 'address_id',
description: 'id of the address of the lead',
}),
tslib_1.__metadata("design:type", String)
], Lead.prototype, "addressId", void 0);
exports.Lead = Lead = tslib_1.__decorate([
(0, repository_1.model)({
name: 'leads',
description: 'this model represents a lead that could eventually be a tenant in the system',
}),
tslib_1.__metadata("design:paramtypes", [Object])
], Lead);
//# sourceMappingURL=lead.model.js.map