easywork-common-lib 1.0.305 → 1.0.307

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.
Files changed (58) hide show
  1. package/dist/common/functions/cripto.d.ts +1 -0
  2. package/dist/common/functions/cripto.js +9 -0
  3. package/dist/common/functions/cripto.js.map +1 -0
  4. package/dist/common/functions/image.d.ts +3 -0
  5. package/dist/common/functions/image.js +15 -0
  6. package/dist/common/functions/image.js.map +1 -0
  7. package/dist/common/functions/index.d.ts +2 -0
  8. package/dist/common/functions/index.js +19 -0
  9. package/dist/common/functions/index.js.map +1 -0
  10. package/dist/common/index.d.ts +1 -0
  11. package/dist/common/index.js +1 -0
  12. package/dist/common/index.js.map +1 -1
  13. package/dist/entities/helpers/sales/lead/index.d.ts +1 -0
  14. package/dist/entities/helpers/sales/lead/index.js +1 -0
  15. package/dist/entities/helpers/sales/lead/index.js.map +1 -1
  16. package/dist/entities/helpers/sales/lead/lead_cancel_reazon.entity.d.ts +4 -0
  17. package/dist/entities/helpers/sales/lead/lead_cancel_reazon.entity.js +29 -0
  18. package/dist/entities/helpers/sales/lead/lead_cancel_reazon.entity.js.map +1 -0
  19. package/dist/entities/index.d.ts +1 -2
  20. package/dist/entities/index.js +1 -2
  21. package/dist/entities/index.js.map +1 -1
  22. package/dist/entities/sales/contact.entity.js +1 -0
  23. package/dist/entities/sales/contact.entity.js.map +1 -1
  24. package/dist/entities/sales/index.d.ts +2 -0
  25. package/dist/entities/sales/index.js +2 -0
  26. package/dist/entities/sales/index.js.map +1 -1
  27. package/dist/entities/sales/lead.entity.d.ts +34 -44
  28. package/dist/entities/sales/lead.entity.js +143 -197
  29. package/dist/entities/sales/lead.entity.js.map +1 -1
  30. package/dist/entities/sales/poliza.entity.d.ts +15 -0
  31. package/dist/entities/sales/poliza.entity.js +103 -1
  32. package/dist/entities/sales/poliza.entity.js.map +1 -1
  33. package/dist/entities/sales/receipt-sub-agente.entity.d.ts +5 -0
  34. package/dist/entities/sales/receipt-sub-agente.entity.js +35 -0
  35. package/dist/entities/sales/receipt-sub-agente.entity.js.map +1 -0
  36. package/dist/entities/sales/receipt.entity.d.ts +5 -0
  37. package/dist/entities/sales/receipt.entity.js +31 -1
  38. package/dist/entities/sales/receipt.entity.js.map +1 -1
  39. package/dist/entities/thirdparty/email-config.d.ts +1 -0
  40. package/dist/entities/thirdparty/email-config.js +3 -0
  41. package/dist/entities/thirdparty/email-config.js.map +1 -0
  42. package/dist/entities/thirdparty/email.entity.d.ts +3 -2
  43. package/dist/entities/thirdparty/email.entity.js +7 -2
  44. package/dist/entities/thirdparty/email.entity.js.map +1 -1
  45. package/dist/entities/thirdparty/oauth.entity.d.ts +17 -0
  46. package/dist/entities/thirdparty/oauth.entity.js +88 -0
  47. package/dist/entities/thirdparty/oauth.entity.js.map +1 -0
  48. package/dist/modules/queue/notifier.service.d.ts +2 -1
  49. package/dist/modules/queue/notifier.service.js +2 -0
  50. package/dist/modules/queue/notifier.service.js.map +1 -1
  51. package/dist/modules/queue/notifiers/index.d.ts +1 -0
  52. package/dist/modules/queue/notifiers/index.js +1 -0
  53. package/dist/modules/queue/notifiers/index.js.map +1 -1
  54. package/dist/modules/queue/notifiers/lead.notifier.d.ts +7 -0
  55. package/dist/modules/queue/notifiers/lead.notifier.js +49 -0
  56. package/dist/modules/queue/notifiers/lead.notifier.js.map +1 -0
  57. package/package.json +1 -1
  58. package/tsconfig.tsbuildinfo +1 -1
