test-entity-library-asm 1.1.8 → 1.2.0
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/Category.d.ts +5 -3
- package/dist/entities/Category.js +38 -13
- package/dist/entities/CategorySchedule.d.ts +10 -0
- package/dist/entities/CategorySchedule.js +67 -0
- package/dist/entities/City.d.ts +3 -2
- package/dist/entities/City.js +35 -10
- package/dist/entities/CodeRedemptionHistoryCompany.d.ts +4 -3
- package/dist/entities/CodeRedemptionHistoryCompany.js +31 -10
- package/dist/entities/CodeRedemptionHistoryUser.js +13 -6
- package/dist/entities/Company.d.ts +2 -1
- package/dist/entities/Company.js +64 -26
- package/dist/entities/Configuration.d.ts +2 -1
- package/dist/entities/Configuration.js +26 -4
- package/dist/entities/Country.d.ts +2 -1
- package/dist/entities/Country.js +33 -11
- package/dist/entities/Day.d.ts +2 -1
- package/dist/entities/Day.js +31 -6
- package/dist/entities/DiscountCodeCompany.d.ts +2 -1
- package/dist/entities/DiscountCodeCompany.js +42 -12
- package/dist/entities/DiscountCodeUser.js +24 -13
- package/dist/entities/Local.d.ts +14 -2
- package/dist/entities/Local.js +73 -13
- package/dist/entities/LocalQualification.d.ts +10 -0
- package/dist/entities/LocalQualification.js +76 -0
- package/dist/entities/Master.d.ts +2 -1
- package/dist/entities/Master.js +26 -4
- package/dist/entities/PaymentMethod.d.ts +13 -0
- package/dist/entities/PaymentMethod.js +102 -0
- package/dist/entities/Permission.d.ts +2 -1
- package/dist/entities/Permission.js +32 -8
- package/dist/entities/Plan.d.ts +2 -1
- package/dist/entities/Plan.js +38 -10
- package/dist/entities/Product.d.ts +8 -1
- package/dist/entities/Product.js +62 -12
- package/dist/entities/ProductGroup.js +16 -8
- package/dist/entities/ProductIngredient.d.ts +12 -0
- package/dist/entities/ProductIngredient.js +84 -0
- package/dist/entities/ProductTopping.d.ts +2 -1
- package/dist/entities/ProductTopping.js +33 -7
- package/dist/entities/Region.d.ts +3 -2
- package/dist/entities/Region.js +40 -10
- package/dist/entities/Request.d.ts +21 -0
- package/dist/entities/Request.js +137 -0
- package/dist/entities/RequestProduct.d.ts +12 -0
- package/dist/entities/RequestProduct.js +85 -0
- package/dist/entities/RequestProductGroupComplement.d.ts +11 -0
- package/dist/entities/RequestProductGroupComplement.js +80 -0
- package/dist/entities/RequestStatus.d.ts +11 -0
- package/dist/entities/RequestStatus.js +85 -0
- package/dist/entities/Role.js +11 -4
- package/dist/entities/RoleVisibleTo.d.ts +2 -1
- package/dist/entities/RoleVisibleTo.js +30 -5
- package/dist/entities/Square.d.ts +13 -0
- package/dist/entities/Square.js +97 -0
- package/dist/entities/Terminal.d.ts +2 -0
- package/dist/entities/Terminal.js +21 -4
- package/dist/entities/TerminalSession.d.ts +3 -2
- package/dist/entities/TerminalSession.js +41 -8
- package/dist/entities/TypeFood.d.ts +2 -1
- package/dist/entities/TypeFood.js +41 -6
- package/dist/entities/TypeMeasureIngredient.d.ts +9 -0
- package/dist/entities/TypeMeasureIngredient.js +73 -0
- package/dist/entities/User.d.ts +17 -7
- package/dist/entities/User.js +104 -25
- package/dist/entities/productGroupComplement.d.ts +4 -1
- package/dist/entities/productGroupComplement.js +35 -8
- package/package.json +1 -1
- package/src/entities/Category.ts +33 -15
- package/src/entities/CategorySchedule.ts +35 -0
- package/src/entities/City.ts +18 -8
- package/src/entities/CodeRedemptionHistoryCompany.ts +17 -9
- package/src/entities/CodeRedemptionHistoryUser.ts +15 -6
- package/src/entities/Company.ts +51 -25
- package/src/entities/Configuration.ts +10 -4
- package/src/entities/Country.ts +23 -11
- package/src/entities/Day.ts +16 -6
- package/src/entities/DiscountCodeCompany.ts +26 -11
- package/src/entities/DiscountCodeUser.ts +25 -12
- package/src/entities/Local.ts +54 -12
- package/src/entities/LocalQualification.ts +45 -0
- package/src/entities/Master.ts +17 -4
- package/src/entities/PaymentMethod.ts +72 -0
- package/src/entities/Permission.ts +16 -7
- package/src/entities/Plan.ts +22 -9
- package/src/entities/Product.ts +47 -11
- package/src/entities/ProductGroup.ts +18 -8
- package/src/entities/ProductIngredient.ts +55 -0
- package/src/entities/ProductTopping.ts +17 -6
- package/src/entities/Region.ts +24 -8
- package/src/entities/Request.ts +107 -0
- package/src/entities/RequestProduct.ts +51 -0
- package/src/entities/RequestProductGroupComplement.ts +55 -0
- package/src/entities/RequestStatus.ts +55 -0
- package/src/entities/Role.ts +12 -4
- package/src/entities/RoleVisibleTo.ts +13 -4
- package/src/entities/Square.ts +56 -0
- package/src/entities/Terminal.ts +24 -4
- package/src/entities/TerminalSession.ts +28 -10
- package/src/entities/TypeFood.ts +26 -5
- package/src/entities/TypeMeasureIngredient.ts +46 -0
- package/src/entities/User.ts +93 -28
- package/src/entities/productGroupComplement.ts +23 -7
- package/src/entities/ScheduleCategory.ts +0 -32
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
+
};
|
|
23
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
+
};
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.RequestStatus = void 0;
|
|
28
|
+
var typeorm_1 = require("typeorm");
|
|
29
|
+
var Request_1 = require("./Request");
|
|
30
|
+
var RequestStatus = /** @class */ (function (_super) {
|
|
31
|
+
__extends(RequestStatus, _super);
|
|
32
|
+
function RequestStatus() {
|
|
33
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
34
|
+
}
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
37
|
+
comment: 'Número de identificación (ID) único de cada registro.',
|
|
38
|
+
}),
|
|
39
|
+
__metadata("design:type", Number)
|
|
40
|
+
], RequestStatus.prototype, "id", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)({
|
|
43
|
+
comment: 'Los tipos de elemento, esto se hace para validaciones por parte del código:\r\n0, 1, 2, 3, 4, 5, 6, 7....',
|
|
44
|
+
}),
|
|
45
|
+
__metadata("design:type", Number)
|
|
46
|
+
], RequestStatus.prototype, "code", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typeorm_1.Column)({
|
|
49
|
+
length: 50,
|
|
50
|
+
comment: 'Nombre del estado, este campo debe tener el id/key de cada lenguaje.\r\n\r\nVer la carpeta ``locales`` del proyecto frontend para ver el id de cada tipo de elemento.',
|
|
51
|
+
}),
|
|
52
|
+
__metadata("design:type", String)
|
|
53
|
+
], RequestStatus.prototype, "name", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typeorm_1.Column)({
|
|
56
|
+
length: 50,
|
|
57
|
+
comment: 'Descripción del estado, este campo debe tener el id/key de cada lenguaje.\r\n\r\nVer la carpeta ``locales`` del proyecto frontend para ver el id de cada tipo de elemento.',
|
|
58
|
+
}),
|
|
59
|
+
__metadata("design:type", String)
|
|
60
|
+
], RequestStatus.prototype, "description", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, typeorm_1.Column)({
|
|
63
|
+
comment: 'Quién puede ver y asignar el estado en la orden:\r\n1. Usuario.\r\n2. Cliente (local).\r\n3. Todos.',
|
|
64
|
+
}),
|
|
65
|
+
__metadata("design:type", Number)
|
|
66
|
+
], RequestStatus.prototype, "visible_to", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, typeorm_1.Column)({
|
|
69
|
+
default: 1,
|
|
70
|
+
comment: 'Valida si el estado es visible para agregar al pedido:\r\n1. Activo.\r\n0. Inactivo.',
|
|
71
|
+
}),
|
|
72
|
+
__metadata("design:type", Number)
|
|
73
|
+
], RequestStatus.prototype, "status", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, typeorm_1.OneToMany)(function () { return Request_1.Request; }, function (request) { return request.status; }),
|
|
76
|
+
__metadata("design:type", Array)
|
|
77
|
+
], RequestStatus.prototype, "requests", void 0);
|
|
78
|
+
RequestStatus = __decorate([
|
|
79
|
+
(0, typeorm_1.Entity)('request_status', {
|
|
80
|
+
comment: 'Acá se podrán agregar los estados que puede tener un pedido, es decir:\r\n\r\n0. Por ordenar (0): Es cuando el usuario agrega los productos al carrito de compras pero aún no realiza la orden.\r\n\r\n1. En espera del cliente (local) cuando el pago ya fue realizado exitosamente (1): Indica que la orden ya fue recibida y está en proceso de verificación.\r\n\r\n2. En espera del usuario (2): Indica que el usuario realizó el pedido y desea cancelarlo en efectivo, en este caso, se genera un código QR/BARCODE donde se puede acercar a la caja del local y pagar el valor del pedido. Cuando el usuario paga se pasa a estado (1), acá el cliente (local/company) puede decir el tiempo de espera máxima para que el cliente se levante a realizar el pago, de lo contrario la orden se cancelará automáticamente.\r\n\r\n3. En proceso (3): Indica que la orden/pedido fue recibid@ y se está preparando.\r\n\r\n4. Listo para servir (4): Indica que la orden ya se preparó y se está a la espera del usuario para entregar.\r\n\r\n5. Entregado/servido (5): Indica que el usuario ya reclamó la orden.\r\n\r\n6. Cancelado (6): Cuando un pedido se marca como "cancelado", significa que la orden ha sido anulada o eliminada del sistema antes de ser procesada o entregada. Esto puede deberse a una solicitud del cliente para cancelar el pedido, a que el pedido no se pueda completar por algún motivo o a una decisión interna del negocio de no procesar el pedido.\r\n\r\n7. Devolución (7): El estado "devolución" se aplica a un pedido que ha sido entregado o completado, pero que por algún motivo el cliente ha devuelto total o parcialmente. Esto podría ser debido a que el producto estaba defectuoso, no era lo que esperaba o por cualquier otra razón por la que el cliente haya solicitado devolver parte o la totalidad del pedido.',
|
|
81
|
+
})
|
|
82
|
+
], RequestStatus);
|
|
83
|
+
return RequestStatus;
|
|
84
|
+
}(typeorm_1.BaseEntity));
|
|
85
|
+
exports.RequestStatus = RequestStatus;
|
package/dist/entities/Role.js
CHANGED
|
@@ -17,11 +17,13 @@ var Role = /** @class */ (function () {
|
|
|
17
17
|
function Role() {
|
|
18
18
|
}
|
|
19
19
|
__decorate([
|
|
20
|
-
(0, typeorm_1.PrimaryGeneratedColumn)(
|
|
20
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
21
|
+
comment: 'Número de identificación (ID) único de cada registro.',
|
|
22
|
+
}),
|
|
21
23
|
__metadata("design:type", Number)
|
|
22
24
|
], Role.prototype, "id", void 0);
|
|
23
25
|
__decorate([
|
|
24
|
-
(0, typeorm_1.Column)({ length: 10 }),
|
|
26
|
+
(0, typeorm_1.Column)({ length: 10, comment: 'Código único del rol.' }),
|
|
25
27
|
__metadata("design:type", String)
|
|
26
28
|
], Role.prototype, "code", void 0);
|
|
27
29
|
__decorate([
|
|
@@ -40,7 +42,10 @@ var Role = /** @class */ (function () {
|
|
|
40
42
|
__metadata("design:type", String)
|
|
41
43
|
], Role.prototype, "description", void 0);
|
|
42
44
|
__decorate([
|
|
43
|
-
(0, typeorm_1.Column)({
|
|
45
|
+
(0, typeorm_1.Column)({
|
|
46
|
+
default: 1,
|
|
47
|
+
comment: 'Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.',
|
|
48
|
+
}),
|
|
44
49
|
__metadata("design:type", Number)
|
|
45
50
|
], Role.prototype, "status", void 0);
|
|
46
51
|
__decorate([
|
|
@@ -67,7 +72,9 @@ var Role = /** @class */ (function () {
|
|
|
67
72
|
__metadata("design:type", Array)
|
|
68
73
|
], Role.prototype, "visiblesTo", void 0);
|
|
69
74
|
Role = __decorate([
|
|
70
|
-
(0, typeorm_1.Entity)(
|
|
75
|
+
(0, typeorm_1.Entity)({
|
|
76
|
+
comment: 'Roles que se le pueden agregar a un usuario en la plataforma.',
|
|
77
|
+
})
|
|
71
78
|
], Role);
|
|
72
79
|
return Role;
|
|
73
80
|
}());
|
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
2
17
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
18
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
19
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -12,20 +27,30 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
27
|
exports.RoleVisibleTo = void 0;
|
|
13
28
|
var typeorm_1 = require("typeorm");
|
|
14
29
|
var Role_1 = require("./Role");
|
|
15
|
-
var RoleVisibleTo = /** @class */ (function () {
|
|
30
|
+
var RoleVisibleTo = /** @class */ (function (_super) {
|
|
31
|
+
__extends(RoleVisibleTo, _super);
|
|
16
32
|
function RoleVisibleTo() {
|
|
33
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
17
34
|
}
|
|
18
35
|
__decorate([
|
|
19
|
-
(0, typeorm_1.PrimaryGeneratedColumn)(
|
|
36
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
37
|
+
comment: 'Número de identificación (ID) único de cada registro.',
|
|
38
|
+
}),
|
|
20
39
|
__metadata("design:type", Number)
|
|
21
40
|
], RoleVisibleTo.prototype, "id", void 0);
|
|
22
41
|
__decorate([
|
|
23
|
-
(0, typeorm_1.ManyToOne)(function () { return Role_1.Role; }, function (role) { return role.rolesVisibleTo; }
|
|
42
|
+
(0, typeorm_1.ManyToOne)(function () { return Role_1.Role; }, function (role) { return role.rolesVisibleTo; }, {
|
|
43
|
+
onDelete: 'CASCADE',
|
|
44
|
+
onUpdate: 'NO ACTION',
|
|
45
|
+
}),
|
|
24
46
|
(0, typeorm_1.JoinColumn)({ name: 'role' }),
|
|
25
47
|
__metadata("design:type", Role_1.Role)
|
|
26
48
|
], RoleVisibleTo.prototype, "role", void 0);
|
|
27
49
|
__decorate([
|
|
28
|
-
(0, typeorm_1.ManyToOne)(function () { return Role_1.Role; }, function (role) { return role.visiblesTo; }
|
|
50
|
+
(0, typeorm_1.ManyToOne)(function () { return Role_1.Role; }, function (role) { return role.visiblesTo; }, {
|
|
51
|
+
onDelete: 'CASCADE',
|
|
52
|
+
onUpdate: 'NO ACTION',
|
|
53
|
+
}),
|
|
29
54
|
(0, typeorm_1.JoinColumn)({ name: 'visible_to' }),
|
|
30
55
|
__metadata("design:type", Role_1.Role)
|
|
31
56
|
], RoleVisibleTo.prototype, "visible_to", void 0);
|
|
@@ -35,5 +60,5 @@ var RoleVisibleTo = /** @class */ (function () {
|
|
|
35
60
|
})
|
|
36
61
|
], RoleVisibleTo);
|
|
37
62
|
return RoleVisibleTo;
|
|
38
|
-
}());
|
|
63
|
+
}(typeorm_1.BaseEntity));
|
|
39
64
|
exports.RoleVisibleTo = RoleVisibleTo;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseEntity } from 'typeorm';
|
|
2
|
+
import { Local } from './Local';
|
|
3
|
+
export declare class Square extends BaseEntity {
|
|
4
|
+
id: number;
|
|
5
|
+
name: string;
|
|
6
|
+
address: string;
|
|
7
|
+
details: string;
|
|
8
|
+
maximum_number_locals: number;
|
|
9
|
+
email: string;
|
|
10
|
+
phone: string;
|
|
11
|
+
status: number;
|
|
12
|
+
locals: Local[];
|
|
13
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
+
};
|
|
23
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
+
};
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.Square = void 0;
|
|
28
|
+
var typeorm_1 = require("typeorm");
|
|
29
|
+
var Local_1 = require("./Local");
|
|
30
|
+
var Square = /** @class */ (function (_super) {
|
|
31
|
+
__extends(Square, _super);
|
|
32
|
+
function Square() {
|
|
33
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
34
|
+
}
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.PrimaryColumn)({
|
|
37
|
+
comment: 'Número de identificación (ID) único de cada registro.',
|
|
38
|
+
}),
|
|
39
|
+
__metadata("design:type", Number)
|
|
40
|
+
], Square.prototype, "id", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)({ length: 50, comment: 'Nombre del centro comercial/plazoleta.' }),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], Square.prototype, "name", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.Column)({ length: 100, comment: 'Dirección del centro comercial/plazoleta.' }),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], Square.prototype, "address", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.Column)({
|
|
51
|
+
type: 'mediumtext',
|
|
52
|
+
nullable: true,
|
|
53
|
+
comment: 'Campo de tipo JSON por si se llega a necesitar agregar otras columnas para las plazoletas de los centros comerciales.',
|
|
54
|
+
}),
|
|
55
|
+
__metadata("design:type", String)
|
|
56
|
+
], Square.prototype, "details", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typeorm_1.Column)({
|
|
59
|
+
comment: 'Cantidad máxima de locales para ese del centro comercial/plazoleta.',
|
|
60
|
+
}),
|
|
61
|
+
__metadata("design:type", Number)
|
|
62
|
+
], Square.prototype, "maximum_number_locals", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, typeorm_1.Column)({
|
|
65
|
+
length: 50,
|
|
66
|
+
nullable: true,
|
|
67
|
+
comment: 'Correo electrónico del centro comercial/plazoleta.',
|
|
68
|
+
}),
|
|
69
|
+
__metadata("design:type", String)
|
|
70
|
+
], Square.prototype, "email", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, typeorm_1.Column)({
|
|
73
|
+
length: 15,
|
|
74
|
+
nullable: true,
|
|
75
|
+
comment: 'Número de celular del centro comercial/plazoleta.',
|
|
76
|
+
}),
|
|
77
|
+
__metadata("design:type", String)
|
|
78
|
+
], Square.prototype, "phone", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, typeorm_1.Column)({
|
|
81
|
+
default: 1,
|
|
82
|
+
comment: 'Si la plazoleta está o no activa:\r\n1. Activa.\r\n0. Inactiva.',
|
|
83
|
+
}),
|
|
84
|
+
__metadata("design:type", Number)
|
|
85
|
+
], Square.prototype, "status", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, typeorm_1.OneToMany)(function () { return Local_1.Local; }, function (local) { return local.square; }),
|
|
88
|
+
__metadata("design:type", Array)
|
|
89
|
+
], Square.prototype, "locals", void 0);
|
|
90
|
+
Square = __decorate([
|
|
91
|
+
(0, typeorm_1.Entity)({
|
|
92
|
+
comment: 'Centros comerciales registrados/agregados a la plataforma. \n\nDel centro comercial es importante saber si tiene una plazoleta de comida.',
|
|
93
|
+
})
|
|
94
|
+
], Square);
|
|
95
|
+
return Square;
|
|
96
|
+
}(typeorm_1.BaseEntity));
|
|
97
|
+
exports.Square = Square;
|
|
@@ -13,15 +13,27 @@ exports.Terminal = void 0;
|
|
|
13
13
|
var typeorm_1 = require("typeorm");
|
|
14
14
|
var User_1 = require("./User");
|
|
15
15
|
var TerminalSession_1 = require("./TerminalSession");
|
|
16
|
+
var Local_1 = require("./Local");
|
|
16
17
|
var Terminal = /** @class */ (function () {
|
|
17
18
|
function Terminal() {
|
|
18
19
|
}
|
|
19
20
|
__decorate([
|
|
20
|
-
(0, typeorm_1.PrimaryGeneratedColumn)(
|
|
21
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
22
|
+
comment: 'Número de identificación (ID) único de cada registro.',
|
|
23
|
+
}),
|
|
21
24
|
__metadata("design:type", Number)
|
|
22
25
|
], Terminal.prototype, "id", void 0);
|
|
23
26
|
__decorate([
|
|
24
|
-
(0, typeorm_1.
|
|
27
|
+
(0, typeorm_1.ManyToOne)(function () { return Local_1.Local; }, function (local) { return local.terminals; }, {
|
|
28
|
+
nullable: true,
|
|
29
|
+
onDelete: 'CASCADE',
|
|
30
|
+
onUpdate: 'NO ACTION',
|
|
31
|
+
}),
|
|
32
|
+
(0, typeorm_1.JoinColumn)({ name: 'local' }),
|
|
33
|
+
__metadata("design:type", Local_1.Local)
|
|
34
|
+
], Terminal.prototype, "local", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({ length: 50, comment: 'Nombre de la terminal.' }),
|
|
25
37
|
__metadata("design:type", String)
|
|
26
38
|
], Terminal.prototype, "name", void 0);
|
|
27
39
|
__decorate([
|
|
@@ -33,7 +45,10 @@ var Terminal = /** @class */ (function () {
|
|
|
33
45
|
__metadata("design:type", String)
|
|
34
46
|
], Terminal.prototype, "settings", void 0);
|
|
35
47
|
__decorate([
|
|
36
|
-
(0, typeorm_1.Column)({
|
|
48
|
+
(0, typeorm_1.Column)({
|
|
49
|
+
default: 1,
|
|
50
|
+
comment: 'Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.',
|
|
51
|
+
}),
|
|
37
52
|
__metadata("design:type", Number)
|
|
38
53
|
], Terminal.prototype, "status", void 0);
|
|
39
54
|
__decorate([
|
|
@@ -56,7 +71,9 @@ var Terminal = /** @class */ (function () {
|
|
|
56
71
|
__metadata("design:type", Array)
|
|
57
72
|
], Terminal.prototype, "terminalsUser", void 0);
|
|
58
73
|
Terminal = __decorate([
|
|
59
|
-
(0, typeorm_1.Entity)(
|
|
74
|
+
(0, typeorm_1.Entity)({
|
|
75
|
+
comment: 'Tabla creada para asignar terminales a los computadores que estén en un local y así poder recibir pedidos.',
|
|
76
|
+
})
|
|
60
77
|
], Terminal);
|
|
61
78
|
return Terminal;
|
|
62
79
|
}());
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseEntity } from 'typeorm';
|
|
2
2
|
import { Terminal } from './Terminal';
|
|
3
|
-
|
|
3
|
+
import { User } from './User';
|
|
4
|
+
export declare class TerminalSession extends BaseEntity {
|
|
4
5
|
id: number;
|
|
5
6
|
user: User;
|
|
6
7
|
terminal: Terminal;
|
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
2
17
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
18
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
19
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -11,33 +26,49 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
27
|
exports.TerminalSession = void 0;
|
|
13
28
|
var typeorm_1 = require("typeorm");
|
|
14
|
-
var User_1 = require("./User");
|
|
15
29
|
var Terminal_1 = require("./Terminal");
|
|
16
|
-
var
|
|
30
|
+
var User_1 = require("./User");
|
|
31
|
+
var TerminalSession = /** @class */ (function (_super) {
|
|
32
|
+
__extends(TerminalSession, _super);
|
|
17
33
|
function TerminalSession() {
|
|
34
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
18
35
|
}
|
|
19
36
|
__decorate([
|
|
20
|
-
(0, typeorm_1.PrimaryGeneratedColumn)(
|
|
37
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
38
|
+
comment: 'Número de identificación (ID) único de cada registro.',
|
|
39
|
+
}),
|
|
21
40
|
__metadata("design:type", Number)
|
|
22
41
|
], TerminalSession.prototype, "id", void 0);
|
|
23
42
|
__decorate([
|
|
24
|
-
(0, typeorm_1.ManyToOne)(function () { return User_1.User; }, function (user) { return user.terminalUsers; }, {
|
|
43
|
+
(0, typeorm_1.ManyToOne)(function () { return User_1.User; }, function (user) { return user.terminalUsers; }, {
|
|
44
|
+
nullable: true,
|
|
45
|
+
onDelete: 'CASCADE',
|
|
46
|
+
onUpdate: 'NO ACTION',
|
|
47
|
+
}),
|
|
25
48
|
(0, typeorm_1.JoinColumn)({ name: 'user' }),
|
|
26
49
|
__metadata("design:type", User_1.User)
|
|
27
50
|
], TerminalSession.prototype, "user", void 0);
|
|
28
51
|
__decorate([
|
|
29
52
|
(0, typeorm_1.ManyToOne)(function () { return Terminal_1.Terminal; }, function (terminal) { return terminal.terminalsUser; }, {
|
|
30
53
|
nullable: true,
|
|
54
|
+
onDelete: 'CASCADE',
|
|
55
|
+
onUpdate: 'NO ACTION',
|
|
31
56
|
}),
|
|
32
57
|
(0, typeorm_1.JoinColumn)({ name: 'terminal' }),
|
|
33
58
|
__metadata("design:type", Terminal_1.Terminal)
|
|
34
59
|
], TerminalSession.prototype, "terminal", void 0);
|
|
35
60
|
__decorate([
|
|
36
|
-
(0, typeorm_1.Column)({
|
|
61
|
+
(0, typeorm_1.Column)({
|
|
62
|
+
type: 'datetime',
|
|
63
|
+
comment: 'Fecha de inicio de sesión en la terminal.',
|
|
64
|
+
}),
|
|
37
65
|
__metadata("design:type", Date)
|
|
38
66
|
], TerminalSession.prototype, "open", void 0);
|
|
39
67
|
__decorate([
|
|
40
|
-
(0, typeorm_1.Column)({
|
|
68
|
+
(0, typeorm_1.Column)({
|
|
69
|
+
type: 'datetime',
|
|
70
|
+
comment: 'Fecha de finalización de la sesión en la terminal.',
|
|
71
|
+
}),
|
|
41
72
|
__metadata("design:type", Date)
|
|
42
73
|
], TerminalSession.prototype, "close", void 0);
|
|
43
74
|
__decorate([
|
|
@@ -48,8 +79,10 @@ var TerminalSession = /** @class */ (function () {
|
|
|
48
79
|
__metadata("design:type", Number)
|
|
49
80
|
], TerminalSession.prototype, "status", void 0);
|
|
50
81
|
TerminalSession = __decorate([
|
|
51
|
-
(0, typeorm_1.Entity)('terminal_session'
|
|
82
|
+
(0, typeorm_1.Entity)('terminal_session', {
|
|
83
|
+
comment: 'Tabla creada para llevar el control de los inicios de sesión de los usuarios que tiene permiso de esa terminal.',
|
|
84
|
+
})
|
|
52
85
|
], TerminalSession);
|
|
53
86
|
return TerminalSession;
|
|
54
|
-
}());
|
|
87
|
+
}(typeorm_1.BaseEntity));
|
|
55
88
|
exports.TerminalSession = TerminalSession;
|
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
2
17
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
18
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
19
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -12,31 +27,51 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
27
|
exports.TypeFood = void 0;
|
|
13
28
|
var typeorm_1 = require("typeorm");
|
|
14
29
|
var Company_1 = require("./Company");
|
|
15
|
-
var TypeFood = /** @class */ (function () {
|
|
30
|
+
var TypeFood = /** @class */ (function (_super) {
|
|
31
|
+
__extends(TypeFood, _super);
|
|
16
32
|
function TypeFood() {
|
|
33
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
17
34
|
}
|
|
18
35
|
__decorate([
|
|
19
|
-
(0, typeorm_1.PrimaryGeneratedColumn)(
|
|
36
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
37
|
+
comment: 'Número de identificación (ID) único de cada registro.',
|
|
38
|
+
}),
|
|
20
39
|
__metadata("design:type", Number)
|
|
21
40
|
], TypeFood.prototype, "id", void 0);
|
|
22
41
|
__decorate([
|
|
23
|
-
(0, typeorm_1.Column)({
|
|
42
|
+
(0, typeorm_1.Column)({
|
|
43
|
+
length: 40,
|
|
44
|
+
comment: 'ID de la variable que se encuentra en los archivos `locales` para el multilenguaje.',
|
|
45
|
+
}),
|
|
24
46
|
__metadata("design:type", String)
|
|
25
47
|
], TypeFood.prototype, "name", void 0);
|
|
26
48
|
__decorate([
|
|
27
|
-
(0, typeorm_1.Column)({
|
|
49
|
+
(0, typeorm_1.Column)({
|
|
50
|
+
default: 1,
|
|
51
|
+
comment: 'Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.',
|
|
52
|
+
}),
|
|
28
53
|
__metadata("design:type", Number)
|
|
29
54
|
], TypeFood.prototype, "status", void 0);
|
|
30
55
|
__decorate([
|
|
31
56
|
(0, typeorm_1.ManyToMany)(function () { return Company_1.Company; }),
|
|
32
57
|
(0, typeorm_1.JoinTable)({
|
|
33
58
|
name: 'type_food_company',
|
|
59
|
+
joinColumn: {
|
|
60
|
+
name: 'company',
|
|
61
|
+
referencedColumnName: 'id',
|
|
62
|
+
},
|
|
63
|
+
inverseJoinColumn: {
|
|
64
|
+
name: 'type_food',
|
|
65
|
+
referencedColumnName: 'id',
|
|
66
|
+
},
|
|
34
67
|
}),
|
|
35
68
|
__metadata("design:type", Array)
|
|
36
69
|
], TypeFood.prototype, "companies", void 0);
|
|
37
70
|
TypeFood = __decorate([
|
|
38
|
-
(0, typeorm_1.Entity)('type_food'
|
|
71
|
+
(0, typeorm_1.Entity)('type_food', {
|
|
72
|
+
comment: 'Tipo de comida que va a tener la plataforma.',
|
|
73
|
+
})
|
|
39
74
|
], TypeFood);
|
|
40
75
|
return TypeFood;
|
|
41
|
-
}());
|
|
76
|
+
}(typeorm_1.BaseEntity));
|
|
42
77
|
exports.TypeFood = TypeFood;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseEntity } from 'typeorm';
|
|
2
|
+
import { ProductIngredient } from './ProductIngredient';
|
|
3
|
+
export declare class TypeMeasureIngredient extends BaseEntity {
|
|
4
|
+
id: number;
|
|
5
|
+
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
status: number;
|
|
8
|
+
type_measure_ingredients: ProductIngredient[];
|
|
9
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
+
};
|
|
23
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
+
};
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.TypeMeasureIngredient = void 0;
|
|
28
|
+
var typeorm_1 = require("typeorm");
|
|
29
|
+
var ProductIngredient_1 = require("./ProductIngredient");
|
|
30
|
+
var TypeMeasureIngredient = /** @class */ (function (_super) {
|
|
31
|
+
__extends(TypeMeasureIngredient, _super);
|
|
32
|
+
function TypeMeasureIngredient() {
|
|
33
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
34
|
+
}
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
37
|
+
comment: 'Número de identificación (ID) único de cada registro.',
|
|
38
|
+
}),
|
|
39
|
+
__metadata("design:type", Number)
|
|
40
|
+
], TypeMeasureIngredient.prototype, "id", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)({
|
|
43
|
+
length: 50,
|
|
44
|
+
comment: '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.',
|
|
45
|
+
}),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], TypeMeasureIngredient.prototype, "name", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)({
|
|
50
|
+
length: 50,
|
|
51
|
+
comment: '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.',
|
|
52
|
+
}),
|
|
53
|
+
__metadata("design:type", String)
|
|
54
|
+
], TypeMeasureIngredient.prototype, "description", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, typeorm_1.Column)({
|
|
57
|
+
default: 1,
|
|
58
|
+
comment: 'Estado que del item tipo de medida del ingrediente.\r\n1. Activo.\r\n0. Inactivo.',
|
|
59
|
+
}),
|
|
60
|
+
__metadata("design:type", Number)
|
|
61
|
+
], TypeMeasureIngredient.prototype, "status", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, typeorm_1.OneToMany)(function () { return ProductIngredient_1.ProductIngredient; }, function (productIngredient) { return productIngredient.type_measure_ingredient; }),
|
|
64
|
+
__metadata("design:type", Array)
|
|
65
|
+
], TypeMeasureIngredient.prototype, "type_measure_ingredients", void 0);
|
|
66
|
+
TypeMeasureIngredient = __decorate([
|
|
67
|
+
(0, typeorm_1.Entity)('type_measure_ingredient', {
|
|
68
|
+
comment: 'Unidades de medida que el cliente va a poder agregar para medir en los ingredientes que va a tener cada producto.',
|
|
69
|
+
})
|
|
70
|
+
], TypeMeasureIngredient);
|
|
71
|
+
return TypeMeasureIngredient;
|
|
72
|
+
}(typeorm_1.BaseEntity));
|
|
73
|
+
exports.TypeMeasureIngredient = TypeMeasureIngredient;
|