easywork-common-lib 1.0.206 → 1.0.208
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entities/drive/file.entity.js +12 -2
- package/dist/entities/drive/file.entity.js.map +1 -1
- package/dist/entities/drive/folder.entity.js +7 -1
- package/dist/entities/drive/folder.entity.js.map +1 -1
- package/dist/entities/email.entity.js +3 -0
- package/dist/entities/email.entity.js.map +1 -1
- package/dist/entities/helpers/entity_file.entity.js +7 -0
- package/dist/entities/helpers/entity_file.entity.js.map +1 -1
- package/dist/entities/helpers/entity_folder.entity.js +7 -0
- package/dist/entities/helpers/entity_folder.entity.js.map +1 -1
- package/dist/entities/helpers/sales/contact/contact_email.entity.js +9 -2
- package/dist/entities/helpers/sales/contact/contact_email.entity.js.map +1 -1
- package/dist/entities/helpers/sales/contact/contact_phone.entity.js +7 -0
- package/dist/entities/helpers/sales/contact/contact_phone.entity.js.map +1 -1
- package/dist/entities/helpers/sales/contact/contact_sources.entity.js +3 -0
- package/dist/entities/helpers/sales/contact/contact_sources.entity.js.map +1 -1
- package/dist/entities/helpers/sales/contact/contact_types.entity.js +3 -0
- package/dist/entities/helpers/sales/contact/contact_types.entity.js.map +1 -1
- package/dist/entities/helpers/sales/lead/h_lead_source.entity.js +2 -0
- package/dist/entities/helpers/sales/lead/h_lead_source.entity.js.map +1 -1
- package/dist/entities/helpers/sales/lead/h_lead_stage.entity.js +3 -0
- package/dist/entities/helpers/sales/lead/h_lead_stage.entity.js.map +1 -1
- package/dist/entities/helpers/sales/lead/h_lead_types.entity.js +2 -0
- package/dist/entities/helpers/sales/lead/h_lead_types.entity.js.map +1 -1
- package/dist/entities/helpers/sales/lead/lead_email.entity.js +9 -2
- package/dist/entities/helpers/sales/lead/lead_email.entity.js.map +1 -1
- package/dist/entities/helpers/sales/lead/lead_phone.entity.js +9 -2
- package/dist/entities/helpers/sales/lead/lead_phone.entity.js.map +1 -1
- package/dist/entities/helpers/sales/poliza/h_poliza_forma_cobro.entity.js +4 -0
- package/dist/entities/helpers/sales/poliza/h_poliza_forma_cobro.entity.js.map +1 -1
- package/dist/entities/helpers/sales/poliza/h_poliza_frecuencia_pago.entity.js +4 -0
- package/dist/entities/helpers/sales/poliza/h_poliza_frecuencia_pago.entity.js.map +1 -1
- package/dist/entities/helpers/sales/poliza/h_poliza_type.entity.js +3 -0
- package/dist/entities/helpers/sales/poliza/h_poliza_type.entity.js.map +1 -1
- package/dist/entities/helpers/sales/poliza/poliza_file.entity.js +8 -1
- package/dist/entities/helpers/sales/poliza/poliza_file.entity.js.map +1 -1
- package/dist/entities/helpers/tools/task_crm.entity.js +9 -0
- package/dist/entities/helpers/tools/task_crm.entity.js.map +1 -1
- package/dist/entities/notifications/notification.entity.js +27 -0
- package/dist/entities/notifications/notification.entity.js.map +1 -1
- package/dist/entities/notifications/push-token.entity.js +4 -0
- package/dist/entities/notifications/push-token.entity.js.map +1 -1
- package/dist/entities/otp-log.entity.js +5 -0
- package/dist/entities/otp-log.entity.js.map +1 -1
- package/dist/entities/permission.entity.js +4 -0
- package/dist/entities/permission.entity.js.map +1 -1
- package/dist/entities/phone.entity.js +3 -0
- package/dist/entities/phone.entity.js.map +1 -1
- package/dist/entities/profile.entity.js +6 -0
- package/dist/entities/profile.entity.js.map +1 -1
- package/dist/entities/role.entity.js +3 -0
- package/dist/entities/role.entity.js.map +1 -1
- package/dist/entities/sales/contact.entity.js +34 -0
- package/dist/entities/sales/contact.entity.js.map +1 -1
- package/dist/entities/sales/lead.entity.js +42 -0
- package/dist/entities/sales/lead.entity.js.map +1 -1
- package/dist/entities/sales/poliza.entity.js +60 -0
- package/dist/entities/sales/poliza.entity.js.map +1 -1
- package/dist/entities/sales/poliza_siniestro.entity.js +7 -0
- package/dist/entities/sales/poliza_siniestro.entity.js.map +1 -1
- package/dist/entities/tag.entity.js +4 -0
- package/dist/entities/tag.entity.js.map +1 -1
- package/dist/entities/tools/task-comment.entity.js +5 -0
- package/dist/entities/tools/task-comment.entity.js.map +1 -1
- package/dist/entities/tools/task-list-field.js +4 -0
- package/dist/entities/tools/task-list-field.js.map +1 -1
- package/dist/entities/tools/task.entity.d.ts +1 -1
- package/dist/entities/tools/task.entity.js +28 -1
- package/dist/entities/tools/task.entity.js.map +1 -1
- package/dist/entities/user.entity.js +16 -0
- package/dist/entities/user.entity.js.map +1 -1
- package/package.json +2 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -11,6 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.PolizaFormaCobro = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
15
|
let PolizaFormaCobro = class PolizaFormaCobro extends typeorm_1.BaseEntity {
|
|
15
16
|
id;
|
|
16
17
|
name;
|
|
@@ -18,14 +19,17 @@ let PolizaFormaCobro = class PolizaFormaCobro extends typeorm_1.BaseEntity {
|
|
|
18
19
|
};
|
|
19
20
|
exports.PolizaFormaCobro = PolizaFormaCobro;
|
|
20
21
|
__decorate([
|
|
22
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'UUID of the payment method', format: 'uuid' }),
|
|
21
23
|
(0, typeorm_1.PrimaryGeneratedColumn)("uuid"),
|
|
22
24
|
__metadata("design:type", String)
|
|
23
25
|
], PolizaFormaCobro.prototype, "id", void 0);
|
|
24
26
|
__decorate([
|
|
27
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'Name of the payment method' }),
|
|
25
28
|
(0, typeorm_1.Column)({ unique: true }),
|
|
26
29
|
__metadata("design:type", String)
|
|
27
30
|
], PolizaFormaCobro.prototype, "name", void 0);
|
|
28
31
|
__decorate([
|
|
32
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'Description of the payment method', required: false }),
|
|
29
33
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
30
34
|
__metadata("design:type", String)
|
|
31
35
|
], PolizaFormaCobro.prototype, "description", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"h_poliza_forma_cobro.entity.js","sourceRoot":"","sources":["../../../../../src/entities/helpers/sales/poliza/h_poliza_forma_cobro.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"h_poliza_forma_cobro.entity.js","sourceRoot":"","sources":["../../../../../src/entities/helpers/sales/poliza/h_poliza_forma_cobro.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA6E;AAC7E,6CAA8C;AAGvC,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,oBAAU;IAG9C,EAAE,CAAU;IAIZ,IAAI,CAAS;IAIb,WAAW,CAAS;CACrB,CAAA;AAZY,4CAAgB;AAG3B;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,4BAA4B,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IACxF,IAAA,gCAAsB,EAAC,MAAM,CAAC;;4CACnB;AAIZ;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,4BAA4B,EAAE,CAAC;IACxE,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;8CACZ;AAIb;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,mCAAmC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAChG,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACP;2BAXT,gBAAgB;IAD5B,IAAA,gBAAM,GAAE;GACI,gBAAgB,CAY5B"}
|
|
@@ -11,6 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.PolizaFrecuenciaPago = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
15
|
let PolizaFrecuenciaPago = class PolizaFrecuenciaPago extends typeorm_1.BaseEntity {
|
|
15
16
|
id;
|
|
16
17
|
name;
|
|
@@ -18,14 +19,17 @@ let PolizaFrecuenciaPago = class PolizaFrecuenciaPago extends typeorm_1.BaseEnti
|
|
|
18
19
|
};
|
|
19
20
|
exports.PolizaFrecuenciaPago = PolizaFrecuenciaPago;
|
|
20
21
|
__decorate([
|
|
22
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'UUID of the payment frequency', format: 'uuid' }),
|
|
21
23
|
(0, typeorm_1.PrimaryGeneratedColumn)("uuid"),
|
|
22
24
|
__metadata("design:type", String)
|
|
23
25
|
], PolizaFrecuenciaPago.prototype, "id", void 0);
|
|
24
26
|
__decorate([
|
|
27
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'Name of the payment frequency' }),
|
|
25
28
|
(0, typeorm_1.Column)({ unique: true }),
|
|
26
29
|
__metadata("design:type", String)
|
|
27
30
|
], PolizaFrecuenciaPago.prototype, "name", void 0);
|
|
28
31
|
__decorate([
|
|
32
|
+
(0, swagger_1.ApiProperty)({ type: Number, description: 'Expected number of payments' }),
|
|
29
33
|
(0, typeorm_1.Column)(),
|
|
30
34
|
__metadata("design:type", Number)
|
|
31
35
|
], PolizaFrecuenciaPago.prototype, "cobrosEsperados", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"h_poliza_frecuencia_pago.entity.js","sourceRoot":"","sources":["../../../../../src/entities/helpers/sales/poliza/h_poliza_frecuencia_pago.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"h_poliza_frecuencia_pago.entity.js","sourceRoot":"","sources":["../../../../../src/entities/helpers/sales/poliza/h_poliza_frecuencia_pago.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA6E;AAC7E,6CAA8C;AAGvC,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,oBAAU;IAGlD,EAAE,CAAU;IAIZ,IAAI,CAAS;IAIb,eAAe,CAAS;CACzB,CAAA;AAZY,oDAAoB;AAG/B;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,+BAA+B,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IAC3F,IAAA,gCAAsB,EAAC,MAAM,CAAC;;gDACnB;AAIZ;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,+BAA+B,EAAE,CAAC;IAC3E,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;kDACZ;AAIb;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,6BAA6B,EAAE,CAAC;IACzE,IAAA,gBAAM,GAAE;;6DACe;+BAXb,oBAAoB;IADhC,IAAA,gBAAM,GAAE;GACI,oBAAoB,CAYhC"}
|
|
@@ -11,16 +11,19 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.PolizaType = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
15
|
let PolizaType = class PolizaType extends typeorm_1.BaseEntity {
|
|
15
16
|
id;
|
|
16
17
|
name;
|
|
17
18
|
};
|
|
18
19
|
exports.PolizaType = PolizaType;
|
|
19
20
|
__decorate([
|
|
21
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'UUID of the policy type', format: 'uuid' }),
|
|
20
22
|
(0, typeorm_1.PrimaryGeneratedColumn)("uuid"),
|
|
21
23
|
__metadata("design:type", String)
|
|
22
24
|
], PolizaType.prototype, "id", void 0);
|
|
23
25
|
__decorate([
|
|
26
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'Name of the policy type' }),
|
|
24
27
|
(0, typeorm_1.Column)({ unique: true }),
|
|
25
28
|
__metadata("design:type", String)
|
|
26
29
|
], PolizaType.prototype, "name", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"h_poliza_type.entity.js","sourceRoot":"","sources":["../../../../../src/entities/helpers/sales/poliza/h_poliza_type.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"h_poliza_type.entity.js","sourceRoot":"","sources":["../../../../../src/entities/helpers/sales/poliza/h_poliza_type.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA6E;AAC7E,6CAA8C;AAGvC,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,oBAAU;IAGxC,EAAE,CAAU;IAIZ,IAAI,CAAS;CACd,CAAA;AARY,gCAAU;AAGrB;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,yBAAyB,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IACrF,IAAA,gCAAsB,EAAC,MAAM,CAAC;;sCACnB;AAIZ;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,yBAAyB,EAAE,CAAC;IACrE,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;wCACZ;qBAPF,UAAU;IADtB,IAAA,gBAAM,GAAE;GACI,UAAU,CAQtB"}
|
|
@@ -14,6 +14,7 @@ const typeorm_1 = require("typeorm");
|
|
|
14
14
|
const class_transformer_1 = require("class-transformer");
|
|
15
15
|
const poliza_entity_1 = require("../../../sales/poliza.entity");
|
|
16
16
|
const drive_1 = require("../../../drive");
|
|
17
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
17
18
|
let PolizaFile = class PolizaFile extends typeorm_1.BaseEntity {
|
|
18
19
|
id;
|
|
19
20
|
polizaId;
|
|
@@ -24,23 +25,28 @@ let PolizaFile = class PolizaFile extends typeorm_1.BaseEntity {
|
|
|
24
25
|
};
|
|
25
26
|
exports.PolizaFile = PolizaFile;
|
|
26
27
|
__decorate([
|
|
28
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'UUID of the policy file', format: 'uuid' }),
|
|
27
29
|
(0, typeorm_1.PrimaryGeneratedColumn)("uuid"),
|
|
28
30
|
__metadata("design:type", String)
|
|
29
31
|
], PolizaFile.prototype, "id", void 0);
|
|
30
32
|
__decorate([
|
|
33
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'ID of the associated policy' }),
|
|
31
34
|
(0, typeorm_1.Column)(),
|
|
32
35
|
__metadata("design:type", String)
|
|
33
36
|
], PolizaFile.prototype, "polizaId", void 0);
|
|
34
37
|
__decorate([
|
|
35
|
-
(0,
|
|
38
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'ID of the associated file', format: 'uuid' }),
|
|
39
|
+
(0, typeorm_1.Column)({ type: "uuid" }),
|
|
36
40
|
__metadata("design:type", String)
|
|
37
41
|
], PolizaFile.prototype, "fileId", void 0);
|
|
38
42
|
__decorate([
|
|
43
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'Relation description or type', required: false }),
|
|
39
44
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
40
45
|
__metadata("design:type", String)
|
|
41
46
|
], PolizaFile.prototype, "relation", void 0);
|
|
42
47
|
__decorate([
|
|
43
48
|
(0, class_transformer_1.Exclude)(),
|
|
49
|
+
(0, swagger_1.ApiProperty)({ type: () => poliza_entity_1.Poliza, description: 'Policy entity associated' }),
|
|
44
50
|
(0, typeorm_1.ManyToOne)(() => poliza_entity_1.Poliza, poliza => poliza.files, {
|
|
45
51
|
onDelete: "CASCADE",
|
|
46
52
|
onUpdate: "CASCADE",
|
|
@@ -48,6 +54,7 @@ __decorate([
|
|
|
48
54
|
__metadata("design:type", poliza_entity_1.Poliza)
|
|
49
55
|
], PolizaFile.prototype, "poliza", void 0);
|
|
50
56
|
__decorate([
|
|
57
|
+
(0, swagger_1.ApiProperty)({ type: () => drive_1.File, description: 'File entity associated' }),
|
|
51
58
|
(0, typeorm_1.ManyToOne)(() => drive_1.File, {
|
|
52
59
|
onDelete: "CASCADE",
|
|
53
60
|
onUpdate: "CASCADE",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"poliza_file.entity.js","sourceRoot":"","sources":["../../../../../src/entities/helpers/sales/poliza/poliza_file.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAwF;AACxF,yDAA4C;AAC5C,gEAAsD;AACtD,0CAAsC;
|
|
1
|
+
{"version":3,"file":"poliza_file.entity.js","sourceRoot":"","sources":["../../../../../src/entities/helpers/sales/poliza/poliza_file.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAwF;AACxF,yDAA4C;AAC5C,gEAAsD;AACtD,0CAAsC;AACtC,6CAA8C;AAGvC,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,oBAAU;IAGxC,EAAE,CAAU;IAIZ,QAAQ,CAAS;IAIjB,MAAM,CAAS;IAIf,QAAQ,CAAS;IAQV,MAAM,CAAS;IAQf,IAAI,CAAO;CACnB,CAAA;AAhCY,gCAAU;AAGrB;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,yBAAyB,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IACrF,IAAA,gCAAsB,EAAC,MAAM,CAAC;;sCACnB;AAIZ;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,6BAA6B,EAAE,CAAC;IACzE,IAAA,gBAAM,GAAE;;4CACQ;AAIjB;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,2BAA2B,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IACvF,IAAA,gBAAM,EAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;;0CACR;AAIf;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,8BAA8B,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAC3F,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACV;AAQV;IANN,IAAA,2BAAO,GAAE;IACT,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,sBAAM,EAAE,WAAW,EAAE,0BAA0B,EAAE,CAAC;IAC5E,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,sBAAM,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE;QAC/C,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;KACpB,CAAC;8BACa,sBAAM;0CAAC;AAQf;IANN,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,YAAI,EAAE,WAAW,EAAE,wBAAwB,EAAE,CAAC;IACxE,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,YAAI,EAAE;QACrB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;QACnB,KAAK,EAAE,IAAI;KACZ,CAAC;8BACW,YAAI;wCAAC;qBA/BP,UAAU;IADtB,IAAA,gBAAM,GAAE;GACI,UAAU,CAgCtB"}
|
|
@@ -15,6 +15,7 @@ const class_transformer_1 = require("class-transformer");
|
|
|
15
15
|
const tools_1 = require("../../../entities/tools");
|
|
16
16
|
const common_1 = require("../../../common");
|
|
17
17
|
const sales_1 = require("../../../entities/sales");
|
|
18
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
18
19
|
let TaskCRM = class TaskCRM extends typeorm_1.BaseEntity {
|
|
19
20
|
id;
|
|
20
21
|
type;
|
|
@@ -27,10 +28,12 @@ let TaskCRM = class TaskCRM extends typeorm_1.BaseEntity {
|
|
|
27
28
|
};
|
|
28
29
|
exports.TaskCRM = TaskCRM;
|
|
29
30
|
__decorate([
|
|
31
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'UUID of the task CRM', format: 'uuid' }),
|
|
30
32
|
(0, typeorm_1.PrimaryGeneratedColumn)("uuid"),
|
|
31
33
|
__metadata("design:type", String)
|
|
32
34
|
], TaskCRM.prototype, "id", void 0);
|
|
33
35
|
__decorate([
|
|
36
|
+
(0, swagger_1.ApiProperty)({ enum: common_1.TaskCRMType, description: 'Type of the task CRM' }),
|
|
34
37
|
(0, typeorm_1.Column)({
|
|
35
38
|
type: "enum",
|
|
36
39
|
enum: common_1.TaskCRMType,
|
|
@@ -38,16 +41,19 @@ __decorate([
|
|
|
38
41
|
__metadata("design:type", String)
|
|
39
42
|
], TaskCRM.prototype, "type", void 0);
|
|
40
43
|
__decorate([
|
|
44
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'ID of the associated task' }),
|
|
41
45
|
(0, typeorm_1.Column)(),
|
|
42
46
|
__metadata("design:type", String)
|
|
43
47
|
], TaskCRM.prototype, "taskId", void 0);
|
|
44
48
|
__decorate([
|
|
49
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'ID of the associated contact', required: false }),
|
|
45
50
|
(0, typeorm_1.Column)({
|
|
46
51
|
nullable: true,
|
|
47
52
|
}),
|
|
48
53
|
__metadata("design:type", String)
|
|
49
54
|
], TaskCRM.prototype, "contactId", void 0);
|
|
50
55
|
__decorate([
|
|
56
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'ID of the associated policy', required: false }),
|
|
51
57
|
(0, typeorm_1.Column)({
|
|
52
58
|
nullable: true,
|
|
53
59
|
}),
|
|
@@ -55,6 +61,7 @@ __decorate([
|
|
|
55
61
|
], TaskCRM.prototype, "polizaId", void 0);
|
|
56
62
|
__decorate([
|
|
57
63
|
(0, class_transformer_1.Exclude)(),
|
|
64
|
+
(0, swagger_1.ApiProperty)({ type: () => tools_1.Task, description: 'Task entity associated' }),
|
|
58
65
|
(0, typeorm_1.ManyToOne)(() => tools_1.Task, task => task.crm, {
|
|
59
66
|
onDelete: "CASCADE",
|
|
60
67
|
onUpdate: "CASCADE",
|
|
@@ -62,6 +69,7 @@ __decorate([
|
|
|
62
69
|
__metadata("design:type", tools_1.Task)
|
|
63
70
|
], TaskCRM.prototype, "task", void 0);
|
|
64
71
|
__decorate([
|
|
72
|
+
(0, swagger_1.ApiProperty)({ type: () => sales_1.Contact, description: 'Contact entity associated', required: false }),
|
|
65
73
|
(0, typeorm_1.ManyToOne)(() => sales_1.Contact, {
|
|
66
74
|
onDelete: "CASCADE",
|
|
67
75
|
onUpdate: "CASCADE",
|
|
@@ -71,6 +79,7 @@ __decorate([
|
|
|
71
79
|
__metadata("design:type", sales_1.Contact)
|
|
72
80
|
], TaskCRM.prototype, "contact", void 0);
|
|
73
81
|
__decorate([
|
|
82
|
+
(0, swagger_1.ApiProperty)({ type: () => sales_1.Poliza, description: 'Policy entity associated', required: false }),
|
|
74
83
|
(0, typeorm_1.ManyToOne)(() => sales_1.Poliza, {
|
|
75
84
|
onDelete: "CASCADE",
|
|
76
85
|
onUpdate: "CASCADE",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task_crm.entity.js","sourceRoot":"","sources":["../../../../src/entities/helpers/tools/task_crm.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAwF;AACxF,yDAA4C;AAC5C,mDAA+C;AAC/C,4CAA8C;AAC9C,mDAA0D;
|
|
1
|
+
{"version":3,"file":"task_crm.entity.js","sourceRoot":"","sources":["../../../../src/entities/helpers/tools/task_crm.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAwF;AACxF,yDAA4C;AAC5C,mDAA+C;AAC/C,4CAA8C;AAC9C,mDAA0D;AAC1D,6CAA8C;AAGvC,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,oBAAU;IAGrC,EAAE,CAAU;IAOZ,IAAI,CAAc;IAIlB,MAAM,CAAS;IAMf,SAAS,CAAS;IAMlB,QAAQ,CAAS;IAQV,IAAI,CAAO;IASX,OAAO,CAAU;IASjB,MAAM,CAAS;CACvB,CAAA;AArDY,0BAAO;AAGlB;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,sBAAsB,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IAClF,IAAA,gCAAsB,EAAC,MAAM,CAAC;;mCACnB;AAOZ;IALC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,oBAAW,EAAE,WAAW,EAAE,sBAAsB,EAAE,CAAC;IACvE,IAAA,gBAAM,EAAC;QACN,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,oBAAW;KAClB,CAAC;;qCACgB;AAIlB;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,2BAA2B,EAAE,CAAC;IACvE,IAAA,gBAAM,GAAE;;uCACM;AAMf;IAJC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,8BAA8B,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAC3F,IAAA,gBAAM,EAAC;QACN,QAAQ,EAAE,IAAI;KACf,CAAC;;0CACgB;AAMlB;IAJC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,6BAA6B,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAC1F,IAAA,gBAAM,EAAC;QACN,QAAQ,EAAE,IAAI;KACf,CAAC;;yCACe;AAQV;IANN,IAAA,2BAAO,GAAE;IACT,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,YAAI,EAAE,WAAW,EAAE,wBAAwB,EAAE,CAAC;IACxE,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,YAAI,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE;QACvC,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;KACpB,CAAC;8BACW,YAAI;qCAAC;AASX;IAPN,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,eAAO,EAAE,WAAW,EAAE,2BAA2B,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAC/F,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,eAAO,EAAE;QACxB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;QACnB,KAAK,EAAE,IAAI;QACX,QAAQ,EAAE,IAAI;KACf,CAAC;8BACc,eAAO;wCAAC;AASjB;IAPN,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,cAAM,EAAE,WAAW,EAAE,0BAA0B,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAC7F,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,cAAM,EAAE;QACvB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;QACnB,KAAK,EAAE,IAAI;QACX,QAAQ,EAAE,IAAI;KACf,CAAC;8BACa,cAAM;uCAAC;kBApDX,OAAO;IADnB,IAAA,gBAAM,GAAE;GACI,OAAO,CAqDnB"}
|
|
@@ -14,6 +14,7 @@ const user_entity_1 = require("../user.entity");
|
|
|
14
14
|
const common_1 = require("../../common");
|
|
15
15
|
const typeorm_1 = require("typeorm");
|
|
16
16
|
const enums_1 = require("../../common/enums");
|
|
17
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
17
18
|
let Notification = class Notification extends common_1.BaseEntitySimple {
|
|
18
19
|
content;
|
|
19
20
|
title;
|
|
@@ -28,14 +29,21 @@ let Notification = class Notification extends common_1.BaseEntitySimple {
|
|
|
28
29
|
};
|
|
29
30
|
exports.Notification = Notification;
|
|
30
31
|
__decorate([
|
|
32
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'Content of the notification' }),
|
|
31
33
|
(0, typeorm_1.Column)({ type: "text" }),
|
|
32
34
|
__metadata("design:type", String)
|
|
33
35
|
], Notification.prototype, "content", void 0);
|
|
34
36
|
__decorate([
|
|
37
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'Title of the notification' }),
|
|
35
38
|
(0, typeorm_1.Column)({ nullable: false }),
|
|
36
39
|
__metadata("design:type", String)
|
|
37
40
|
], Notification.prototype, "title", void 0);
|
|
38
41
|
__decorate([
|
|
42
|
+
(0, swagger_1.ApiProperty)({
|
|
43
|
+
enum: enums_1.NotificationCategory,
|
|
44
|
+
description: 'Category of the notification',
|
|
45
|
+
default: enums_1.NotificationCategory.DEFAULT
|
|
46
|
+
}),
|
|
39
47
|
(0, typeorm_1.Column)({
|
|
40
48
|
type: "enum",
|
|
41
49
|
enum: enums_1.NotificationCategory,
|
|
@@ -44,6 +52,11 @@ __decorate([
|
|
|
44
52
|
__metadata("design:type", String)
|
|
45
53
|
], Notification.prototype, "category", void 0);
|
|
46
54
|
__decorate([
|
|
55
|
+
(0, swagger_1.ApiProperty)({
|
|
56
|
+
enum: enums_1.NotificationSubcategory,
|
|
57
|
+
description: 'Subcategory of the notification',
|
|
58
|
+
default: enums_1.NotificationSubcategory.DEFAULT
|
|
59
|
+
}),
|
|
47
60
|
(0, typeorm_1.Column)({
|
|
48
61
|
type: "enum",
|
|
49
62
|
enum: enums_1.NotificationSubcategory,
|
|
@@ -52,6 +65,11 @@ __decorate([
|
|
|
52
65
|
__metadata("design:type", String)
|
|
53
66
|
], Notification.prototype, "subCategory", void 0);
|
|
54
67
|
__decorate([
|
|
68
|
+
(0, swagger_1.ApiProperty)({
|
|
69
|
+
type: [String],
|
|
70
|
+
enum: enums_1.NotificationChannel,
|
|
71
|
+
description: 'Channels through which the notification is sent'
|
|
72
|
+
}),
|
|
55
73
|
(0, typeorm_1.Column)({
|
|
56
74
|
type: "enum",
|
|
57
75
|
enum: enums_1.NotificationChannel,
|
|
@@ -60,6 +78,11 @@ __decorate([
|
|
|
60
78
|
__metadata("design:type", Array)
|
|
61
79
|
], Notification.prototype, "channels", void 0);
|
|
62
80
|
__decorate([
|
|
81
|
+
(0, swagger_1.ApiProperty)({
|
|
82
|
+
type: Object,
|
|
83
|
+
description: 'Additional metadata for the notification',
|
|
84
|
+
required: false
|
|
85
|
+
}),
|
|
63
86
|
(0, typeorm_1.Column)({
|
|
64
87
|
type: "simple-json",
|
|
65
88
|
nullable: true
|
|
@@ -67,18 +90,22 @@ __decorate([
|
|
|
67
90
|
__metadata("design:type", Object)
|
|
68
91
|
], Notification.prototype, "metadata", void 0);
|
|
69
92
|
__decorate([
|
|
93
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'Associated entity ID', required: false }),
|
|
70
94
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
71
95
|
__metadata("design:type", String)
|
|
72
96
|
], Notification.prototype, "entityId", void 0);
|
|
73
97
|
__decorate([
|
|
98
|
+
(0, swagger_1.ApiProperty)({ type: Date, description: 'Timestamp when the notification was read', required: false }),
|
|
74
99
|
(0, typeorm_1.Column)({ type: "timestamp", nullable: true }),
|
|
75
100
|
__metadata("design:type", Date)
|
|
76
101
|
], Notification.prototype, "readAt", void 0);
|
|
77
102
|
__decorate([
|
|
103
|
+
(0, swagger_1.ApiProperty)({ type: Date, description: 'Timestamp when the notification was canceled', required: false }),
|
|
78
104
|
(0, typeorm_1.Column)({ type: "timestamp", nullable: true }),
|
|
79
105
|
__metadata("design:type", Date)
|
|
80
106
|
], Notification.prototype, "canceledAt", void 0);
|
|
81
107
|
__decorate([
|
|
108
|
+
(0, swagger_1.ApiProperty)({ type: () => user_entity_1.User, description: 'Recipient of the notification', required: false }),
|
|
82
109
|
(0, typeorm_1.ManyToOne)(() => user_entity_1.User, {
|
|
83
110
|
onDelete: "SET NULL",
|
|
84
111
|
onUpdate: "CASCADE",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification.entity.js","sourceRoot":"","sources":["../../../src/entities/notifications/notification.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gDAAsC;AACtC,yCAAgD;AAChD,qCAAoD;AACpD,8CAAwG;
|
|
1
|
+
{"version":3,"file":"notification.entity.js","sourceRoot":"","sources":["../../../src/entities/notifications/notification.entity.ts"],"names":[],"mappings":"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"}
|
|
@@ -13,6 +13,7 @@ exports.PushToken = void 0;
|
|
|
13
13
|
const user_entity_1 = require("../user.entity");
|
|
14
14
|
const common_1 = require("../../common");
|
|
15
15
|
const typeorm_1 = require("typeorm");
|
|
16
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
16
17
|
let PushToken = class PushToken extends common_1.BaseEntitySimple {
|
|
17
18
|
token;
|
|
18
19
|
device;
|
|
@@ -20,14 +21,17 @@ let PushToken = class PushToken extends common_1.BaseEntitySimple {
|
|
|
20
21
|
};
|
|
21
22
|
exports.PushToken = PushToken;
|
|
22
23
|
__decorate([
|
|
24
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'Push notification token' }),
|
|
23
25
|
(0, typeorm_1.Column)({ type: "text" }),
|
|
24
26
|
__metadata("design:type", String)
|
|
25
27
|
], PushToken.prototype, "token", void 0);
|
|
26
28
|
__decorate([
|
|
29
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'Device associated with the token' }),
|
|
27
30
|
(0, typeorm_1.Column)({ type: "text", unique: true }),
|
|
28
31
|
__metadata("design:type", String)
|
|
29
32
|
], PushToken.prototype, "device", void 0);
|
|
30
33
|
__decorate([
|
|
34
|
+
(0, swagger_1.ApiProperty)({ type: () => user_entity_1.User, description: 'User associated with the token', required: false }),
|
|
31
35
|
(0, typeorm_1.ManyToOne)(() => user_entity_1.User, {
|
|
32
36
|
onDelete: "SET NULL",
|
|
33
37
|
onUpdate: "CASCADE",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"push-token.entity.js","sourceRoot":"","sources":["../../../src/entities/notifications/push-token.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gDAAsC;AACtC,yCAAgD;AAChD,qCAAoD;
|
|
1
|
+
{"version":3,"file":"push-token.entity.js","sourceRoot":"","sources":["../../../src/entities/notifications/push-token.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gDAAsC;AACtC,yCAAgD;AAChD,qCAAoD;AACpD,6CAA8C;AAGvC,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,yBAAgB;IAG7C,KAAK,CAAS;IAId,MAAM,CAAS;IAQf,IAAI,CAAQ;CACb,CAAA;AAhBY,8BAAS;AAGpB;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,yBAAyB,EAAE,CAAC;IACrE,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;wCACX;AAId;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,kCAAkC,EAAE,CAAC;IAC9E,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;yCACxB;AAQf;IANC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,kBAAI,EAAE,WAAW,EAAE,gCAAgC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IACjG,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE;QACrB,QAAQ,EAAE,UAAU;QACpB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,IAAI;KACf,CAAC;8BACK,kBAAI;uCAAC;oBAfD,SAAS;IADrB,IAAA,gBAAM,GAAE;GACI,SAAS,CAgBrB"}
|
|
@@ -13,6 +13,7 @@ exports.OtpLog = void 0;
|
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const database_1 = require("../common/database");
|
|
15
15
|
const user_entity_1 = require("./user.entity");
|
|
16
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
16
17
|
let OtpLog = class OtpLog extends database_1.BaseEntity {
|
|
17
18
|
expiresIn;
|
|
18
19
|
otpCode;
|
|
@@ -21,19 +22,23 @@ let OtpLog = class OtpLog extends database_1.BaseEntity {
|
|
|
21
22
|
};
|
|
22
23
|
exports.OtpLog = OtpLog;
|
|
23
24
|
__decorate([
|
|
25
|
+
(0, swagger_1.ApiProperty)({ type: Date, description: 'Expiration time of the OTP code' }),
|
|
24
26
|
(0, typeorm_1.Column)({ type: "timestamp" }),
|
|
25
27
|
__metadata("design:type", Date)
|
|
26
28
|
], OtpLog.prototype, "expiresIn", void 0);
|
|
27
29
|
__decorate([
|
|
30
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'OTP code', maxLength: 20, required: false }),
|
|
28
31
|
(0, typeorm_1.Column)({ length: 20, nullable: true }),
|
|
29
32
|
__metadata("design:type", String)
|
|
30
33
|
], OtpLog.prototype, "otpCode", void 0);
|
|
31
34
|
__decorate([
|
|
35
|
+
(0, swagger_1.ApiProperty)({ type: () => user_entity_1.User, description: 'User associated with the OTP log' }),
|
|
32
36
|
(0, typeorm_1.ManyToOne)(() => user_entity_1.User, { eager: false, nullable: false }),
|
|
33
37
|
(0, typeorm_1.JoinColumn)(),
|
|
34
38
|
__metadata("design:type", user_entity_1.User)
|
|
35
39
|
], OtpLog.prototype, "user", void 0);
|
|
36
40
|
__decorate([
|
|
41
|
+
(0, swagger_1.ApiProperty)({ type: Boolean, description: 'Has the OTP code been used', default: false }),
|
|
37
42
|
(0, typeorm_1.Column)({ default: false }),
|
|
38
43
|
__metadata("design:type", Boolean)
|
|
39
44
|
], OtpLog.prototype, "isUsed", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"otp-log.entity.js","sourceRoot":"","sources":["../../src/entities/otp-log.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAuE;AACvE,iDAAgD;AAChD,+CAAqC;
|
|
1
|
+
{"version":3,"file":"otp-log.entity.js","sourceRoot":"","sources":["../../src/entities/otp-log.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAuE;AACvE,iDAAgD;AAChD,+CAAqC;AACrC,6CAA8C;AAIvC,IAAM,MAAM,GAAZ,MAAM,MAAO,SAAQ,qBAAU;IAGpC,SAAS,CAAQ;IAIjB,OAAO,CAAU;IAKjB,IAAI,CAAQ;IAIZ,MAAM,CAAW;CAClB,CAAA;AAjBY,wBAAM;AAGjB;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,iCAAiC,EAAE,CAAC;IAC3E,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;8BAClB,IAAI;yCAAC;AAIjB;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IACtF,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uCACtB;AAKjB;IAHC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,kBAAI,EAAE,WAAW,EAAE,kCAAkC,EAAE,CAAC;IAClF,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IACxD,IAAA,oBAAU,GAAE;8BACN,kBAAI;oCAAC;AAIZ;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,4BAA4B,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IACzF,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;sCACV;iBAhBN,MAAM;IAFlB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,CAAC,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;GACxB,MAAM,CAiBlB"}
|
|
@@ -13,6 +13,7 @@ exports.Permission = void 0;
|
|
|
13
13
|
const database_1 = require("../common/database");
|
|
14
14
|
const typeorm_1 = require("typeorm");
|
|
15
15
|
const role_entity_1 = require("./role.entity");
|
|
16
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
16
17
|
let Permission = class Permission extends database_1.BaseEntity {
|
|
17
18
|
resource;
|
|
18
19
|
action;
|
|
@@ -20,14 +21,17 @@ let Permission = class Permission extends database_1.BaseEntity {
|
|
|
20
21
|
};
|
|
21
22
|
exports.Permission = Permission;
|
|
22
23
|
__decorate([
|
|
24
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'Resource for the permission' }),
|
|
23
25
|
(0, typeorm_1.Column)(),
|
|
24
26
|
__metadata("design:type", String)
|
|
25
27
|
], Permission.prototype, "resource", void 0);
|
|
26
28
|
__decorate([
|
|
29
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'Action for the permission' }),
|
|
27
30
|
(0, typeorm_1.Column)(),
|
|
28
31
|
__metadata("design:type", String)
|
|
29
32
|
], Permission.prototype, "action", void 0);
|
|
30
33
|
__decorate([
|
|
34
|
+
(0, swagger_1.ApiProperty)({ type: () => [role_entity_1.Role], description: 'Roles associated with the permission' }),
|
|
31
35
|
(0, typeorm_1.ManyToMany)(() => role_entity_1.Role, {
|
|
32
36
|
onDelete: "CASCADE",
|
|
33
37
|
onUpdate: "CASCADE",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permission.entity.js","sourceRoot":"","sources":["../../src/entities/permission.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iDAAgD;AAChD,qCAAuE;AACvE,+CAAqC;
|
|
1
|
+
{"version":3,"file":"permission.entity.js","sourceRoot":"","sources":["../../src/entities/permission.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iDAAgD;AAChD,qCAAuE;AACvE,+CAAqC;AACrC,6CAA8C;AAIvC,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,qBAAU;IAGxC,QAAQ,CAAS;IAIjB,MAAM,CAAS;IAQf,KAAK,CAAU;CAChB,CAAA;AAhBY,gCAAU;AAGrB;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,6BAA6B,EAAE,CAAC;IACzE,IAAA,gBAAM,GAAE;;4CACQ;AAIjB;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,2BAA2B,EAAE,CAAC;IACvE,IAAA,gBAAM,GAAE;;0CACM;AAQf;IANC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,kBAAI,CAAC,EAAE,WAAW,EAAE,sCAAsC,EAAE,CAAC;IACxF,IAAA,oBAAU,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE;QACtB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;KACpB,CAAC;IACD,IAAA,mBAAS,GAAE;;yCACG;qBAfJ,UAAU;IAFtB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,CAAC,UAAU,EAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;GACnC,UAAU,CAgBtB"}
|
|
@@ -13,17 +13,20 @@ exports.Phone = void 0;
|
|
|
13
13
|
const database_1 = require("../common/database");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
15
|
const typeorm_1 = require("typeorm");
|
|
16
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
16
17
|
let Phone = class Phone extends database_1.BaseEntity {
|
|
17
18
|
number;
|
|
18
19
|
isDefault;
|
|
19
20
|
};
|
|
20
21
|
exports.Phone = Phone;
|
|
21
22
|
__decorate([
|
|
23
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'Phone number', minLength: 3 }),
|
|
22
24
|
(0, class_validator_1.MinLength)(3),
|
|
23
25
|
(0, typeorm_1.Column)({ unique: true }),
|
|
24
26
|
__metadata("design:type", String)
|
|
25
27
|
], Phone.prototype, "number", void 0);
|
|
26
28
|
__decorate([
|
|
29
|
+
(0, swagger_1.ApiProperty)({ type: Boolean, description: 'Is this the default phone number', default: false }),
|
|
27
30
|
(0, typeorm_1.Column)({ name: "is_default", default: false }),
|
|
28
31
|
__metadata("design:type", Boolean)
|
|
29
32
|
], Phone.prototype, "isDefault", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"phone.entity.js","sourceRoot":"","sources":["../../src/entities/phone.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iDAAgD;AAChD,qDAA4C;AAC5C,qCAAyC;
|
|
1
|
+
{"version":3,"file":"phone.entity.js","sourceRoot":"","sources":["../../src/entities/phone.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iDAAgD;AAChD,qDAA4C;AAC5C,qCAAyC;AACzC,6CAA8C;AAGvC,IAAM,KAAK,GAAX,MAAM,KAAM,SAAQ,qBAAU;IAInC,MAAM,CAAS;IAIf,SAAS,CAAU;CACpB,CAAA;AATY,sBAAK;AAIhB;IAHC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;IACxE,IAAA,2BAAS,EAAC,CAAC,CAAC;IACZ,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;qCACV;AAIf;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,kCAAkC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC/F,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;wCAC5B;gBARR,KAAK;IADjB,IAAA,gBAAM,GAAE;GACI,KAAK,CASjB"}
|
|
@@ -13,6 +13,7 @@ exports.Profile = void 0;
|
|
|
13
13
|
const database_1 = require("../common/database");
|
|
14
14
|
const typeorm_1 = require("typeorm");
|
|
15
15
|
const user_entity_1 = require("./user.entity");
|
|
16
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
16
17
|
let Profile = class Profile extends database_1.BaseEntity {
|
|
17
18
|
firstName;
|
|
18
19
|
lastName;
|
|
@@ -22,22 +23,27 @@ let Profile = class Profile extends database_1.BaseEntity {
|
|
|
22
23
|
};
|
|
23
24
|
exports.Profile = Profile;
|
|
24
25
|
__decorate([
|
|
26
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'First name of the user', required: false }),
|
|
25
27
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
26
28
|
__metadata("design:type", String)
|
|
27
29
|
], Profile.prototype, "firstName", void 0);
|
|
28
30
|
__decorate([
|
|
31
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'Last name of the user', required: false }),
|
|
29
32
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
30
33
|
__metadata("design:type", String)
|
|
31
34
|
], Profile.prototype, "lastName", void 0);
|
|
32
35
|
__decorate([
|
|
36
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'ID card of the user', required: false }),
|
|
33
37
|
(0, typeorm_1.Column)({ unique: true, nullable: true }),
|
|
34
38
|
__metadata("design:type", String)
|
|
35
39
|
], Profile.prototype, "idcard", void 0);
|
|
36
40
|
__decorate([
|
|
41
|
+
(0, swagger_1.ApiProperty)({ type: Date, description: 'Birthday of the user', required: false }),
|
|
37
42
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
38
43
|
__metadata("design:type", Date)
|
|
39
44
|
], Profile.prototype, "birthday", void 0);
|
|
40
45
|
__decorate([
|
|
46
|
+
(0, swagger_1.ApiProperty)({ type: () => user_entity_1.User, description: 'User associated with the profile' }),
|
|
41
47
|
(0, typeorm_1.OneToOne)(() => user_entity_1.User, user => user.profile, {
|
|
42
48
|
onDelete: "CASCADE",
|
|
43
49
|
onUpdate: "CASCADE",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile.entity.js","sourceRoot":"","sources":["../../src/entities/profile.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iDAAgD;AAChD,qCAAmD;AACnD,+CAAqC;
|
|
1
|
+
{"version":3,"file":"profile.entity.js","sourceRoot":"","sources":["../../src/entities/profile.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iDAAgD;AAChD,qCAAmD;AACnD,+CAAqC;AACrC,6CAA8C;AAGvC,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,qBAAU;IAGrC,SAAS,CAAS;IAIlB,QAAQ,CAAS;IAIjB,MAAM,CAAS;IAIf,QAAQ,CAAO;IAOf,IAAI,CAAO;CACZ,CAAA;AAvBY,0BAAO;AAGlB;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,wBAAwB,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IACrF,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACT;AAIlB;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,uBAAuB,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IACpF,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCACV;AAIjB;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,qBAAqB,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAClF,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uCAC1B;AAIf;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,sBAAsB,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IACjF,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACjB,IAAI;yCAAC;AAOf;IALC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,kBAAI,EAAE,WAAW,EAAE,kCAAkC,EAAE,CAAC;IAClF,IAAA,kBAAQ,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE;QAC1C,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;KACpB,CAAC;8BACI,kBAAI;qCAAC;kBAtBA,OAAO;IADnB,IAAA,gBAAM,EAAC,cAAc,CAAC;GACV,OAAO,CAuBnB"}
|
|
@@ -10,6 +10,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Role = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
13
14
|
const database_1 = require("../common/database");
|
|
14
15
|
const class_validator_1 = require("class-validator");
|
|
15
16
|
const typeorm_1 = require("typeorm");
|
|
@@ -19,11 +20,13 @@ let Role = class Role extends database_1.BaseEntity {
|
|
|
19
20
|
};
|
|
20
21
|
exports.Role = Role;
|
|
21
22
|
__decorate([
|
|
23
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'Name of the role', minLength: 3 }),
|
|
22
24
|
(0, class_validator_1.MinLength)(3),
|
|
23
25
|
(0, typeorm_1.Column)({ unique: true }),
|
|
24
26
|
__metadata("design:type", String)
|
|
25
27
|
], Role.prototype, "name", void 0);
|
|
26
28
|
__decorate([
|
|
29
|
+
(0, swagger_1.ApiProperty)({ type: Boolean, description: '¿Is this the default role?' }),
|
|
27
30
|
(0, typeorm_1.Column)({ default: false }),
|
|
28
31
|
__metadata("design:type", Boolean)
|
|
29
32
|
], Role.prototype, "isDefault", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"role.entity.js","sourceRoot":"","sources":["../../src/entities/role.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iDAAgD;AAChD,qDAA4C;AAC5C,qCAAyC;AAGlC,IAAM,IAAI,GAAV,MAAM,IAAK,SAAQ,qBAAU;
|
|
1
|
+
{"version":3,"file":"role.entity.js","sourceRoot":"","sources":["../../src/entities/role.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,iDAAgD;AAChD,qDAA4C;AAC5C,qCAAyC;AAGlC,IAAM,IAAI,GAAV,MAAM,IAAK,SAAQ,qBAAU;IAIlC,IAAI,CAAS;IAIb,SAAS,CAAU;CACpB,CAAA;AATY,oBAAI;AAIf;IAHC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,kBAAkB,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;IAC5E,IAAA,2BAAS,EAAC,CAAC,CAAC;IACZ,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;kCACZ;AAIb;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,4BAA4B,EAAE,CAAC;IACzE,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;uCACR;eARR,IAAI;IADhB,IAAA,gBAAM,GAAE;GACI,IAAI,CAShB"}
|