@@ -11,237 +11,164 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.Lead = void 0;
13
13
  const database_1 = require("../../common/database");
14
- const lead_email_entity_1 = require("../helpers/sales/lead/lead_email.entity");
15
- const lead_phone_entity_1 = require("../helpers/sales/lead/lead_phone.entity");
14
+ const client_sources_entity_1 = require("../helpers/sales/common/client_sources.entity");
15
+ const client_types_entity_1 = require("../helpers/sales/common/client_types.entity");
16
16
  const user_entity_1 = require("../user.entity");
17
17
  const typeorm_1 = require("typeorm");
18
+ const swagger_1 = require("@nestjs/swagger");
19
+ const common_1 = require("../../common");
18
20
  const contact_entity_1 = require("./contact.entity");
19
21
  const helpers_1 = require("../helpers");
20
- const swagger_1 = require("@nestjs/swagger");
21
- let Lead = class Lead extends database_1.BaseEntity {
22
- curp;
22
+ let Lead = class Lead extends database_1.BaseEntityWithUser {
23
23
  idBitrix;
24
- cua;
24
+ typePerson;
25
+ codigo;
25
26
  fullName;
26
27
  name;
27
28
  lastName;
28
29
  secondName;
30
+ rfc;
31
+ address;
32
+ phones;
33
+ emails;
34
+ cargo;
35
+ birthdate;
36
+ gender;
37
+ type;
38
+ source;
39
+ assignedBy;
40
+ observador;
41
+ lead;
42
+ relations;
43
+ curp;
44
+ cua;
29
45
  photo;
30
- opportunity;
31
46
  post;
32
- address;
33
47
  comments;
34
- lead;
35
- export;
36
- originatorId;
37
- originId;
38
- originVersion;
39
- birthdate;
40
- honorific;
41
- hasPhone;
42
- hasEmail;
43
- hasImol;
44
- faceId;
45
- opened;
46
48
  company;
47
- statusId;
48
- companyTitle;
49
- accountCurrencyId;
50
- title;
49
+ export;
51
50
  sourceDescription;
52
- isReturnCustomer;
53
- isManualOpportunity;
54
- assignedBy;
55
- createdBy;
56
- observador;
57
- contact;
58
- type;
51
+ cancelReazon;
59
52
  stage;
60
- source;
61
- phones;
62
- emails;
63
53
  };
64
54
  exports.Lead = Lead;
65
- __decorate([
66
- (0, swagger_1.ApiProperty)({ type: String, description: 'CURP of the lead', required: false }),
67
- (0, typeorm_1.Column)({ name: "curp", length: 50, nullable: true }),
68
- __metadata("design:type", String)
69
- ], Lead.prototype, "curp", void 0);
70
55
  __decorate([
71
56
  (0, swagger_1.ApiProperty)({ type: Number, description: 'Bitrix ID of the lead', required: false }),
72
57
  (0, typeorm_1.Column)({ name: "id_bitrix", nullable: true }),
73
58
  __metadata("design:type", Number)
74
59
  ], Lead.prototype, "idBitrix", void 0);
75
60
  __decorate([
76
- (0, swagger_1.ApiProperty)({ type: String, description: 'CUA of the lead', required: false }),
77
- (0, typeorm_1.Column)({ name: "cua", length: 50, nullable: true }),
61
+ (0, swagger_1.ApiProperty)({
62
+ enum: common_1.PersonType,
63
+ description: 'Type of person',
64
+ default: common_1.PersonType.FISICA
65
+ }),
66
+ (0, typeorm_1.Column)({
67
+ type: "enum",
68
+ enum: common_1.PersonType,
69
+ default: common_1.PersonType.FISICA
70
+ }),
78
71
  __metadata("design:type", String)
79
- ], Lead.prototype, "cua", void 0);
72
+ ], Lead.prototype, "typePerson", void 0);
73
+ __decorate([
74
+ (0, swagger_1.ApiProperty)({ type: String, description: 'Code of the lead', required: false }),
75
+ (0, typeorm_1.Column)({ name: "codigo", length: 100, nullable: true }),
76
+ __metadata("design:type", String)
77
+ ], Lead.prototype, "codigo", void 0);
80
78
  __decorate([
81
79
  (0, swagger_1.ApiProperty)({ type: String, description: 'Full name of the lead', required: false }),
82
- (0, typeorm_1.Column)({ name: "full_name", length: 100, nullable: true }),
80
+ (0, typeorm_1.Column)({ name: "full_name", length: 255, nullable: true }),
83
81
  __metadata("design:type", String)
84
82
  ], Lead.prototype, "fullName", void 0);
