easywork-common-lib 1.0.5 → 1.0.6
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/app_config/app-config.entity.d.ts +5 -0
- package/dist/entities/drive/folder.entity.d.ts +5 -0
- package/dist/entities/email.entity.d.ts +5 -0
- package/dist/entities/helpers/contact_email.entity.d.ts +11 -0
- package/dist/entities/helpers/contact_phone.entity.d.ts +11 -0
- package/dist/entities/helpers/contact_sources.entity.d.ts +5 -0
- package/dist/entities/helpers/contact_types.entity.d.ts +5 -0
- package/dist/entities/helpers/lead_email.entity.d.ts +11 -0
- package/dist/entities/helpers/lead_phone.entity.d.ts +11 -0
- package/dist/entities/index.d.ts +10 -0
- package/dist/entities/phone.entity.d.ts +5 -0
- package/dist/entities/sales/contact.entity.d.ts +41 -0
- package/dist/entities/sales/lead.entity.d.ts +46 -0
- package/dist/entities/sales/poliza.entity.d.ts +58 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/entities/app_config/app-config.entity.ts +13 -0
- package/src/entities/drive/folder.entity.ts +13 -0
- package/src/entities/email.entity.ts +13 -0
- package/src/entities/helpers/contact_email.entity.ts +33 -0
- package/src/entities/helpers/contact_phone.entity.ts +33 -0
- package/src/entities/helpers/contact_sources.entity.ts +13 -0
- package/src/entities/helpers/contact_types.entity.ts +13 -0
- package/src/entities/helpers/lead_email.entity.ts +31 -0
- package/src/entities/helpers/lead_phone.entity.ts +31 -0
- package/src/entities/index.ts +10 -0
- package/src/entities/phone.entity.ts +13 -0
- package/src/entities/profile.entity.ts +1 -1
- package/src/entities/sales/contact.entity.ts +140 -0
- package/src/entities/sales/lead.entity.ts +151 -0
- package/src/entities/sales/poliza.entity.ts +220 -0
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { BaseEntity } from "@common/database";
|
|
2
|
+
import { MinLength } from "class-validator";
|
|
3
|
+
import { User } from "../user.entity";
|
|
4
|
+
import { Column, Entity, ManyToOne } from "typeorm";
|
|
5
|
+
import { Contact } from "./contact.entity";
|
|
6
|
+
|
|
7
|
+
@Entity()
|
|
8
|
+
export class Poliza extends BaseEntity {
|
|
9
|
+
@Column({ name: "id_bitrix", nullable: true })
|
|
10
|
+
idBitrix: number;
|
|
11
|
+
|
|
12
|
+
@MinLength(3)
|
|
13
|
+
@Column({ length: 15, nullable: true, name: "no_poliza" })
|
|
14
|
+
noPoliza: string;
|
|
15
|
+
|
|
16
|
+
@MinLength(3)
|
|
17
|
+
@Column({ length: 255, nullable: true })
|
|
18
|
+
title: string;
|
|
19
|
+
|
|
20
|
+
@MinLength(3)
|
|
21
|
+
@Column({ length: 5, nullable: true })
|
|
22
|
+
version: string;
|
|
23
|
+
|
|
24
|
+
@Column({ nullable: true, name: "vigencia_desde" })
|
|
25
|
+
vigenciaDesde: Date;
|
|
26
|
+
|
|
27
|
+
@Column({ nullable: true, name: "vigencia_hasta" })
|
|
28
|
+
vigenciaHasta: Date;
|
|
29
|
+
|
|
30
|
+
@Column({ nullable: true, name: "begin_date" })
|
|
31
|
+
beginDate: Date;
|
|
32
|
+
|
|
33
|
+
@Column({ nullable: true, name: "close_date" })
|
|
34
|
+
closeDate: Date;
|
|
35
|
+
|
|
36
|
+
@Column({ default: false })
|
|
37
|
+
opened?: boolean;
|
|
38
|
+
|
|
39
|
+
@Column({ name: "stage_semantic_id", nullable: true })
|
|
40
|
+
stageSemantic?: string;
|
|
41
|
+
|
|
42
|
+
@Column({ nullable: true, name: "stage_id" })
|
|
43
|
+
stage: string;
|
|
44
|
+
|
|
45
|
+
@Column({ name: "is_new", nullable: true })
|
|
46
|
+
isNew: boolean;
|
|
47
|
+
|
|
48
|
+
@Column({ type: "float", name: "prima_neta", default: 0 })
|
|
49
|
+
primaNeta?: number;
|
|
50
|
+
|
|
51
|
+
@Column({ type: "float", name: "recargo_fraccionado", default: 0 })
|
|
52
|
+
recargoFraccionado?: number;
|
|
53
|
+
|
|
54
|
+
@Column({ type: "float", name: "derecho_poliza", default: 0 })
|
|
55
|
+
derechoPoliza?: number;
|
|
56
|
+
|
|
57
|
+
@Column({ type: "float", default: 0 })
|
|
58
|
+
iva?: number;
|
|
59
|
+
|
|
60
|
+
@Column({ type: "float", name: "importe_pagar", nullable: true })
|
|
61
|
+
importePagar?: number;
|
|
62
|
+
|
|
63
|
+
@Column({ default: false, name: "is_recurring" })
|
|
64
|
+
isRecurring?: boolean;
|
|
65
|
+
|
|
66
|
+
@Column({ default: false, name: "is_return_customer" })
|
|
67
|
+
isReturnCustomer?: boolean;
|
|
68
|
+
|
|
69
|
+
@Column({ default: false, name: "is_repeated_approach" })
|
|
70
|
+
isRepeatedApproach?: boolean;
|
|
71
|
+
|
|
72
|
+
@Column({ default: false })
|
|
73
|
+
closed?: boolean;
|
|
74
|
+
|
|
75
|
+
@Column({ length: 50, nullable: true, name: "type_id" })
|
|
76
|
+
typeId?: string;
|
|
77
|
+
|
|
78
|
+
@Column({ type: "float", nullable: true })
|
|
79
|
+
opportunity?: number;
|
|
80
|
+
|
|
81
|
+
@Column({ default: false, name: "is_manual_opportunity" })
|
|
82
|
+
isManualOpportunity?: boolean;
|
|
83
|
+
|
|
84
|
+
@Column({ name: "currency_id", nullable: true })
|
|
85
|
+
currencyId?: string;
|
|
86
|
+
|
|
87
|
+
@Column({ name: "tax_value", type: "float", nullable: true })
|
|
88
|
+
taxValue?: number;
|
|
89
|
+
|
|
90
|
+
@Column({ type: "float", default: 0, name: "opportunity_account" })
|
|
91
|
+
opportunityAccount?: number;
|
|
92
|
+
|
|
93
|
+
@Column({ type: "float", default: 0, name: "tax_value_account" })
|
|
94
|
+
taxValueAccount?: number;
|
|
95
|
+
|
|
96
|
+
@Column({ name: "account_currency_id", nullable: true })
|
|
97
|
+
accountCurrencyId?: string;
|
|
98
|
+
|
|
99
|
+
@Column({ nullable: true })
|
|
100
|
+
probability?: number;
|
|
101
|
+
|
|
102
|
+
@Column({ type: "text", nullable: true })
|
|
103
|
+
comments?: string;
|
|
104
|
+
|
|
105
|
+
@Column({ name: "event_date", nullable: true })
|
|
106
|
+
eventDate?: Date;
|
|
107
|
+
|
|
108
|
+
@Column({ type: "varchar", length: 50, nullable: true, name: "event_id" })
|
|
109
|
+
eventId?: string;
|
|
110
|
+
|
|
111
|
+
@Column({ type: "text", nullable: true, name: "event_description" })
|
|
112
|
+
eventDescription?: string;
|
|
113
|
+
|
|
114
|
+
@Column({
|
|
115
|
+
type: "decimal",
|
|
116
|
+
precision: 20,
|
|
117
|
+
scale: 4,
|
|
118
|
+
default: 1.0,
|
|
119
|
+
name: "exch_rate",
|
|
120
|
+
})
|
|
121
|
+
exchRate?: number;
|
|
122
|
+
|
|
123
|
+
@Column({ nullable: true })
|
|
124
|
+
product?: string;
|
|
125
|
+
|
|
126
|
+
@Column({ nullable: true, name: "source_id" })
|
|
127
|
+
sourceId: string;
|
|
128
|
+
|
|
129
|
+
@Column({ nullable: true, name: "source_description" })
|
|
130
|
+
sourceDescription: string;
|
|
131
|
+
|
|
132
|
+
@ManyToOne(() => User, {
|
|
133
|
+
onDelete: "SET NULL",
|
|
134
|
+
onUpdate: "CASCADE",
|
|
135
|
+
nullable: true,
|
|
136
|
+
})
|
|
137
|
+
contact: Contact;
|
|
138
|
+
|
|
139
|
+
@ManyToOne(() => User, {
|
|
140
|
+
onDelete: "SET NULL",
|
|
141
|
+
onUpdate: "CASCADE",
|
|
142
|
+
nullable: true,
|
|
143
|
+
})
|
|
144
|
+
assignedBy?: User;
|
|
145
|
+
|
|
146
|
+
@ManyToOne(() => User, {
|
|
147
|
+
onDelete: "SET NULL",
|
|
148
|
+
onUpdate: "CASCADE",
|
|
149
|
+
nullable: true,
|
|
150
|
+
})
|
|
151
|
+
createdBy?: User;
|
|
152
|
+
|
|
153
|
+
@Column({ length: 255, nullable: true, name: "descripcion_movimiento" })
|
|
154
|
+
descripcionMovimiento?: string;
|
|
155
|
+
|
|
156
|
+
@Column({ length: 255, nullable: true })
|
|
157
|
+
especificacionesPlan: string;
|
|
158
|
+
|
|
159
|
+
@ManyToOne(() => User, {
|
|
160
|
+
onDelete: "SET NULL",
|
|
161
|
+
onUpdate: "CASCADE",
|
|
162
|
+
nullable: true,
|
|
163
|
+
})
|
|
164
|
+
agenteReclamo?: User;
|
|
165
|
+
|
|
166
|
+
@ManyToOne(() => User, {
|
|
167
|
+
onDelete: "SET NULL",
|
|
168
|
+
onUpdate: "CASCADE",
|
|
169
|
+
nullable: true,
|
|
170
|
+
})
|
|
171
|
+
agenteReembolso?: User;
|
|
172
|
+
|
|
173
|
+
@ManyToOne(() => User, {
|
|
174
|
+
onDelete: "SET NULL",
|
|
175
|
+
onUpdate: "CASCADE",
|
|
176
|
+
nullable: true,
|
|
177
|
+
})
|
|
178
|
+
agenteProgramaciones?: User;
|
|
179
|
+
|
|
180
|
+
@ManyToOne(() => User, {
|
|
181
|
+
onDelete: "SET NULL",
|
|
182
|
+
onUpdate: "CASCADE",
|
|
183
|
+
nullable: true,
|
|
184
|
+
})
|
|
185
|
+
agenteReembolsoSubsecuente?: User;
|
|
186
|
+
|
|
187
|
+
@ManyToOne(() => User, {
|
|
188
|
+
onDelete: "SET NULL",
|
|
189
|
+
onUpdate: "CASCADE",
|
|
190
|
+
nullable: true,
|
|
191
|
+
})
|
|
192
|
+
agenteRescateFondos?: User;
|
|
193
|
+
|
|
194
|
+
@ManyToOne(() => User, {
|
|
195
|
+
onDelete: "SET NULL",
|
|
196
|
+
onUpdate: "CASCADE",
|
|
197
|
+
nullable: true,
|
|
198
|
+
})
|
|
199
|
+
agenteSaludGMM?: User;
|
|
200
|
+
|
|
201
|
+
@ManyToOne(() => User, {
|
|
202
|
+
onDelete: "SET NULL",
|
|
203
|
+
onUpdate: "CASCADE",
|
|
204
|
+
nullable: true,
|
|
205
|
+
})
|
|
206
|
+
agenteVida?: User;
|
|
207
|
+
|
|
208
|
+
@ManyToOne(() => User, {
|
|
209
|
+
onDelete: "SET NULL",
|
|
210
|
+
onUpdate: "CASCADE",
|
|
211
|
+
nullable: true,
|
|
212
|
+
})
|
|
213
|
+
agenteAutos?: User;
|
|
214
|
+
|
|
215
|
+
@Column({ name: "fecha_referida_pago", nullable: true })
|
|
216
|
+
fechaReferidaPago?: Date;
|
|
217
|
+
|
|
218
|
+
@ManyToOne(() => User, (user) => user.id, { nullable: true })
|
|
219
|
+
modifyBy?: User;
|
|
220
|
+
}
|