test-entity-library-asm 3.2.14 → 3.3.1
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/AuthenticationCredential.d.ts +1 -1
- package/dist/entities/AuthenticationCredential.js +16 -7
- package/dist/entities/Bank.js +5 -0
- package/dist/entities/BusinessType.js +9 -3
- package/dist/entities/BusinessTypeProduct.js +2 -0
- package/dist/entities/Category.d.ts +3 -3
- package/dist/entities/Category.js +24 -8
- package/dist/entities/CategoryDate.js +3 -2
- package/dist/entities/CategorySchedule.js +3 -2
- package/dist/entities/City.d.ts +8 -8
- package/dist/entities/City.js +13 -10
- package/dist/entities/CodeRedemptionHistoryCompany.d.ts +2 -2
- package/dist/entities/CodeRedemptionHistoryCompany.js +19 -9
- package/dist/entities/CodeRedemptionHistoryUser.d.ts +2 -2
- package/dist/entities/CodeRedemptionHistoryUser.js +21 -11
- package/dist/entities/Company.js +14 -2
- package/dist/entities/Configuration.js +5 -4
- package/dist/entities/Country.d.ts +1 -1
- package/dist/entities/Country.js +15 -5
- package/dist/entities/Day.js +3 -0
- package/dist/entities/DiscountCodeCompany.js +11 -1
- package/dist/entities/DiscountCodeUser.js +17 -2
- package/dist/entities/Local.d.ts +1 -1
- package/dist/entities/Local.js +10 -3
- package/dist/entities/LocalPlan.js +9 -0
- package/dist/entities/LocalQualification.js +4 -1
- package/dist/entities/Master.js +25 -4
- package/dist/entities/MasterNotification.js +7 -0
- package/dist/entities/MasterPermission.js +11 -1
- package/dist/entities/MasterRole.js +12 -1
- package/dist/entities/Partner.js +28 -4
- package/dist/entities/PartnerNotification.js +7 -0
- package/dist/entities/PartnerPermission.d.ts +1 -1
- package/dist/entities/PartnerPermission.js +15 -2
- package/dist/entities/PartnerPermissionSection.js +14 -1
- package/dist/entities/PartnerPlatform.js +14 -1
- package/dist/entities/PartnerRole.js +12 -1
- package/dist/entities/PartnerSession.js +8 -0
- package/dist/entities/PaymentMethod.d.ts +2 -2
- package/dist/entities/PaymentMethod.js +10 -1
- package/dist/entities/Plan.d.ts +1 -1
- package/dist/entities/Plan.js +16 -3
- package/dist/entities/PosSystem.d.ts +2 -2
- package/dist/entities/PosSystem.js +16 -4
- package/dist/entities/Product.d.ts +2 -2
- package/dist/entities/Product.js +30 -6
- package/dist/entities/ProductDate.js +3 -2
- package/dist/entities/ProductGroup.d.ts +3 -3
- package/dist/entities/ProductGroup.js +24 -14
- package/dist/entities/ProductIngredient.d.ts +2 -2
- package/dist/entities/ProductIngredient.js +16 -13
- package/dist/entities/ProductSchedule.js +3 -2
- package/dist/entities/ProductTopping.js +4 -0
- package/dist/entities/Region.d.ts +2 -2
- package/dist/entities/Region.js +12 -8
- package/dist/entities/Request.d.ts +1 -1
- package/dist/entities/Request.js +14 -2
- package/dist/entities/RequestLocal.js +13 -1
- package/dist/entities/RequestLocalHistory.js +8 -1
- package/dist/entities/RequestLocalPayment.js +10 -0
- package/dist/entities/RequestProduct.d.ts +3 -3
- package/dist/entities/RequestProduct.js +19 -15
- package/dist/entities/RequestProductGroupComplement.d.ts +3 -3
- package/dist/entities/RequestProductGroupComplement.js +14 -13
- package/dist/entities/Square.d.ts +2 -2
- package/dist/entities/Square.js +38 -5
- package/dist/entities/ToppingImage.js +6 -0
- package/dist/entities/TypeMeasureIngredient.d.ts +1 -1
- package/dist/entities/TypeMeasureIngredient.js +11 -6
- package/dist/entities/User.d.ts +2 -2
- package/dist/entities/User.js +22 -5
- package/dist/entities/UserAddress.js +14 -1
- package/dist/entities/UserPaymentMethod.d.ts +1 -1
- package/dist/entities/UserPaymentMethod.js +13 -1
- package/dist/entities/VerifyLocal.d.ts +2 -2
- package/dist/entities/VerifyLocal.js +11 -0
- package/dist/entities/productGroupComplement.js +23 -3
- package/package.json +1 -1
- package/src/entities/AuthenticationCredential.ts +24 -15
- package/src/entities/Bank.ts +8 -6
- package/src/entities/BusinessType.ts +9 -2
- package/src/entities/BusinessTypeProduct.ts +2 -0
- package/src/entities/Category.ts +24 -8
- package/src/entities/CategoryDate.ts +3 -2
- package/src/entities/CategorySchedule.ts +3 -2
- package/src/entities/City.ts +31 -28
- package/src/entities/CodeRedemptionHistoryCompany.ts +28 -18
- package/src/entities/CodeRedemptionHistoryUser.ts +31 -21
- package/src/entities/Company.ts +14 -2
- package/src/entities/Configuration.ts +8 -7
- package/src/entities/Country.ts +15 -5
- package/src/entities/Day.ts +4 -1
- package/src/entities/DiscountCodeCompany.ts +11 -1
- package/src/entities/DiscountCodeUser.ts +17 -2
- package/src/entities/Local.ts +12 -11
- package/src/entities/LocalPlan.ts +9 -0
- package/src/entities/LocalQualification.ts +4 -1
- package/src/entities/Master.ts +25 -4
- package/src/entities/MasterNotification.ts +7 -0
- package/src/entities/MasterPermission.ts +11 -1
- package/src/entities/MasterRole.ts +12 -1
- package/src/entities/Partner.ts +28 -4
- package/src/entities/PartnerNotification.ts +7 -0
- package/src/entities/PartnerPermission.ts +15 -2
- package/src/entities/PartnerPermissionSection.ts +14 -1
- package/src/entities/PartnerPlatform.ts +14 -1
- package/src/entities/PartnerRole.ts +12 -1
- package/src/entities/PartnerSession.ts +9 -1
- package/src/entities/PaymentMethod.ts +11 -2
- package/src/entities/Plan.ts +17 -4
- package/src/entities/PosSystem.ts +16 -4
- package/src/entities/Product.ts +31 -7
- package/src/entities/ProductDate.ts +3 -3
- package/src/entities/ProductGroup.ts +40 -30
- package/src/entities/ProductIngredient.ts +27 -24
- package/src/entities/ProductSchedule.ts +3 -2
- package/src/entities/ProductTopping.ts +4 -0
- package/src/entities/Region.ts +22 -19
- package/src/entities/Request.ts +14 -2
- package/src/entities/RequestLocal.ts +13 -1
- package/src/entities/RequestLocalHistory.ts +8 -1
- package/src/entities/RequestLocalPayment.ts +10 -0
- package/src/entities/RequestProduct.ts +30 -26
- package/src/entities/RequestProductGroupComplement.ts +23 -22
- package/src/entities/Square.ts +39 -6
- package/src/entities/ToppingImage.ts +6 -0
- package/src/entities/TypeMeasureIngredient.ts +18 -18
- package/src/entities/User.ts +23 -6
- package/src/entities/UserAddress.ts +14 -1
- package/src/entities/UserPaymentMethod.ts +13 -1
- package/src/entities/VerifyLocal.ts +13 -2
- package/src/entities/productGroupComplement.ts +23 -3
|
@@ -14,29 +14,37 @@ import { DateTransformer } from "../transformers/dateTransformer";
|
|
|
14
14
|
name: "request_local",
|
|
15
15
|
})
|
|
16
16
|
export class RequestLocal {
|
|
17
|
-
@PrimaryGeneratedColumn(
|
|
17
|
+
@PrimaryGeneratedColumn({
|
|
18
|
+
type: "int",
|
|
19
|
+
comment: "Id único de cada registro.",
|
|
20
|
+
})
|
|
18
21
|
id: number;
|
|
19
22
|
|
|
20
23
|
@ManyToOne(() => Request, (request) => request.requests_local, {
|
|
21
24
|
onDelete: "CASCADE",
|
|
25
|
+
onUpdate: "NO ACTION",
|
|
22
26
|
})
|
|
23
27
|
@JoinColumn({ name: "request" })
|
|
24
28
|
request: Request;
|
|
25
29
|
|
|
26
30
|
@ManyToOne(() => Local, (local) => local.requests_local, {
|
|
27
31
|
onDelete: "CASCADE",
|
|
32
|
+
onUpdate: "NO ACTION",
|
|
28
33
|
})
|
|
29
34
|
@JoinColumn({ name: "local" })
|
|
30
35
|
local: Local;
|
|
31
36
|
|
|
32
37
|
@Column({
|
|
33
38
|
length: 20,
|
|
39
|
+
type: "varchar",
|
|
34
40
|
comment: "Costo total del pedido. ",
|
|
35
41
|
})
|
|
36
42
|
total_cost: string;
|
|
37
43
|
|
|
38
44
|
@Column({
|
|
39
45
|
default: 1,
|
|
46
|
+
type: "int",
|
|
47
|
+
width: 1,
|
|
40
48
|
comment:
|
|
41
49
|
"Estado en el que se encuentra un pedido.\r\n0. En proceso: El usuario está agregando los productos del/los local/es.\r\n1. Creado: El usuario ya creó el pedido con los prductos en los/el local/es especificado/s.\r\n2. Cancelado: El usuario canceló el pedido, esto sólo se permite si aún no está pago el pedido.\r\n3. Rechazado: Si un local canceló el pedido por x circustancias. Cabe resaltar que si el pedido fue solicitado a más de un local, el estado 3 sólo se agregaría al pedido si todos los locales cancelaron (Se tiene un estado para cada local en la tabla request_local) -> Aún no se sabe si este estado va.\r\n4. Finalizado: El pedido fue entregado y también pagado. Si el pedido se realizó en varios locales, entonces sólo se pasará a Finalizado, cuando todos los locales a los que se le hizo el pedido están pagos y con los productos entregados.",
|
|
42
50
|
})
|
|
@@ -46,6 +54,7 @@ export class RequestLocal {
|
|
|
46
54
|
type: "varchar",
|
|
47
55
|
length: 4,
|
|
48
56
|
nullable: true,
|
|
57
|
+
default: null,
|
|
49
58
|
comment:
|
|
50
59
|
"Columna para saber cuánto tiempo máximo (minutos) nos tomará en preparar los productos y sus toppings.\r\n\r\nEsta columna viene también al momento de crear.",
|
|
51
60
|
})
|
|
@@ -54,6 +63,7 @@ export class RequestLocal {
|
|
|
54
63
|
@Column({
|
|
55
64
|
type: "datetime",
|
|
56
65
|
nullable: true,
|
|
66
|
+
default: null,
|
|
57
67
|
comment:
|
|
58
68
|
"Columna donde almacenamos la fecha de actualización del registro, este campo nos sirve para saber cuánto tiempo llevamos desde qué se actualizó hasta la hora actual.",
|
|
59
69
|
transformer: new DateTransformer(),
|
|
@@ -62,6 +72,8 @@ export class RequestLocal {
|
|
|
62
72
|
|
|
63
73
|
@Column({
|
|
64
74
|
default: 1,
|
|
75
|
+
type: "int",
|
|
76
|
+
width: 1,
|
|
65
77
|
comment:
|
|
66
78
|
"Columna para saber sí se notificó vía mensaje desde la página web - aplicación de escritorio o/y correo electrónico:\r\n1. No notificado.\r\n2. Notificado.",
|
|
67
79
|
})
|
|
@@ -14,7 +14,10 @@ import { DateTransformer } from "../transformers/dateTransformer";
|
|
|
14
14
|
name: "request_local_history",
|
|
15
15
|
})
|
|
16
16
|
export class RequestLocalHistory {
|
|
17
|
-
@PrimaryGeneratedColumn(
|
|
17
|
+
@PrimaryGeneratedColumn({
|
|
18
|
+
type: "int",
|
|
19
|
+
comment: "ID único de cada registro.",
|
|
20
|
+
})
|
|
18
21
|
id: number;
|
|
19
22
|
|
|
20
23
|
@ManyToOne(
|
|
@@ -29,13 +32,17 @@ export class RequestLocalHistory {
|
|
|
29
32
|
request_local: RequestLocal;
|
|
30
33
|
|
|
31
34
|
@Column({
|
|
35
|
+
type: "int",
|
|
36
|
+
width: 1,
|
|
32
37
|
comment: "Estado en el que se encuentra el registro.",
|
|
33
38
|
})
|
|
34
39
|
status: number;
|
|
35
40
|
|
|
36
41
|
@Column({
|
|
37
42
|
length: 600,
|
|
43
|
+
type: "varchar",
|
|
38
44
|
nullable: true,
|
|
45
|
+
default: null,
|
|
39
46
|
comment: "Comentarios del cambio de estado del registro.",
|
|
40
47
|
})
|
|
41
48
|
comment: string | null;
|
|
@@ -21,12 +21,14 @@ import { DateTransformer } from "../transformers/dateTransformer";
|
|
|
21
21
|
})
|
|
22
22
|
export class RequestLocalPayment {
|
|
23
23
|
@PrimaryGeneratedColumn({
|
|
24
|
+
type: "int",
|
|
24
25
|
comment: "ID único de cada registro.",
|
|
25
26
|
})
|
|
26
27
|
id: number;
|
|
27
28
|
|
|
28
29
|
@Column({
|
|
29
30
|
length: 40,
|
|
31
|
+
type: "varchar",
|
|
30
32
|
unique: true,
|
|
31
33
|
comment: "Código único de cada pago que se realiza.",
|
|
32
34
|
})
|
|
@@ -75,16 +77,20 @@ export class RequestLocalPayment {
|
|
|
75
77
|
remaining_amount: number;
|
|
76
78
|
|
|
77
79
|
@Column({
|
|
80
|
+
type: "varchar",
|
|
78
81
|
length: 4,
|
|
79
82
|
nullable: true,
|
|
83
|
+
default: null,
|
|
80
84
|
comment:
|
|
81
85
|
"Si se paga con tarjeta, entonces se almacenan los últimos 4 dígitos de la tarjeta de crédito/débito con el que se paga.",
|
|
82
86
|
})
|
|
83
87
|
card_last_four_digits: string | null;
|
|
84
88
|
|
|
85
89
|
@Column({
|
|
90
|
+
type: "varchar",
|
|
86
91
|
length: 50,
|
|
87
92
|
nullable: true,
|
|
93
|
+
default: null,
|
|
88
94
|
comment:
|
|
89
95
|
"Si se paga con tarjeta, entonces se guarda el tipo de tarjeta con la que se paga.",
|
|
90
96
|
})
|
|
@@ -99,13 +105,16 @@ export class RequestLocalPayment {
|
|
|
99
105
|
card: UserPaymentMethod | null;
|
|
100
106
|
|
|
101
107
|
@Column({
|
|
108
|
+
type: "varchar",
|
|
102
109
|
length: 255,
|
|
103
110
|
nullable: true,
|
|
111
|
+
default: null,
|
|
104
112
|
comment: "Comentarios del pago, si aplica.",
|
|
105
113
|
})
|
|
106
114
|
comments: string | null;
|
|
107
115
|
|
|
108
116
|
@Column({
|
|
117
|
+
type: "int",
|
|
109
118
|
length: 1,
|
|
110
119
|
comment:
|
|
111
120
|
"Estado del pago:\r\n1. Aprobado.\r\n2. Rechazado.\r\n3. Pendiente.",
|
|
@@ -123,6 +132,7 @@ export class RequestLocalPayment {
|
|
|
123
132
|
@Column({
|
|
124
133
|
type: "datetime",
|
|
125
134
|
nullable: true,
|
|
135
|
+
default: null,
|
|
126
136
|
transformer: new DateTransformer(),
|
|
127
137
|
comment: "Fecha de actualización del registro.",
|
|
128
138
|
})
|
|
@@ -3,48 +3,52 @@ import {
|
|
|
3
3
|
Entity,
|
|
4
4
|
JoinColumn,
|
|
5
5
|
ManyToOne,
|
|
6
|
-
PrimaryGeneratedColumn
|
|
7
|
-
} from
|
|
8
|
-
import { Product } from
|
|
9
|
-
import { Request } from
|
|
10
|
-
import { User } from
|
|
6
|
+
PrimaryGeneratedColumn,
|
|
7
|
+
} from "typeorm";
|
|
8
|
+
import { Product } from "./Product";
|
|
9
|
+
import { Request } from "./Request";
|
|
10
|
+
import { User } from "./User";
|
|
11
11
|
|
|
12
|
-
@Entity(
|
|
13
|
-
comment:
|
|
12
|
+
@Entity("request_product", {
|
|
13
|
+
comment: "Productos que están en el pedido.",
|
|
14
14
|
})
|
|
15
15
|
export class RequestProduct {
|
|
16
16
|
@PrimaryGeneratedColumn({
|
|
17
|
-
|
|
17
|
+
type: "int",
|
|
18
|
+
comment: "Número de identificación (ID) único de cada registro.",
|
|
18
19
|
})
|
|
19
|
-
id: number
|
|
20
|
+
id: number;
|
|
20
21
|
|
|
21
22
|
@ManyToOne(() => Request, (request) => request.request_products, {
|
|
22
|
-
onDelete:
|
|
23
|
-
onUpdate:
|
|
23
|
+
onDelete: "CASCADE",
|
|
24
|
+
onUpdate: "NO ACTION",
|
|
24
25
|
})
|
|
25
|
-
@JoinColumn({ name:
|
|
26
|
-
request: Request
|
|
26
|
+
@JoinColumn({ name: "request" })
|
|
27
|
+
request: Request;
|
|
27
28
|
|
|
28
29
|
@ManyToOne(() => Product, (product) => product.request_products, {
|
|
29
|
-
onDelete:
|
|
30
|
-
onUpdate:
|
|
30
|
+
onDelete: "CASCADE",
|
|
31
|
+
onUpdate: "NO ACTION",
|
|
31
32
|
})
|
|
32
|
-
@JoinColumn({ name:
|
|
33
|
-
product: Product
|
|
33
|
+
@JoinColumn({ name: "product" })
|
|
34
|
+
product: Product;
|
|
34
35
|
|
|
35
36
|
@ManyToOne(() => User, (user) => user.request_products, {
|
|
36
|
-
onDelete:
|
|
37
|
-
onUpdate:
|
|
37
|
+
onDelete: "CASCADE",
|
|
38
|
+
onUpdate: "NO ACTION",
|
|
38
39
|
})
|
|
39
|
-
@JoinColumn({ name:
|
|
40
|
-
user: User
|
|
40
|
+
@JoinColumn({ name: "user" })
|
|
41
|
+
user: User;
|
|
41
42
|
|
|
42
|
-
@Column({ comment:
|
|
43
|
-
quantity: number
|
|
43
|
+
@Column({ type: "int", comment: "Cantidad del producto (product)." })
|
|
44
|
+
quantity: number;
|
|
44
45
|
|
|
45
46
|
@Column({
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
type: "varchar",
|
|
48
|
+
length: 500,
|
|
49
|
+
nullable: true,
|
|
50
|
+
default: null,
|
|
51
|
+
comment: "Comentarios del producto, si hay alguna sugerencia o solicitud.",
|
|
48
52
|
})
|
|
49
|
-
comments: string
|
|
53
|
+
comments: string;
|
|
50
54
|
}
|
|
@@ -4,51 +4,52 @@ import {
|
|
|
4
4
|
JoinColumn,
|
|
5
5
|
ManyToOne,
|
|
6
6
|
PrimaryGeneratedColumn,
|
|
7
|
-
} from
|
|
8
|
-
import { Request } from
|
|
9
|
-
import { User } from
|
|
10
|
-
import { ProductGroupComplement } from
|
|
7
|
+
} from "typeorm";
|
|
8
|
+
import { Request } from "./Request";
|
|
9
|
+
import { User } from "./User";
|
|
10
|
+
import { ProductGroupComplement } from "./productGroupComplement";
|
|
11
11
|
|
|
12
|
-
@Entity(
|
|
12
|
+
@Entity("request_product_group_complement", {
|
|
13
13
|
comment:
|
|
14
|
-
|
|
14
|
+
"Complementos (toppings) que el usuario va a poder agregar por cada producto.",
|
|
15
15
|
})
|
|
16
16
|
export class RequestProductGroupComplement {
|
|
17
17
|
@PrimaryGeneratedColumn({
|
|
18
|
-
|
|
18
|
+
type: "int",
|
|
19
|
+
comment: "Número de identificación (ID) único de cada registro.",
|
|
19
20
|
})
|
|
20
|
-
id: number
|
|
21
|
+
id: number;
|
|
21
22
|
|
|
22
23
|
@ManyToOne(
|
|
23
24
|
() => Request,
|
|
24
25
|
(request) => request.request_product_group_complements,
|
|
25
26
|
{
|
|
26
|
-
onDelete:
|
|
27
|
-
onUpdate:
|
|
27
|
+
onDelete: "CASCADE",
|
|
28
|
+
onUpdate: "NO ACTION",
|
|
28
29
|
}
|
|
29
30
|
)
|
|
30
|
-
@JoinColumn({ name:
|
|
31
|
-
request: Request
|
|
31
|
+
@JoinColumn({ name: "request" })
|
|
32
|
+
request: Request;
|
|
32
33
|
|
|
33
34
|
@ManyToOne(
|
|
34
35
|
() => ProductGroupComplement,
|
|
35
36
|
(productGroupComplement) =>
|
|
36
37
|
productGroupComplement.request_product_group_complements,
|
|
37
38
|
{
|
|
38
|
-
onDelete:
|
|
39
|
-
onUpdate:
|
|
39
|
+
onDelete: "CASCADE",
|
|
40
|
+
onUpdate: "NO ACTION",
|
|
40
41
|
}
|
|
41
42
|
)
|
|
42
|
-
@JoinColumn({ name:
|
|
43
|
-
product_group_complement: ProductGroupComplement
|
|
43
|
+
@JoinColumn({ name: "product_group_complement" })
|
|
44
|
+
product_group_complement: ProductGroupComplement;
|
|
44
45
|
|
|
45
46
|
@ManyToOne(() => User, (user) => user.request_product_group_complements, {
|
|
46
|
-
onDelete:
|
|
47
|
-
onUpdate:
|
|
47
|
+
onDelete: "CASCADE",
|
|
48
|
+
onUpdate: "NO ACTION",
|
|
48
49
|
})
|
|
49
|
-
@JoinColumn({ name:
|
|
50
|
-
user: User
|
|
50
|
+
@JoinColumn({ name: "user" })
|
|
51
|
+
user: User;
|
|
51
52
|
|
|
52
|
-
@Column({ comment:
|
|
53
|
-
quantity: number
|
|
53
|
+
@Column({ type: "int", comment: "Cantidad de cada complemento." })
|
|
54
|
+
quantity: number;
|
|
54
55
|
}
|
package/src/entities/Square.ts
CHANGED
|
@@ -8,9 +8,10 @@ import {
|
|
|
8
8
|
OneToMany,
|
|
9
9
|
PrimaryColumn,
|
|
10
10
|
} from "typeorm";
|
|
11
|
+
import { City } from "./City";
|
|
11
12
|
import { Local } from "./Local";
|
|
12
13
|
import { User } from "./User";
|
|
13
|
-
import {
|
|
14
|
+
import { jsonTransformer } from "../transformers/jsonTransformer";
|
|
14
15
|
|
|
15
16
|
@Entity({
|
|
16
17
|
comment:
|
|
@@ -18,11 +19,16 @@ import { City } from "./City";
|
|
|
18
19
|
})
|
|
19
20
|
export class Square {
|
|
20
21
|
@PrimaryColumn({
|
|
22
|
+
type: "int",
|
|
21
23
|
comment: "Número de identificación (ID) único de cada registro.",
|
|
22
24
|
})
|
|
23
25
|
id: number;
|
|
24
26
|
|
|
25
|
-
@Column({
|
|
27
|
+
@Column({
|
|
28
|
+
length: 50,
|
|
29
|
+
type: "varchar",
|
|
30
|
+
comment: "Nombre del centro comercial/plazoleta.",
|
|
31
|
+
})
|
|
26
32
|
name: string;
|
|
27
33
|
|
|
28
34
|
@ManyToOne(() => City, (city) => city.squares, {
|
|
@@ -32,44 +38,71 @@ export class Square {
|
|
|
32
38
|
@JoinColumn({ name: "city" })
|
|
33
39
|
city: City;
|
|
34
40
|
|
|
35
|
-
@Column({
|
|
41
|
+
@Column({
|
|
42
|
+
length: 100,
|
|
43
|
+
type: "varchar",
|
|
44
|
+
comment: "Dirección del centro comercial/plazoleta.",
|
|
45
|
+
})
|
|
36
46
|
address: string;
|
|
37
47
|
|
|
38
|
-
@Column({
|
|
48
|
+
@Column({
|
|
49
|
+
type: "decimal",
|
|
50
|
+
precision: 10,
|
|
51
|
+
scale: 8,
|
|
52
|
+
nullable: true,
|
|
53
|
+
default: null,
|
|
54
|
+
comment: "Latitud de la plazoleta.",
|
|
55
|
+
})
|
|
39
56
|
latitude: number;
|
|
40
57
|
|
|
41
|
-
@Column({
|
|
58
|
+
@Column({
|
|
59
|
+
type: "decimal",
|
|
60
|
+
precision: 10,
|
|
61
|
+
scale: 8,
|
|
62
|
+
nullable: true,
|
|
63
|
+
default: null,
|
|
64
|
+
comment: "Longitud de la plazoleta.",
|
|
65
|
+
})
|
|
42
66
|
longitude: number;
|
|
43
67
|
|
|
44
68
|
@Column({
|
|
45
69
|
type: "mediumtext",
|
|
46
70
|
nullable: true,
|
|
71
|
+
default: null,
|
|
72
|
+
transformer: jsonTransformer,
|
|
47
73
|
comment:
|
|
48
74
|
"Campo de tipo JSON por si se llega a necesitar agregar otras columnas para las plazoletas de los centros comerciales.",
|
|
49
75
|
})
|
|
50
|
-
details:
|
|
76
|
+
details: any | null;
|
|
51
77
|
|
|
52
78
|
@Column({
|
|
79
|
+
type: "int",
|
|
53
80
|
comment:
|
|
54
81
|
"Cantidad máxima de locales para ese del centro comercial/plazoleta.",
|
|
55
82
|
})
|
|
56
83
|
maximum_number_locals: number;
|
|
57
84
|
|
|
58
85
|
@Column({
|
|
86
|
+
type: "varchar",
|
|
59
87
|
length: 50,
|
|
60
88
|
nullable: true,
|
|
89
|
+
default: null,
|
|
61
90
|
comment: "Correo electrónico del centro comercial/plazoleta.",
|
|
62
91
|
})
|
|
63
92
|
email: string | null;
|
|
64
93
|
|
|
65
94
|
@Column({
|
|
95
|
+
type: "varchar",
|
|
66
96
|
length: 15,
|
|
67
97
|
nullable: true,
|
|
98
|
+
default: null,
|
|
68
99
|
comment: "Número de celular del centro comercial/plazoleta.",
|
|
69
100
|
})
|
|
70
101
|
phone: string | null;
|
|
71
102
|
|
|
72
103
|
@Column({
|
|
104
|
+
type: "int",
|
|
105
|
+
width: 1,
|
|
73
106
|
default: 1,
|
|
74
107
|
comment: "Si la plazoleta está o no activa:\r\n1. Activa.\r\n0. Inactiva.",
|
|
75
108
|
})
|
|
@@ -9,19 +9,23 @@ import { jsonTransformer } from "../transformers/jsonTransformer";
|
|
|
9
9
|
})
|
|
10
10
|
export class ToppingImage {
|
|
11
11
|
@PrimaryGeneratedColumn({
|
|
12
|
+
type: "int",
|
|
12
13
|
comment: "ID único del registro.",
|
|
13
14
|
})
|
|
14
15
|
id: number;
|
|
15
16
|
|
|
16
17
|
@Column({
|
|
17
18
|
length: 100,
|
|
19
|
+
type: "varchar",
|
|
18
20
|
comment: "Nombre del registro.",
|
|
19
21
|
})
|
|
20
22
|
name: string;
|
|
21
23
|
|
|
22
24
|
@Column({
|
|
23
25
|
length: 500,
|
|
26
|
+
type: "varchar",
|
|
24
27
|
nullable: true,
|
|
28
|
+
default: null,
|
|
25
29
|
comment: "Nombres para los filtros de búsqueda de las imágenes.",
|
|
26
30
|
})
|
|
27
31
|
filter: string | null;
|
|
@@ -34,6 +38,8 @@ export class ToppingImage {
|
|
|
34
38
|
image: any;
|
|
35
39
|
|
|
36
40
|
@Column({
|
|
41
|
+
type: "int",
|
|
42
|
+
width: 1,
|
|
37
43
|
default: 1,
|
|
38
44
|
comment: "Estado de la imagen:\r\n1. Activo.\r\n0. Inactivo.",
|
|
39
45
|
})
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
Entity,
|
|
4
|
-
OneToMany,
|
|
5
|
-
PrimaryGeneratedColumn
|
|
6
|
-
} from 'typeorm'
|
|
7
|
-
import { ProductIngredient } from './ProductIngredient'
|
|
1
|
+
import { Column, Entity, OneToMany, PrimaryGeneratedColumn } from "typeorm";
|
|
2
|
+
import { ProductIngredient } from "./ProductIngredient";
|
|
8
3
|
|
|
9
|
-
@Entity(
|
|
4
|
+
@Entity("type_measure_ingredient", {
|
|
10
5
|
comment:
|
|
11
|
-
|
|
6
|
+
"Unidades de medida que el cliente va a poder agregar para medir en los ingredientes que va a tener cada producto.",
|
|
12
7
|
})
|
|
13
8
|
export class TypeMeasureIngredient {
|
|
14
9
|
@PrimaryGeneratedColumn({
|
|
15
|
-
|
|
10
|
+
type: "int",
|
|
11
|
+
comment: "Número de identificación (ID) único de cada registro.",
|
|
16
12
|
})
|
|
17
|
-
id: number
|
|
13
|
+
id: number;
|
|
18
14
|
|
|
19
15
|
@Column({
|
|
20
16
|
length: 50,
|
|
17
|
+
type: "varchar",
|
|
21
18
|
comment:
|
|
22
|
-
|
|
19
|
+
"Nombre que va a tener la medida, este elemento tiene qué ir con el id/key de los lenguajes. Ver la carpeta locales en el proyecto frontend para ver el id que corresponde a la descripción.",
|
|
23
20
|
})
|
|
24
|
-
name: string
|
|
21
|
+
name: string;
|
|
25
22
|
|
|
26
23
|
@Column({
|
|
27
24
|
length: 50,
|
|
25
|
+
type: "varchar",
|
|
28
26
|
comment:
|
|
29
|
-
|
|
27
|
+
"Descripción que va a tener la medida, este elemento tiene qué ir con el id/key de los lenguajes.\r\n\r\nVer la carpeta locales en el proyecto frontend para ver el id que corresponde a la descripción.",
|
|
30
28
|
})
|
|
31
|
-
description: string
|
|
29
|
+
description: string;
|
|
32
30
|
|
|
33
31
|
@Column({
|
|
32
|
+
type: "int",
|
|
33
|
+
width: 1,
|
|
34
34
|
default: 1,
|
|
35
35
|
comment:
|
|
36
|
-
|
|
36
|
+
"Estado que del item tipo de medida del ingrediente.\r\n1. Activo.\r\n0. Inactivo.",
|
|
37
37
|
})
|
|
38
|
-
status: number
|
|
38
|
+
status: number;
|
|
39
39
|
|
|
40
40
|
@OneToMany(
|
|
41
41
|
() => ProductIngredient,
|
|
42
42
|
(productIngredient) => productIngredient.type_measure_ingredient
|
|
43
43
|
)
|
|
44
|
-
type_measure_ingredients: ProductIngredient[]
|
|
44
|
+
type_measure_ingredients: ProductIngredient[];
|
|
45
45
|
}
|
package/src/entities/User.ts
CHANGED
|
@@ -8,6 +8,8 @@ import {
|
|
|
8
8
|
OneToMany,
|
|
9
9
|
PrimaryGeneratedColumn,
|
|
10
10
|
} from "typeorm";
|
|
11
|
+
import { RequestLocalPayment, UserPaymentMethod } from "..";
|
|
12
|
+
import { DateTransformer } from "../transformers/dateTransformer";
|
|
11
13
|
import { City } from "./City";
|
|
12
14
|
import { CodeRedemptionHistoryUser } from "./CodeRedemptionHistoryUser";
|
|
13
15
|
import { Local } from "./Local";
|
|
@@ -18,35 +20,42 @@ import { RequestProduct } from "./RequestProduct";
|
|
|
18
20
|
import { RequestProductGroupComplement } from "./RequestProductGroupComplement";
|
|
19
21
|
import { Square } from "./Square";
|
|
20
22
|
import { UserAddress } from "./UserAddress";
|
|
21
|
-
import {
|
|
22
|
-
import { DateTransformer } from "../transformers/dateTransformer";
|
|
23
|
+
import { jsonTransformer } from "../transformers/jsonTransformer";
|
|
23
24
|
|
|
24
25
|
@Entity({ comment: "Usuarios registrados en la plataforma." })
|
|
25
26
|
export class User {
|
|
26
27
|
@PrimaryGeneratedColumn({
|
|
28
|
+
type: "int",
|
|
27
29
|
comment: "Número de identificación (ID) único de cada registro.",
|
|
28
30
|
})
|
|
29
31
|
id: number;
|
|
30
32
|
|
|
31
|
-
@Column({
|
|
33
|
+
@Column({
|
|
34
|
+
length: 30,
|
|
35
|
+
type: "varchar",
|
|
36
|
+
unique: true,
|
|
37
|
+
comment: "Código único del usuario.",
|
|
38
|
+
})
|
|
32
39
|
code: string;
|
|
33
40
|
|
|
34
41
|
@Column({
|
|
35
42
|
length: 14,
|
|
36
43
|
unique: true,
|
|
44
|
+
type: "varchar",
|
|
37
45
|
comment: "Número de documento del usuario.",
|
|
38
46
|
})
|
|
39
47
|
document: string;
|
|
40
48
|
|
|
41
|
-
@Column({ length: 50, comment: "Nombre del usuario." })
|
|
49
|
+
@Column({ length: 50, type: "varchar", comment: "Nombre del usuario." })
|
|
42
50
|
name: string;
|
|
43
51
|
|
|
44
|
-
@Column({ length: 50, comment: "Apellidos del usuario." })
|
|
52
|
+
@Column({ length: 50, type: "varchar", comment: "Apellidos del usuario." })
|
|
45
53
|
surname: string;
|
|
46
54
|
|
|
47
55
|
@Column({
|
|
48
56
|
length: 60,
|
|
49
57
|
unique: true,
|
|
58
|
+
type: "varchar",
|
|
50
59
|
comment: "Correo electrónico del usuario.",
|
|
51
60
|
})
|
|
52
61
|
email: string;
|
|
@@ -54,6 +63,7 @@ export class User {
|
|
|
54
63
|
@Column({
|
|
55
64
|
length: 12,
|
|
56
65
|
unique: true,
|
|
66
|
+
type: "varchar",
|
|
57
67
|
comment: "Número de celular del usuario.",
|
|
58
68
|
})
|
|
59
69
|
phone: string;
|
|
@@ -67,6 +77,7 @@ export class User {
|
|
|
67
77
|
|
|
68
78
|
@Column({
|
|
69
79
|
length: 255,
|
|
80
|
+
type: "varchar",
|
|
70
81
|
comment: "Contraseña almacenada tipo SHA256 del usuario.",
|
|
71
82
|
})
|
|
72
83
|
password: string;
|
|
@@ -74,10 +85,12 @@ export class User {
|
|
|
74
85
|
@Column({
|
|
75
86
|
type: "longtext",
|
|
76
87
|
nullable: true,
|
|
88
|
+
default: null,
|
|
89
|
+
transformer: jsonTransformer,
|
|
77
90
|
comment:
|
|
78
91
|
"Campo de tipo JSON donde se guarda información necesaria para el registro.",
|
|
79
92
|
})
|
|
80
|
-
profile:
|
|
93
|
+
profile: any | null;
|
|
81
94
|
|
|
82
95
|
@Column({
|
|
83
96
|
type: "datetime",
|
|
@@ -94,6 +107,8 @@ export class User {
|
|
|
94
107
|
updated: Date;
|
|
95
108
|
|
|
96
109
|
@Column({
|
|
110
|
+
type: "int",
|
|
111
|
+
width: 1,
|
|
97
112
|
default: 1,
|
|
98
113
|
comment:
|
|
99
114
|
"¿El usuario tiene acceso a la plataforma?:\r\n1. Activo: El usuario tiene acceso.\r\n0. Inactivo: El usuario no tiene acceso a la plataforma.",
|
|
@@ -101,6 +116,8 @@ export class User {
|
|
|
101
116
|
status: number;
|
|
102
117
|
|
|
103
118
|
@Column({
|
|
119
|
+
type: "int",
|
|
120
|
+
width: 1,
|
|
104
121
|
default: 1,
|
|
105
122
|
comment: "Es el estado para verificar si se envia en la papelara o no.",
|
|
106
123
|
})
|
|
@@ -16,6 +16,7 @@ import { User } from "./User";
|
|
|
16
16
|
})
|
|
17
17
|
export class UserAddress {
|
|
18
18
|
@PrimaryGeneratedColumn({
|
|
19
|
+
type: "int",
|
|
19
20
|
comment: "Número de identificación (ID) único de cada registro.",
|
|
20
21
|
})
|
|
21
22
|
id: number;
|
|
@@ -34,7 +35,7 @@ export class UserAddress {
|
|
|
34
35
|
@JoinColumn({ name: "city" })
|
|
35
36
|
city: City;
|
|
36
37
|
|
|
37
|
-
@Column({ length: 120, comment: "Dirección." })
|
|
38
|
+
@Column({ length: 120, type: "varchar", comment: "Dirección." })
|
|
38
39
|
address: string;
|
|
39
40
|
|
|
40
41
|
@Column({
|
|
@@ -54,8 +55,10 @@ export class UserAddress {
|
|
|
54
55
|
longitude: number;
|
|
55
56
|
|
|
56
57
|
@Column({
|
|
58
|
+
type: "varchar",
|
|
57
59
|
length: 400,
|
|
58
60
|
nullable: true,
|
|
61
|
+
default: null,
|
|
59
62
|
comment:
|
|
60
63
|
"Detalles de la dirección, si es una casa, un conjunto, el apartamento.",
|
|
61
64
|
})
|
|
@@ -63,12 +66,15 @@ export class UserAddress {
|
|
|
63
66
|
|
|
64
67
|
@Column({
|
|
65
68
|
length: 20,
|
|
69
|
+
type: "varchar",
|
|
66
70
|
comment:
|
|
67
71
|
"Tipo de ubicación:\r\n1. Casa.\r\n2. Oficina.\r\n3. Pareja.\r\n4. Otro.\r\n\r\nEsto me agrega un campo de tipo texto con el tag.",
|
|
68
72
|
})
|
|
69
73
|
tag: string;
|
|
70
74
|
|
|
71
75
|
@Column({
|
|
76
|
+
type: "int",
|
|
77
|
+
width: 1,
|
|
72
78
|
comment:
|
|
73
79
|
"Campo que me dice si:\r\n1. Personal: Lo recibo yo.\r\n2. Portería: Lo recibe la portería.",
|
|
74
80
|
})
|
|
@@ -76,6 +82,9 @@ export class UserAddress {
|
|
|
76
82
|
|
|
77
83
|
@Column({
|
|
78
84
|
length: 400,
|
|
85
|
+
type: "varchar",
|
|
86
|
+
nullable: true,
|
|
87
|
+
default: null,
|
|
79
88
|
comment:
|
|
80
89
|
"Campo para agregar una descripción más detallada de cómo llegar, o donde es la ubicación.",
|
|
81
90
|
})
|
|
@@ -85,6 +94,8 @@ export class UserAddress {
|
|
|
85
94
|
comment:
|
|
86
95
|
"Columna para saber el el registro se eliminó o no:\r\n0. No eliminado.\r\n1. Eliminado.",
|
|
87
96
|
default: 0,
|
|
97
|
+
type: "int",
|
|
98
|
+
width: 1,
|
|
88
99
|
})
|
|
89
100
|
selected: number;
|
|
90
101
|
|
|
@@ -92,6 +103,8 @@ export class UserAddress {
|
|
|
92
103
|
comment:
|
|
93
104
|
"CColumna para saber sí la dirección está seleccionada por defecto:\r\n1. Por defecto.\r\n0. No está por defecto.",
|
|
94
105
|
default: 0,
|
|
106
|
+
type: "int",
|
|
107
|
+
width: 1,
|
|
95
108
|
})
|
|
96
109
|
deleted: number;
|
|
97
110
|
|