85
83
  __decorate([
86
84
  (0, swagger_1.ApiProperty)({ type: String, description: 'First name of the lead', required: false }),
87
- (0, typeorm_1.Column)({ name: "name", length: 50, nullable: true }),
85
+ (0, typeorm_1.Column)({ name: "name", length: 150, nullable: true }),
88
86
  __metadata("design:type", String)
89
87
  ], Lead.prototype, "name", void 0);
90
88
  __decorate([
91
89
  (0, swagger_1.ApiProperty)({ type: String, description: 'Last name of the lead', required: false }),
92
- (0, typeorm_1.Column)({ name: "last_name", length: 50, nullable: true }),
90
+ (0, typeorm_1.Column)({ name: "last_name", length: 150, nullable: true }),
93
91
  __metadata("design:type", String)
94
92
  ], Lead.prototype, "lastName", void 0);
95
93
  __decorate([
96
94
  (0, swagger_1.ApiProperty)({ type: String, description: 'Second name of the lead', required: false }),
97
- (0, typeorm_1.Column)({ name: "second_name", length: 50, nullable: true }),
95
+ (0, typeorm_1.Column)({ name: "second_name", length: 150, nullable: true }),
98
96
  __metadata("design:type", String)
99
97
  ], Lead.prototype, "secondName", void 0);
100
98
  __decorate([
101
- (0, swagger_1.ApiProperty)({ type: String, description: 'Photo URL of the lead', required: false }),
102
- (0, typeorm_1.Column)({ name: "photo", length: 255, nullable: true }),
103
- __metadata("design:type", String)
104
- ], Lead.prototype, "photo", void 0);
105
- __decorate([
106
- (0, swagger_1.ApiProperty)({ type: Number, description: 'Opportunity amount', required: false }),
107
- (0, typeorm_1.Column)({ type: "decimal", nullable: true }),
108
- __metadata("design:type", Number)
109
- ], Lead.prototype, "opportunity", void 0);
110
- __decorate([
111
- (0, swagger_1.ApiProperty)({ type: String, description: 'Post of the lead', required: false }),
112
- (0, typeorm_1.Column)({ name: "post", type: "text", nullable: true }),
99
+ (0, swagger_1.ApiProperty)({ type: String, description: 'RFC of the lead', required: false }),
100
+ (0, typeorm_1.Column)({ name: "rfc", length: 100, nullable: true }),
113
101
  __metadata("design:type", String)
114
- ], Lead.prototype, "post", void 0);
102
+ ], Lead.prototype, "rfc", void 0);
115
103
  __decorate([
116
104
  (0, swagger_1.ApiProperty)({ type: String, description: 'Address of the lead', required: false }),
117
105
  (0, typeorm_1.Column)({ name: "address", type: "text", nullable: true }),
118
106
  __metadata("design:type", String)
119
107
  ], Lead.prototype, "address", void 0);
