easywork-common-lib 1.0.18 → 1.0.19
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/folder.entity.d.ts +1 -0
- package/dist/entities/drive/folder.entity.js +11 -2
- package/dist/entities/drive/folder.entity.js.map +1 -1
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -0
- package/src/common/@types/typings/globals.d.ts +0 -13
- package/src/common/database/base.entity.ts +0 -30
- package/src/common/database/index.ts +0 -1
- package/src/entities/app_config/app-config.entity.ts +0 -13
- package/src/entities/drive/file.entity.ts +0 -41
- package/src/entities/drive/folder.entity.ts +0 -24
- package/src/entities/drive/index.ts +0 -2
- package/src/entities/email.entity.ts +0 -13
- package/src/entities/group.entity.ts +0 -10
- package/src/entities/helpers/contact_email.entity.ts +0 -33
- package/src/entities/helpers/contact_phone.entity.ts +0 -33
- package/src/entities/helpers/contact_sources.entity.ts +0 -13
- package/src/entities/helpers/contact_types.entity.ts +0 -13
- package/src/entities/helpers/entity_file.entity.ts +0 -26
- package/src/entities/helpers/lead_email.entity.ts +0 -31
- package/src/entities/helpers/lead_phone.entity.ts +0 -31
- package/src/entities/index.ts +0 -18
- package/src/entities/otp-log.entity.ts +0 -20
- package/src/entities/permission.entity.ts +0 -20
- package/src/entities/phone.entity.ts +0 -13
- package/src/entities/profile.entity.ts +0 -24
- package/src/entities/protocol.entity.ts +0 -24
- package/src/entities/refresh-token.entity.ts +0 -24
- package/src/entities/role.entity.ts +0 -13
- package/src/entities/sales/contact.entity.ts +0 -140
- package/src/entities/sales/lead.entity.ts +0 -151
- package/src/entities/sales/poliza.entity.ts +0 -220
- package/src/entities/user.entity.ts +0 -54
- package/src/eslint.config.js +0 -45
- package/src/index.ts +0 -1
|
@@ -1,220 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { BaseEntity } from "../common/database";
|
|
2
|
-
import { Column, Entity, JoinColumn, JoinTable, ManyToMany, OneToOne } from "typeorm";
|
|
3
|
-
import { Exclude } from "class-transformer";
|
|
4
|
-
import { Profile } from "./profile.entity";
|
|
5
|
-
import { Role } from "./role.entity";
|
|
6
|
-
|
|
7
|
-
@Entity()
|
|
8
|
-
export class User extends BaseEntity {
|
|
9
|
-
@Column({ unique: true })
|
|
10
|
-
username!: string;
|
|
11
|
-
|
|
12
|
-
@Column({ unique: true })
|
|
13
|
-
email!: string;
|
|
14
|
-
|
|
15
|
-
@Column({ type: "text" })
|
|
16
|
-
bio!: string;
|
|
17
|
-
|
|
18
|
-
@Column({ type: "text" })
|
|
19
|
-
avatar!: string;
|
|
20
|
-
|
|
21
|
-
@Exclude()
|
|
22
|
-
@Column({ type: "text" })
|
|
23
|
-
hash!: string;
|
|
24
|
-
|
|
25
|
-
@Exclude()
|
|
26
|
-
@Column({ nullable: true })
|
|
27
|
-
twoFactorSecret?: string;
|
|
28
|
-
|
|
29
|
-
@Column({ default: false })
|
|
30
|
-
isTwoFactorEnabled?: boolean;
|
|
31
|
-
|
|
32
|
-
@Column({ unique: true })
|
|
33
|
-
phone?: string;
|
|
34
|
-
|
|
35
|
-
@Column({ default: false })
|
|
36
|
-
isVerified?: boolean;
|
|
37
|
-
|
|
38
|
-
@Column({ type: "timestamp", nullable: true })
|
|
39
|
-
lastLogin?: Date;
|
|
40
|
-
|
|
41
|
-
@OneToOne(() => Profile, {
|
|
42
|
-
onDelete: "CASCADE",
|
|
43
|
-
onUpdate: "CASCADE",
|
|
44
|
-
})
|
|
45
|
-
@JoinColumn()
|
|
46
|
-
profile: Profile;
|
|
47
|
-
|
|
48
|
-
@ManyToMany(() => Role, {
|
|
49
|
-
onDelete: "CASCADE",
|
|
50
|
-
onUpdate: "CASCADE",
|
|
51
|
-
})
|
|
52
|
-
@JoinTable()
|
|
53
|
-
roles?: Role[];
|
|
54
|
-
}
|
package/src/eslint.config.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
const rubiin = require("@antfu/eslint-config").default;
|
|
2
|
-
|
|
3
|
-
module.exports = rubiin({
|
|
4
|
-
stylistic: {
|
|
5
|
-
semi: true,
|
|
6
|
-
quotes: "double",
|
|
7
|
-
}, // enable stylistic rules
|
|
8
|
-
yaml: true, // enable yaml rules,
|
|
9
|
-
jsonc: true, // enable jsonc rules
|
|
10
|
-
markdown: false, // enable markdown rules
|
|
11
|
-
gitignore: true, // enable gitignore rules,
|
|
12
|
-
typescript: {
|
|
13
|
-
tsconfigPath: "tsconfig.json",
|
|
14
|
-
},
|
|
15
|
-
overrides: {
|
|
16
|
-
test: {
|
|
17
|
-
"ts/unbound-method": "off",
|
|
18
|
-
},
|
|
19
|
-
typescript: {
|
|
20
|
-
"ts/no-misused-promises": [
|
|
21
|
-
"error",
|
|
22
|
-
{
|
|
23
|
-
checksVoidReturn: false,
|
|
24
|
-
},
|
|
25
|
-
],
|
|
26
|
-
"ts/no-floating-promises": [
|
|
27
|
-
"error",
|
|
28
|
-
{
|
|
29
|
-
ignoreIIFE: true,
|
|
30
|
-
},
|
|
31
|
-
],
|
|
32
|
-
"unicorn/prefer-top-level-await": "off",
|
|
33
|
-
"unicorn/prevent-abbreviations": [
|
|
34
|
-
"error",
|
|
35
|
-
{
|
|
36
|
-
ignore: ["\\.e2e*", "\\.spec*", "\\.decorator*", "\\*idx*"],
|
|
37
|
-
allowList: {
|
|
38
|
-
ProcessEnv: true,
|
|
39
|
-
UUIDParam: true,
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
],
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
});
|
package/src/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./entities";
|