120
108
  __decorate([
121
- (0, swagger_1.ApiProperty)({ type: String, description: 'Comments about the lead', required: false }),
122
- (0, typeorm_1.Column)({ name: "comments", type: "text", nullable: true }),
123
- __metadata("design:type", String)
124
- ], Lead.prototype, "comments", void 0);
125
- __decorate([
126
- (0, swagger_1.ApiProperty)({ type: String, description: 'Lead reference', required: false }),
127
- (0, typeorm_1.Column)({ name: "lead", nullable: true }),
128
- __metadata("design:type", String)
129
- ], Lead.prototype, "lead", void 0);
130
- __decorate([
131
- (0, swagger_1.ApiProperty)({ type: Boolean, description: 'Is the lead exported?', default: false }),
132
- (0, typeorm_1.Column)({ name: "export", default: false }),
133
- __metadata("design:type", Boolean)
134
- ], Lead.prototype, "export", void 0);
135
- __decorate([
136
- (0, swagger_1.ApiProperty)({ type: String, description: 'Originator ID of the lead', required: false }),
137
- (0, typeorm_1.Column)({ name: "originator_id", length: 255, nullable: true }),
138
- __metadata("design:type", String)
139
- ], Lead.prototype, "originatorId", void 0);
109
+ (0, swagger_1.ApiProperty)({ type: () => [helpers_1.LeadPhone], description: 'Phones associated with the lead' }),
110
+ (0, typeorm_1.OneToMany)(() => helpers_1.LeadPhone, (leadPhone) => leadPhone.lead, {
111
+ onDelete: "CASCADE",
112
+ onUpdate: "CASCADE",
113
+ eager: true,
114
+ }),
115
+ __metadata("design:type", Array)
116
+ ], Lead.prototype, "phones", void 0);
140
117
  __decorate([
141
- (0, swagger_1.ApiProperty)({ type: String, description: 'Origin ID of the lead', required: false }),
142
- (0, typeorm_1.Column)({ name: "origin_id", length: 255, nullable: true }),
143
- __metadata("design:type", String)
144
- ], Lead.prototype, "originId", void 0);
118
+ (0, swagger_1.ApiProperty)({ type: () => [helpers_1.LeadEmail], description: 'Emails associated with the lead' }),
119
+ (0, typeorm_1.OneToMany)(() => helpers_1.LeadEmail, (leadEmail) => leadEmail.lead, {
120
+ onDelete: "CASCADE",
121
+ onUpdate: "CASCADE",
122
+ eager: true,
123
+ }),
124
+ __metadata("design:type", Array)
125
+ ], Lead.prototype, "emails", void 0);
145
126
  __decorate([
146
- (0, swagger_1.ApiProperty)({ type: String, description: 'Origin version of the lead', required: false }),
147
- (0, typeorm_1.Column)({ name: "origin_version", length: 255, nullable: true }),
127
+ (0, swagger_1.ApiProperty)({ type: String, description: 'Cargo of the lead', required: false }),
128
+ (0, typeorm_1.Column)({ name: "cargo", length: 150, nullable: true }),
148
129
  __metadata("design:type", String)
149
- ], Lead.prototype, "originVersion", void 0);
130
+ ], Lead.prototype, "cargo", void 0);
150
131
  __decorate([
151
132
  (0, swagger_1.ApiProperty)({ type: Date, description: 'Birthdate of the lead', required: false }),
152
133
  (0, typeorm_1.Column)({ name: "birthdate", nullable: true }),
153
134
  __metadata("design:type", Date)
154
135
  ], Lead.prototype, "birthdate", void 0);
155
136
  __decorate([
156
- (0, swagger_1.ApiProperty)({ type: String, description: 'Honorific of the lead', required: false }),
157
- (0, typeorm_1.Column)({ name: "honorific", length: 128, nullable: true }),
158
- __metadata("design:type", String)
159
- ], Lead.prototype, "honorific", void 0);
160
- __decorate([
161
- (0, swagger_1.ApiProperty)({ type: Boolean, description: 'Does the lead have a phone?', default: false }),
162
- (0, typeorm_1.Column)({ name: "has_phone", default: false }),
163
- __metadata("design:type", Boolean)
164
- ], Lead.prototype, "hasPhone", void 0);
165
- __decorate([
166
- (0, swagger_1.ApiProperty)({ type: Boolean, description: 'Does the lead have an email?', default: false }),
167
- (0, typeorm_1.Column)({ name: "has_email", default: false }),
168
- __metadata("design:type", Boolean)
169
- ], Lead.prototype, "hasEmail", void 0);
170
- __decorate([
171
- (0, swagger_1.ApiProperty)({ type: Boolean, description: 'Does the lead have IMOL?', default: false }),
172
- (0, typeorm_1.Column)({ name: "has_imol", default: false }),
173
- __metadata("design:type", Boolean)
174
- ], Lead.prototype, "hasImol", void 0);
175
- __decorate([
176
- (0, swagger_1.ApiProperty)({ type: String, description: 'Face ID of the lead', required: false }),
177
- (0, typeorm_1.Column)({ name: "face_id", nullable: true }),
178
- __metadata("design:type", String)
179
- ], Lead.prototype, "faceId", void 0);
180
- __decorate([
181
- (0, swagger_1.ApiProperty)({ type: Boolean, description: 'Is the lead opened?', default: false }),
182
- (0, typeorm_1.Column)({ name: "opened", default: false }),
183
- __metadata("design:type", Boolean)
184
- ], Lead.prototype, "opened", void 0);
185
- __decorate([
186
- (0, swagger_1.ApiProperty)({ type: String, description: 'Company associated with the lead', required: false }),
187
- (0, typeorm_1.Column)({ name: "company", nullable: true }),
188
- __metadata("design:type", String)
189
- ], Lead.prototype, "company", void 0);
190
- __decorate([
191
- (0, swagger_1.ApiProperty)({ type: String, description: 'Status ID of the lead', required: false }),
192
- (0, typeorm_1.Column)({ name: "status_id", nullable: true }),
193
- __metadata("design:type", String)
194
- ], Lead.prototype, "statusId", void 0);
195
- __decorate([
196
- (0, swagger_1.ApiProperty)({ type: String, description: 'Company title associated with the lead', required: false }),
197
- (0, typeorm_1.Column)({ name: "company_title", length: 255, nullable: true }),
137
+ (0, swagger_1.ApiProperty)({ type: String, description: 'Gender of the lead', required: false }),
138
+ (0, typeorm_1.Column)({ name: "gender", length: 10, nullable: true }),
198
139
  __metadata("design:type", String)
199
- ], Lead.prototype, "companyTitle", void 0);
140
+ ], Lead.prototype, "gender", void 0);
200
141
  __decorate([
201
- (0, swagger_1.ApiProperty)({ type: String, description: 'Account currency ID of the lead', required: false }),
202
- (0, typeorm_1.Column)({ name: "account_currency_id", nullable: true }),
203
- __metadata("design:type", String)
204
- ], Lead.prototype, "accountCurrencyId", void 0);
205
- __decorate([
206
- (0, swagger_1.ApiProperty)({ type: String, description: 'Title of the lead', required: false }),
207
- (0, typeorm_1.Column)({ nullable: true }),
208
- __metadata("design:type", String)
209
- ], Lead.prototype, "title", void 0);
210
- __decorate([
211
- (0, swagger_1.ApiProperty)({ type: String, description: 'Source description of the lead', required: false }),
212
- (0, typeorm_1.Column)({ name: "source_description", type: "text", nullable: true }),
213
- __metadata("design:type", String)
214
- ], Lead.prototype, "sourceDescription", void 0);
215
- __decorate([
216
- (0, swagger_1.ApiProperty)({ type: Boolean, description: 'Is the lead a return customer?', required: false }),
217
- (0, typeorm_1.Column)({ name: "is_return_customer", nullable: true }),
218
- __metadata("design:type", Boolean)
219
- ], Lead.prototype, "isReturnCustomer", void 0);
220
- __decorate([
221
- (0, swagger_1.ApiProperty)({ type: Boolean, description: 'Is the opportunity manual?', required: false }),
222
- (0, typeorm_1.Column)({ name: "is_manual_opportunity", nullable: true }),
223
- __metadata("design:type", Boolean)
224
- ], Lead.prototype, "isManualOpportunity", void 0);
142
+ (0, swagger_1.ApiProperty)({ type: () => client_types_entity_1.ClientType, description: 'Lead type', required: true }),
143
+ (0, typeorm_1.ManyToOne)(() => client_types_entity_1.ClientType, {
144
+ onDelete: "SET NULL",
145
+ onUpdate: "CASCADE",
146
+ nullable: true,
147
+ eager: true,
148
+ }),
149
+ __metadata("design:type", client_types_entity_1.ClientType)
150
+ ], Lead.prototype, "type", void 0);
225
151
  __decorate([
226
- (0, swagger_1.ApiProperty)({ type: () => user_entity_1.User, description: 'User assigned to the lead', required: false }),
227
- (0, typeorm_1.ManyToOne)(() => user_entity_1.User, {
152
+ (0, swagger_1.ApiProperty)({ type: () => client_sources_entity_1.ClientSource, description: 'Lead source', required: true }),
153
+ (0, typeorm_1.ManyToOne)(() => client_sources_entity_1.ClientSource, {
228
154
  onDelete: "SET NULL",
229
155
  onUpdate: "CASCADE",
230
156
  nullable: true,
157
+ eager: true,
231
158
  }),
232
- __metadata("design:type", user_entity_1.User)
233
- ], Lead.prototype, "assignedBy", void 0);
159
+ __metadata("design:type", client_sources_entity_1.ClientSource)
160
+ ], Lead.prototype, "source", void 0);
234
161
  __decorate([
235
- (0, swagger_1.ApiProperty)({ type: () => user_entity_1.User, description: 'User who created the lead', required: false }),
162
+ (0, swagger_1.ApiProperty)({ type: () => user_entity_1.User, description: 'User assigned to the lead', required: false }),
236
163
  (0, typeorm_1.ManyToOne)(() => user_entity_1.User, {
237
164
  onDelete: "SET NULL",
238
165
  onUpdate: "CASCADE",
239
166
  nullable: true,
240
167
  }),
241
168
  __metadata("design:type", user_entity_1.User)
242
- ], Lead.prototype, "createdBy", void 0);
169
+ ], Lead.prototype, "assignedBy", void 0);
243
170
  __decorate([
244
- (0, swagger_1.ApiProperty)({ type: () => user_entity_1.User, description: 'Observer of the lead', required: false }),
171
+ (0, swagger_1.ApiProperty)({ type: () => user_entity_1.User, description: 'User observing the lead', required: false }),
245
172
  (0, typeorm_1.ManyToOne)(() => user_entity_1.User, {
246
173
  onDelete: "SET NULL",
247
174
  onUpdate: "CASCADE",
@@ -250,24 +177,71 @@ __decorate([
250
177
  __metadata("design:type", user_entity_1.User)
251
178
  ], Lead.prototype, "observador", void 0);
252
179
  __decorate([
253
- (0, swagger_1.ApiProperty)({ type: () => contact_entity_1.Contact, description: 'Contact associated with the lead', required: false }),
254
- (0, typeorm_1.OneToOne)(() => contact_entity_1.Contact, {
180
+ (0, swagger_1.ApiProperty)({ type: () => Lead, description: 'Lead', required: false }),
181
+ (0, typeorm_1.ManyToOne)(() => Lead, {
255
182
  onDelete: "SET NULL",
256
183
  onUpdate: "CASCADE",
257
184
  nullable: true,
258
185
  }),
259
- __metadata("design:type", contact_entity_1.Contact)
260
- ], Lead.prototype, "contact", void 0);
186
+ __metadata("design:type", Lead)
187
+ ], Lead.prototype, "lead", void 0);
188
+ __decorate([
189
+ (0, swagger_1.ApiProperty)({ type: () => [contact_entity_1.Contact], description: 'Contacts related' }),
190
+ (0, typeorm_1.ManyToMany)(() => contact_entity_1.Contact, {
191
+ onDelete: "CASCADE",
192
+ onUpdate: "CASCADE",
193
+ }),
194
+ (0, typeorm_1.JoinTable)(),
195
+ __metadata("design:type", Array)
196
+ ], Lead.prototype, "relations", void 0);
197
+ __decorate([
198
+ (0, swagger_1.ApiProperty)({ type: String, description: 'CURP of the lead', required: false }),
199
+ (0, typeorm_1.Column)({ name: "curp", length: 50, nullable: true }),
200
+ __metadata("design:type", String)
201
+ ], Lead.prototype, "curp", void 0);
202
+ __decorate([
203
+ (0, swagger_1.ApiProperty)({ type: String, description: 'CUA of the lead', required: false }),
204
+ (0, typeorm_1.Column)({ name: "cua", length: 50, nullable: true }),
205
+ __metadata("design:type", String)
206
+ ], Lead.prototype, "cua", void 0);
207
+ __decorate([
208
+ (0, swagger_1.ApiProperty)({ type: String, description: 'Photo URL of the lead', required: false }),
209
+ (0, typeorm_1.Column)({ name: "photo", length: 255, nullable: true }),
210
+ __metadata("design:type", String)
211
+ ], Lead.prototype, "photo", void 0);
261
212
  __decorate([
262
- (0, swagger_1.ApiProperty)({ type: () => helpers_1.LeadType, description: 'Type of the lead', required: true }),
263
- (0, typeorm_1.ManyToOne)(() => helpers_1.LeadType, {
213
+ (0, swagger_1.ApiProperty)({ type: String, description: 'Post of the lead', required: false }),
214
+ (0, typeorm_1.Column)({ name: "post", type: "text", nullable: true }),
215
+ __metadata("design:type", String)
216
+ ], Lead.prototype, "post", void 0);
217
+ __decorate([
218
+ (0, swagger_1.ApiProperty)({ type: String, description: 'Comments about the lead', required: false }),
219
+ (0, typeorm_1.Column)({ name: "comments", type: "text", nullable: true }),
220
+ __metadata("design:type", String)
221
+ ], Lead.prototype, "comments", void 0);
222
+ __decorate([
223
+ (0, swagger_1.ApiProperty)({ type: String, description: 'Company of the lead', required: false }),
224
+ (0, typeorm_1.Column)({ length: 255, nullable: true }),
225
+ __metadata("design:type", String)
226
+ ], Lead.prototype, "company", void 0);
227
+ __decorate([
228
+ (0, swagger_1.ApiProperty)({ type: Boolean, description: 'Is the lead exported?', default: false }),
229
+ (0, typeorm_1.Column)({ name: "export", default: false }),
230
+ __metadata("design:type", Boolean)
231
+ ], Lead.prototype, "export", void 0);
232
+ __decorate([
233
+ (0, swagger_1.ApiProperty)({ type: String, description: 'Source description of the lead', required: false }),
234
+ (0, typeorm_1.Column)({ type: "text", nullable: true }),
235
+ __metadata("design:type", String)
236
+ ], Lead.prototype, "sourceDescription", void 0);
237
+ __decorate([
238
+ (0, swagger_1.ApiProperty)({ type: () => helpers_1.LeadCancelReazon, description: 'Cancel Reazon', required: false }),
239
+ (0, typeorm_1.ManyToOne)(() => helpers_1.LeadCancelReazon, {
264
240
  onDelete: "SET NULL",
265
241
  onUpdate: "CASCADE",
266
- nullable: true,
267
- eager: true,
268
242
  }),
269
- __metadata("design:type", helpers_1.LeadType)
270
- ], Lead.prototype, "type", void 0);
243
+ __metadata("design:type", helpers_1.LeadCancelReazon)
244
+ ], Lead.prototype, "cancelReazon", void 0);
271
245
  __decorate([
272
246
  (0, swagger_1.ApiProperty)({ type: () => helpers_1.LeadStage, description: 'Stage of the lead', required: true }),
273
247
  (0, typeorm_1.ManyToOne)(() => helpers_1.LeadStage, {
@@ -278,34 +252,6 @@ __decorate([
278
252
  }),
279
253
  __metadata("design:type", helpers_1.LeadStage)
280
254
  ], Lead.prototype, "stage", void 0);
281
- __decorate([
282
- (0, swagger_1.ApiProperty)({ type: () => helpers_1.LeadSource, description: 'Source of the lead', required: true }),
283
- (0, typeorm_1.ManyToOne)(() => helpers_1.LeadSource, {
284
- onDelete: "SET NULL",
285
- onUpdate: "CASCADE",
286
- nullable: true,
287
- eager: true,
288
- }),
289
- __metadata("design:type", helpers_1.LeadSource)
290
- ], Lead.prototype, "source", void 0);
291
- __decorate([
292
- (0, swagger_1.ApiProperty)({ type: () => [lead_phone_entity_1.LeadPhone], description: 'Phones associated with the lead' }),
293
- (0, typeorm_1.OneToMany)(() => lead_phone_entity_1.LeadPhone, (leadPhone) => leadPhone.lead, {
294
- onDelete: "CASCADE",
295
- onUpdate: "CASCADE",
296
- eager: true,
297
- }),
298
- __metadata("design:type", Array)
299
- ], Lead.prototype, "phones", void 0);
300
- __decorate([
301
- (0, swagger_1.ApiProperty)({ type: () => [lead_email_entity_1.LeadEmail], description: 'Emails associated with the lead' }),
302
- (0, typeorm_1.OneToMany)(() => lead_email_entity_1.LeadEmail, (leadEmail) => leadEmail.lead, {
303
- onDelete: "CASCADE",
304
- onUpdate: "CASCADE",
305
- eager: true,
306
- }),
307
- __metadata("design:type", Array)
308
- ], Lead.prototype, "emails", void 0);
309
255
  exports.Lead = Lead = __decorate([
310
256
  (0, typeorm_1.Entity)()
311
257
  ], Lead);
@@ -1 +1 @@
1
- {"version":3,"file":"lead.entity.js","sourceRoot":"","sources":["../../../src/entities/sales/lead.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAmD;AACnD,+EAAoE;AACpE,+EAAoE;AACpE,gDAAsC;AACtC,qCAAyE;AACzE,qDAA2C;AAC3C,wCAA6D;AAC7D,6CAA8C;AAGvC,IAAM,IAAI,GAAV,MAA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AC;8BACK,mBAAS;mCAAC;eA3KN,IAAI;IADhB,IAAA,gBAAM,GAAE;GACI,IAAI,CA4KhB"}
@@ -11,7 +11,10 @@ import { AgenteIntermediario } from "./agente-intermediario.entity";
11
11
  export declare class Poliza extends BaseEntityWithUser {
12
12
  idBitrix: number;
13
13
  poliza: string;
14
+ polizaRenovacion: string;
15
+ tipoConexion: string;
14
16
  version: number;
17
+ versionRenovacion: number;
15
18
  renovacion: number;
16
19
  repeated?: boolean;
17
20
  renewal?: boolean;
@@ -19,13 +22,21 @@ export declare class Poliza extends BaseEntityWithUser {
19
22
  vigenciaHasta: Date;
20
23
  vigenciaDesdeVersion: Date;
21
24
  vigenciaHastaVersion: Date;
25
+ vigenciaDesdeRenovacion: Date;
26
+ vigenciaHastaRenovacion: Date;
22
27
  fechaEmision: Date;
28
+ fechaEmisionRenovacion: Date;
23
29
  description: string;
24
30
  primaNeta?: number;
25
31
  recargoFraccionado?: number;
26
32
  derechoPoliza?: number;
27
33
  iva?: number;
28
34
  importePagar?: number;
35
+ primaNetaRenovacion?: number;
36
+ recargoFraccionadoRenovacion?: number;
37
+ derechoPolizaRenovacion?: number;
38
+ ivaRenovacion?: number;
39
+ importePagarRenovacion?: number;
29
40
  primaNetaMovimiento?: number;
30
41
  recargoFraccionadoMovimiento?: number;
31
42
  derechoPolizaMovimiento?: number;
@@ -33,6 +44,7 @@ export declare class Poliza extends BaseEntityWithUser {
33
44
  importePagarMovimiento?: number;
34
45
  conductoPago: string;
35
46
  frecuenciaCobro: PolizaFrecuenciaPago;
47
+ frecuenciaCobroRenovacion: PolizaFrecuenciaPago;
36
48
  currency: Currency;
37
49
  plazoPago: PolizaDiasPlazoPago;
38
50
  expeditionDate: Date;
@@ -61,7 +73,9 @@ export declare class Poliza extends BaseEntityWithUser {
61
73
  company: PolizaInsurance;
62
74
  type: PolizaType;
63
75
  formaCobro: PolizaFormaCobro;
76
+ formaCobroRenovacion: PolizaFormaCobro;
64
77
  agenteIntermediario: AgenteIntermediario;
78
+ agenteIntermediarioRenovacion: AgenteIntermediario;
65
79
  contact: Contact;
66
80
  files?: PolizaFile[];
67
81
  status: PolizaStatus;
@@ -79,6 +93,7 @@ export declare class Poliza extends BaseEntityWithUser {
79
93
  agenteVida?: User;
80
94
  agenteAutos?: User;
81
95
  fechaReferidaPago?: string;
96
+ fechaReferidaPagoRenovacion?: string;
82
97
  receipts?: Receipt[];
83
98
  beneficiaries?: PolizaBeneficiary[];
84
99
  vehicles?: BeneficiaryVehicle[];