test-entity-library-asm 2.6.10 → 2.6.12
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/Company.d.ts +1 -3
- package/dist/entities/Company.js +4 -22
- package/dist/entities/DiscountCodeCompany.d.ts +3 -1
- package/dist/entities/DiscountCodeCompany.js +18 -2
- package/dist/entities/DiscountCodeUser.d.ts +2 -0
- package/dist/entities/DiscountCodeUser.js +14 -0
- package/dist/entities/Local.d.ts +2 -1
- package/dist/entities/Local.js +5 -1
- package/dist/entities/LocalPlan.d.ts +16 -0
- package/dist/entities/LocalPlan.js +123 -0
- package/dist/entities/Master.d.ts +1 -3
- package/dist/entities/Master.js +4 -9
- package/dist/entities/Permission.d.ts +9 -9
- package/dist/entities/Permission.js +63 -63
- package/dist/entities/Plan.d.ts +4 -4
- package/dist/entities/Plan.js +13 -17
- package/dist/entities/Role.d.ts +12 -12
- package/dist/entities/Role.js +81 -81
- package/dist/entities/RoleVisibleTo.d.ts +6 -6
- package/dist/entities/RoleVisibleTo.js +47 -47
- package/dist/entities/ScheduleCategory.d.ts +9 -9
- package/dist/entities/ScheduleCategory.js +48 -48
- package/dist/entities/TypeFood.d.ts +8 -8
- package/dist/entities/TypeFood.js +68 -68
- package/dist/entities.views.routes.d.ts +1 -0
- package/dist/entities.views.routes.js +4 -1
- package/dist/middlewares/timezoneMiddleware.d.ts +3 -3
- package/dist/middlewares/timezoneMiddleware.js +22 -22
- package/dist/repositories/VerifyLocalRepository.d.ts +4 -4
- package/dist/repositories/VerifyLocalRepository.js +142 -142
- package/dist/transformations.d.ts +4 -4
- package/dist/transformations.js +16 -16
- package/dist/views/UserInformation.d.ts +39 -39
- package/dist/views/UserInformation.js +187 -187
- package/package.json +1 -1
- package/src/entities/Company.ts +3 -21
- package/src/entities/DiscountCodeCompany.ts +17 -2
- package/src/entities/DiscountCodeUser.ts +13 -0
- package/src/entities/Local.ts +9 -5
- package/src/entities/LocalPlan.ts +101 -0
- package/src/entities/Master.ts +4 -8
- package/src/entities/Plan.ts +12 -17
- package/src/entities.views.routes.ts +1 -0
package/dist/entities/Role.js
CHANGED
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
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;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.Role = void 0;
|
|
13
|
-
var typeorm_1 = require("typeorm");
|
|
14
|
-
var Permission_1 = require("./Permission");
|
|
15
|
-
var RoleVisibleTo_1 = require("./RoleVisibleTo");
|
|
16
|
-
var Role = /** @class */ (function () {
|
|
17
|
-
function Role() {
|
|
18
|
-
}
|
|
19
|
-
__decorate([
|
|
20
|
-
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
21
|
-
comment: 'Número de identificación (ID) único de cada registro.',
|
|
22
|
-
}),
|
|
23
|
-
__metadata("design:type", Number)
|
|
24
|
-
], Role.prototype, "id", void 0);
|
|
25
|
-
__decorate([
|
|
26
|
-
(0, typeorm_1.Column)({ length: 10, comment: 'Código único del rol.' }),
|
|
27
|
-
__metadata("design:type", String)
|
|
28
|
-
], Role.prototype, "code", void 0);
|
|
29
|
-
__decorate([
|
|
30
|
-
(0, typeorm_1.Column)({
|
|
31
|
-
length: 40,
|
|
32
|
-
comment: 'Id de la variable que se encuentra en los archivos "locale" para el multilenguaje.\r\n\r\nCabe recordar qué los usuarios también pueden crear roles, estos deben ir normal, sin id para el lenguaje.',
|
|
33
|
-
}),
|
|
34
|
-
__metadata("design:type", String)
|
|
35
|
-
], Role.prototype, "name", void 0);
|
|
36
|
-
__decorate([
|
|
37
|
-
(0, typeorm_1.Column)({
|
|
38
|
-
length: 40,
|
|
39
|
-
nullable: true,
|
|
40
|
-
comment: 'Id de la variable que se encuentra en los archivos "locale" para el multilenguaje.\r\n\r\nCabe recordar qué los usuarios también pueden crear roles, estos deben ir normal, sin id para el lenguaje.',
|
|
41
|
-
}),
|
|
42
|
-
__metadata("design:type", String)
|
|
43
|
-
], Role.prototype, "description", void 0);
|
|
44
|
-
__decorate([
|
|
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
|
-
}),
|
|
49
|
-
__metadata("design:type", Number)
|
|
50
|
-
], Role.prototype, "status", void 0);
|
|
51
|
-
__decorate([
|
|
52
|
-
(0, typeorm_1.ManyToMany)(function () { return Permission_1.Permission; }),
|
|
53
|
-
(0, typeorm_1.JoinTable)({
|
|
54
|
-
name: 'role_permission',
|
|
55
|
-
joinColumn: {
|
|
56
|
-
name: 'permission',
|
|
57
|
-
referencedColumnName: 'id',
|
|
58
|
-
},
|
|
59
|
-
inverseJoinColumn: {
|
|
60
|
-
name: 'role',
|
|
61
|
-
referencedColumnName: 'id',
|
|
62
|
-
},
|
|
63
|
-
}),
|
|
64
|
-
__metadata("design:type", Array)
|
|
65
|
-
], Role.prototype, "permissions", void 0);
|
|
66
|
-
__decorate([
|
|
67
|
-
(0, typeorm_1.OneToMany)(function () { return RoleVisibleTo_1.RoleVisibleTo; }, function (roleVisibleTo) { return roleVisibleTo.role; }),
|
|
68
|
-
__metadata("design:type", Array)
|
|
69
|
-
], Role.prototype, "rolesVisibleTo", void 0);
|
|
70
|
-
__decorate([
|
|
71
|
-
(0, typeorm_1.OneToMany)(function () { return RoleVisibleTo_1.RoleVisibleTo; }, function (roleVisibleTo) { return roleVisibleTo.visible_to; }),
|
|
72
|
-
__metadata("design:type", Array)
|
|
73
|
-
], Role.prototype, "visiblesTo", void 0);
|
|
74
|
-
Role = __decorate([
|
|
75
|
-
(0, typeorm_1.Entity)({
|
|
76
|
-
comment: 'Roles que se le pueden agregar a un usuario en la plataforma.',
|
|
77
|
-
})
|
|
78
|
-
], Role);
|
|
79
|
-
return Role;
|
|
80
|
-
}());
|
|
81
|
-
exports.Role = Role;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Role = void 0;
|
|
13
|
+
var typeorm_1 = require("typeorm");
|
|
14
|
+
var Permission_1 = require("./Permission");
|
|
15
|
+
var RoleVisibleTo_1 = require("./RoleVisibleTo");
|
|
16
|
+
var Role = /** @class */ (function () {
|
|
17
|
+
function Role() {
|
|
18
|
+
}
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
21
|
+
comment: 'Número de identificación (ID) único de cada registro.',
|
|
22
|
+
}),
|
|
23
|
+
__metadata("design:type", Number)
|
|
24
|
+
], Role.prototype, "id", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.Column)({ length: 10, comment: 'Código único del rol.' }),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], Role.prototype, "code", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)({
|
|
31
|
+
length: 40,
|
|
32
|
+
comment: 'Id de la variable que se encuentra en los archivos "locale" para el multilenguaje.\r\n\r\nCabe recordar qué los usuarios también pueden crear roles, estos deben ir normal, sin id para el lenguaje.',
|
|
33
|
+
}),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], Role.prototype, "name", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.Column)({
|
|
38
|
+
length: 40,
|
|
39
|
+
nullable: true,
|
|
40
|
+
comment: 'Id de la variable que se encuentra en los archivos "locale" para el multilenguaje.\r\n\r\nCabe recordar qué los usuarios también pueden crear roles, estos deben ir normal, sin id para el lenguaje.',
|
|
41
|
+
}),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], Role.prototype, "description", void 0);
|
|
44
|
+
__decorate([
|
|
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
|
+
}),
|
|
49
|
+
__metadata("design:type", Number)
|
|
50
|
+
], Role.prototype, "status", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, typeorm_1.ManyToMany)(function () { return Permission_1.Permission; }),
|
|
53
|
+
(0, typeorm_1.JoinTable)({
|
|
54
|
+
name: 'role_permission',
|
|
55
|
+
joinColumn: {
|
|
56
|
+
name: 'permission',
|
|
57
|
+
referencedColumnName: 'id',
|
|
58
|
+
},
|
|
59
|
+
inverseJoinColumn: {
|
|
60
|
+
name: 'role',
|
|
61
|
+
referencedColumnName: 'id',
|
|
62
|
+
},
|
|
63
|
+
}),
|
|
64
|
+
__metadata("design:type", Array)
|
|
65
|
+
], Role.prototype, "permissions", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, typeorm_1.OneToMany)(function () { return RoleVisibleTo_1.RoleVisibleTo; }, function (roleVisibleTo) { return roleVisibleTo.role; }),
|
|
68
|
+
__metadata("design:type", Array)
|
|
69
|
+
], Role.prototype, "rolesVisibleTo", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, typeorm_1.OneToMany)(function () { return RoleVisibleTo_1.RoleVisibleTo; }, function (roleVisibleTo) { return roleVisibleTo.visible_to; }),
|
|
72
|
+
__metadata("design:type", Array)
|
|
73
|
+
], Role.prototype, "visiblesTo", void 0);
|
|
74
|
+
Role = __decorate([
|
|
75
|
+
(0, typeorm_1.Entity)({
|
|
76
|
+
comment: 'Roles que se le pueden agregar a un usuario en la plataforma.',
|
|
77
|
+
})
|
|
78
|
+
], Role);
|
|
79
|
+
return Role;
|
|
80
|
+
}());
|
|
81
|
+
exports.Role = Role;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Role } from './Role';
|
|
2
|
-
export declare class RoleVisibleTo {
|
|
3
|
-
id: number;
|
|
4
|
-
role: Role;
|
|
5
|
-
visible_to: Role;
|
|
6
|
-
}
|
|
1
|
+
import { Role } from './Role';
|
|
2
|
+
export declare class RoleVisibleTo {
|
|
3
|
+
id: number;
|
|
4
|
+
role: Role;
|
|
5
|
+
visible_to: Role;
|
|
6
|
+
}
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
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;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.RoleVisibleTo = void 0;
|
|
13
|
-
var typeorm_1 = require("typeorm");
|
|
14
|
-
var Role_1 = require("./Role");
|
|
15
|
-
var RoleVisibleTo = /** @class */ (function () {
|
|
16
|
-
function RoleVisibleTo() {
|
|
17
|
-
}
|
|
18
|
-
__decorate([
|
|
19
|
-
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
20
|
-
comment: 'Número de identificación (ID) único de cada registro.',
|
|
21
|
-
}),
|
|
22
|
-
__metadata("design:type", Number)
|
|
23
|
-
], RoleVisibleTo.prototype, "id", void 0);
|
|
24
|
-
__decorate([
|
|
25
|
-
(0, typeorm_1.ManyToOne)(function () { return Role_1.Role; }, function (role) { return role.rolesVisibleTo; }, {
|
|
26
|
-
onDelete: 'CASCADE',
|
|
27
|
-
onUpdate: 'NO ACTION',
|
|
28
|
-
}),
|
|
29
|
-
(0, typeorm_1.JoinColumn)({ name: 'role' }),
|
|
30
|
-
__metadata("design:type", Role_1.Role)
|
|
31
|
-
], RoleVisibleTo.prototype, "role", void 0);
|
|
32
|
-
__decorate([
|
|
33
|
-
(0, typeorm_1.ManyToOne)(function () { return Role_1.Role; }, function (role) { return role.visiblesTo; }, {
|
|
34
|
-
onDelete: 'CASCADE',
|
|
35
|
-
onUpdate: 'NO ACTION',
|
|
36
|
-
}),
|
|
37
|
-
(0, typeorm_1.JoinColumn)({ name: 'visible_to' }),
|
|
38
|
-
__metadata("design:type", Role_1.Role)
|
|
39
|
-
], RoleVisibleTo.prototype, "visible_to", void 0);
|
|
40
|
-
RoleVisibleTo = __decorate([
|
|
41
|
-
(0, typeorm_1.Entity)('role_visible_to', {
|
|
42
|
-
comment: 'Con esta tabla validamos cuales son los roles que puede agregar a otros usuarios qué roles',
|
|
43
|
-
})
|
|
44
|
-
], RoleVisibleTo);
|
|
45
|
-
return RoleVisibleTo;
|
|
46
|
-
}());
|
|
47
|
-
exports.RoleVisibleTo = RoleVisibleTo;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.RoleVisibleTo = void 0;
|
|
13
|
+
var typeorm_1 = require("typeorm");
|
|
14
|
+
var Role_1 = require("./Role");
|
|
15
|
+
var RoleVisibleTo = /** @class */ (function () {
|
|
16
|
+
function RoleVisibleTo() {
|
|
17
|
+
}
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
20
|
+
comment: 'Número de identificación (ID) único de cada registro.',
|
|
21
|
+
}),
|
|
22
|
+
__metadata("design:type", Number)
|
|
23
|
+
], RoleVisibleTo.prototype, "id", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.ManyToOne)(function () { return Role_1.Role; }, function (role) { return role.rolesVisibleTo; }, {
|
|
26
|
+
onDelete: 'CASCADE',
|
|
27
|
+
onUpdate: 'NO ACTION',
|
|
28
|
+
}),
|
|
29
|
+
(0, typeorm_1.JoinColumn)({ name: 'role' }),
|
|
30
|
+
__metadata("design:type", Role_1.Role)
|
|
31
|
+
], RoleVisibleTo.prototype, "role", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.ManyToOne)(function () { return Role_1.Role; }, function (role) { return role.visiblesTo; }, {
|
|
34
|
+
onDelete: 'CASCADE',
|
|
35
|
+
onUpdate: 'NO ACTION',
|
|
36
|
+
}),
|
|
37
|
+
(0, typeorm_1.JoinColumn)({ name: 'visible_to' }),
|
|
38
|
+
__metadata("design:type", Role_1.Role)
|
|
39
|
+
], RoleVisibleTo.prototype, "visible_to", void 0);
|
|
40
|
+
RoleVisibleTo = __decorate([
|
|
41
|
+
(0, typeorm_1.Entity)('role_visible_to', {
|
|
42
|
+
comment: 'Con esta tabla validamos cuales son los roles que puede agregar a otros usuarios qué roles',
|
|
43
|
+
})
|
|
44
|
+
], RoleVisibleTo);
|
|
45
|
+
return RoleVisibleTo;
|
|
46
|
+
}());
|
|
47
|
+
exports.RoleVisibleTo = RoleVisibleTo;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Category } from './Category';
|
|
2
|
-
import { Day } from './Day';
|
|
3
|
-
export declare class ScheduleCategory {
|
|
4
|
-
id: number;
|
|
5
|
-
category: Category;
|
|
6
|
-
day: Day;
|
|
7
|
-
start_time: string;
|
|
8
|
-
end_time: string;
|
|
9
|
-
}
|
|
1
|
+
import { Category } from './Category';
|
|
2
|
+
import { Day } from './Day';
|
|
3
|
+
export declare class ScheduleCategory {
|
|
4
|
+
id: number;
|
|
5
|
+
category: Category;
|
|
6
|
+
day: Day;
|
|
7
|
+
start_time: string;
|
|
8
|
+
end_time: string;
|
|
9
|
+
}
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
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;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.ScheduleCategory = void 0;
|
|
13
|
-
var typeorm_1 = require("typeorm");
|
|
14
|
-
var Category_1 = require("./Category");
|
|
15
|
-
var Day_1 = require("./Day");
|
|
16
|
-
var ScheduleCategory = /** @class */ (function () {
|
|
17
|
-
function ScheduleCategory() {
|
|
18
|
-
}
|
|
19
|
-
__decorate([
|
|
20
|
-
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
21
|
-
__metadata("design:type", Number)
|
|
22
|
-
], ScheduleCategory.prototype, "id", void 0);
|
|
23
|
-
__decorate([
|
|
24
|
-
(0, typeorm_1.ManyToOne)(function () { return Category_1.Category; }, { onDelete: 'CASCADE', onUpdate: 'NO ACTION' }),
|
|
25
|
-
(0, typeorm_1.JoinColumn)({ name: 'category' }),
|
|
26
|
-
__metadata("design:type", Category_1.Category)
|
|
27
|
-
], ScheduleCategory.prototype, "category", void 0);
|
|
28
|
-
__decorate([
|
|
29
|
-
(0, typeorm_1.ManyToOne)(function () { return Day_1.Day; }, { onDelete: 'CASCADE', onUpdate: 'NO ACTION' }),
|
|
30
|
-
(0, typeorm_1.JoinColumn)({ name: 'day' }),
|
|
31
|
-
__metadata("design:type", Day_1.Day)
|
|
32
|
-
], ScheduleCategory.prototype, "day", void 0);
|
|
33
|
-
__decorate([
|
|
34
|
-
(0, typeorm_1.Column)(),
|
|
35
|
-
__metadata("design:type", String)
|
|
36
|
-
], ScheduleCategory.prototype, "start_time", void 0);
|
|
37
|
-
__decorate([
|
|
38
|
-
(0, typeorm_1.Column)(),
|
|
39
|
-
__metadata("design:type", String)
|
|
40
|
-
], ScheduleCategory.prototype, "end_time", void 0);
|
|
41
|
-
ScheduleCategory = __decorate([
|
|
42
|
-
(0, typeorm_1.Entity)('schedule_category', {
|
|
43
|
-
comment: 'Acá podemos agregar los horarios para las categorías de los productos. O sea, si una categoría sólo está los miércoles, entonces podría agregar el día y los horarios.',
|
|
44
|
-
})
|
|
45
|
-
], ScheduleCategory);
|
|
46
|
-
return ScheduleCategory;
|
|
47
|
-
}());
|
|
48
|
-
exports.ScheduleCategory = ScheduleCategory;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ScheduleCategory = void 0;
|
|
13
|
+
var typeorm_1 = require("typeorm");
|
|
14
|
+
var Category_1 = require("./Category");
|
|
15
|
+
var Day_1 = require("./Day");
|
|
16
|
+
var ScheduleCategory = /** @class */ (function () {
|
|
17
|
+
function ScheduleCategory() {
|
|
18
|
+
}
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
21
|
+
__metadata("design:type", Number)
|
|
22
|
+
], ScheduleCategory.prototype, "id", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.ManyToOne)(function () { return Category_1.Category; }, { onDelete: 'CASCADE', onUpdate: 'NO ACTION' }),
|
|
25
|
+
(0, typeorm_1.JoinColumn)({ name: 'category' }),
|
|
26
|
+
__metadata("design:type", Category_1.Category)
|
|
27
|
+
], ScheduleCategory.prototype, "category", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.ManyToOne)(function () { return Day_1.Day; }, { onDelete: 'CASCADE', onUpdate: 'NO ACTION' }),
|
|
30
|
+
(0, typeorm_1.JoinColumn)({ name: 'day' }),
|
|
31
|
+
__metadata("design:type", Day_1.Day)
|
|
32
|
+
], ScheduleCategory.prototype, "day", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)(),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], ScheduleCategory.prototype, "start_time", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)(),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], ScheduleCategory.prototype, "end_time", void 0);
|
|
41
|
+
ScheduleCategory = __decorate([
|
|
42
|
+
(0, typeorm_1.Entity)('schedule_category', {
|
|
43
|
+
comment: 'Acá podemos agregar los horarios para las categorías de los productos. O sea, si una categoría sólo está los miércoles, entonces podría agregar el día y los horarios.',
|
|
44
|
+
})
|
|
45
|
+
], ScheduleCategory);
|
|
46
|
+
return ScheduleCategory;
|
|
47
|
+
}());
|
|
48
|
+
exports.ScheduleCategory = ScheduleCategory;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Company } from './Company';
|
|
2
|
-
export declare class TypeFood {
|
|
3
|
-
id: number;
|
|
4
|
-
name: string;
|
|
5
|
-
photo: string;
|
|
6
|
-
status: number;
|
|
7
|
-
companies: Company[];
|
|
8
|
-
}
|
|
1
|
+
import { Company } from './Company';
|
|
2
|
+
export declare class TypeFood {
|
|
3
|
+
id: number;
|
|
4
|
+
name: string;
|
|
5
|
+
photo: string;
|
|
6
|
+
status: number;
|
|
7
|
+
companies: Company[];
|
|
8
|
+
}
|
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
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;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.TypeFood = void 0;
|
|
13
|
-
var typeorm_1 = require("typeorm");
|
|
14
|
-
var Company_1 = require("./Company");
|
|
15
|
-
var TypeFood = /** @class */ (function () {
|
|
16
|
-
function TypeFood() {
|
|
17
|
-
}
|
|
18
|
-
__decorate([
|
|
19
|
-
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
20
|
-
comment: 'Número de identificación (ID) único de cada registro.',
|
|
21
|
-
}),
|
|
22
|
-
__metadata("design:type", Number)
|
|
23
|
-
], TypeFood.prototype, "id", void 0);
|
|
24
|
-
__decorate([
|
|
25
|
-
(0, typeorm_1.Column)({
|
|
26
|
-
length: 40,
|
|
27
|
-
comment: 'ID de la variable que se encuentra en los archivos `locales` para el multilenguaje.',
|
|
28
|
-
}),
|
|
29
|
-
__metadata("design:type", String)
|
|
30
|
-
], TypeFood.prototype, "name", void 0);
|
|
31
|
-
__decorate([
|
|
32
|
-
(0, typeorm_1.Column)({
|
|
33
|
-
length: 500,
|
|
34
|
-
nullable: true,
|
|
35
|
-
comment: 'Imagen para el tipo de comida.',
|
|
36
|
-
}),
|
|
37
|
-
__metadata("design:type", String)
|
|
38
|
-
], TypeFood.prototype, "photo", void 0);
|
|
39
|
-
__decorate([
|
|
40
|
-
(0, typeorm_1.Column)({
|
|
41
|
-
default: 1,
|
|
42
|
-
comment: 'Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.',
|
|
43
|
-
}),
|
|
44
|
-
__metadata("design:type", Number)
|
|
45
|
-
], TypeFood.prototype, "status", void 0);
|
|
46
|
-
__decorate([
|
|
47
|
-
(0, typeorm_1.ManyToMany)(function () { return Company_1.Company; }),
|
|
48
|
-
(0, typeorm_1.JoinTable)({
|
|
49
|
-
name: 'type_food_company',
|
|
50
|
-
joinColumn: {
|
|
51
|
-
name: 'company',
|
|
52
|
-
referencedColumnName: 'id',
|
|
53
|
-
},
|
|
54
|
-
inverseJoinColumn: {
|
|
55
|
-
name: 'type_food',
|
|
56
|
-
referencedColumnName: 'id',
|
|
57
|
-
},
|
|
58
|
-
}),
|
|
59
|
-
__metadata("design:type", Array)
|
|
60
|
-
], TypeFood.prototype, "companies", void 0);
|
|
61
|
-
TypeFood = __decorate([
|
|
62
|
-
(0, typeorm_1.Entity)('type_food', {
|
|
63
|
-
comment: 'Tipo de comida que va a tener la plataforma.',
|
|
64
|
-
})
|
|
65
|
-
], TypeFood);
|
|
66
|
-
return TypeFood;
|
|
67
|
-
}());
|
|
68
|
-
exports.TypeFood = TypeFood;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.TypeFood = void 0;
|
|
13
|
+
var typeorm_1 = require("typeorm");
|
|
14
|
+
var Company_1 = require("./Company");
|
|
15
|
+
var TypeFood = /** @class */ (function () {
|
|
16
|
+
function TypeFood() {
|
|
17
|
+
}
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
20
|
+
comment: 'Número de identificación (ID) único de cada registro.',
|
|
21
|
+
}),
|
|
22
|
+
__metadata("design:type", Number)
|
|
23
|
+
], TypeFood.prototype, "id", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.Column)({
|
|
26
|
+
length: 40,
|
|
27
|
+
comment: 'ID de la variable que se encuentra en los archivos `locales` para el multilenguaje.',
|
|
28
|
+
}),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], TypeFood.prototype, "name", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.Column)({
|
|
33
|
+
length: 500,
|
|
34
|
+
nullable: true,
|
|
35
|
+
comment: 'Imagen para el tipo de comida.',
|
|
36
|
+
}),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], TypeFood.prototype, "photo", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Column)({
|
|
41
|
+
default: 1,
|
|
42
|
+
comment: 'Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.',
|
|
43
|
+
}),
|
|
44
|
+
__metadata("design:type", Number)
|
|
45
|
+
], TypeFood.prototype, "status", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.ManyToMany)(function () { return Company_1.Company; }),
|
|
48
|
+
(0, typeorm_1.JoinTable)({
|
|
49
|
+
name: 'type_food_company',
|
|
50
|
+
joinColumn: {
|
|
51
|
+
name: 'company',
|
|
52
|
+
referencedColumnName: 'id',
|
|
53
|
+
},
|
|
54
|
+
inverseJoinColumn: {
|
|
55
|
+
name: 'type_food',
|
|
56
|
+
referencedColumnName: 'id',
|
|
57
|
+
},
|
|
58
|
+
}),
|
|
59
|
+
__metadata("design:type", Array)
|
|
60
|
+
], TypeFood.prototype, "companies", void 0);
|
|
61
|
+
TypeFood = __decorate([
|
|
62
|
+
(0, typeorm_1.Entity)('type_food', {
|
|
63
|
+
comment: 'Tipo de comida que va a tener la plataforma.',
|
|
64
|
+
})
|
|
65
|
+
], TypeFood);
|
|
66
|
+
return TypeFood;
|
|
67
|
+
}());
|
|
68
|
+
exports.TypeFood = TypeFood;
|
|
@@ -43,6 +43,7 @@ export { PosSystem } from './entities/PosSystem';
|
|
|
43
43
|
export { VerifyLocal } from './entities/VerifyLocal';
|
|
44
44
|
export { MasterNotification } from './entities/MasterNotification';
|
|
45
45
|
export { ReassignReview } from './entities/ReassignReview';
|
|
46
|
+
export { LocalPlan } from './entities/LocalPlan';
|
|
46
47
|
export { LocalsCompany } from './views/LocalsCompany';
|
|
47
48
|
export { VerifyLocals } from './views/VerifyLocals';
|
|
48
49
|
export { MasterNotifications } from './views/MasterNotifications';
|
|
@@ -14,7 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.
|
|
17
|
+
exports.Partners = exports.MasterNotifications = exports.VerifyLocals = exports.LocalsCompany = exports.LocalPlan = exports.ReassignReview = exports.MasterNotification = exports.VerifyLocal = exports.PosSystem = exports.AuthenticationCredential = exports.BusinessType = exports.UserAddress = exports.User = exports.TypeMeasureIngredient = exports.TerminalSession = exports.Terminal = exports.Square = exports.RequestStatus = exports.RequestProductGroupComplement = exports.RequestProduct = exports.Request = exports.Region = exports.ProductTopping = exports.ProductIngredient = exports.ProductGroupComplement = exports.ProductGroup = exports.Product = exports.Plan = exports.PaymentMethod = exports.PartnerRole = exports.PartnerPermission = exports.PartnerNotification = exports.Partner = exports.MasterRole = exports.MasterPermission = exports.Master = exports.LocalQualification = exports.Local = exports.DiscountCodeUser = exports.DiscountCodeCompany = exports.Day = exports.Country = exports.Configuration = exports.Company = exports.CodeRedemptionHistoryUser = exports.CodeRedemptionHistoryCompany = exports.City = exports.ScheduleCategory = exports.Category = exports.BusinessTypeProduct = void 0;
|
|
18
|
+
exports.CustomRepository = void 0;
|
|
18
19
|
var BusinessTypeProduct_1 = require("./entities/BusinessTypeProduct");
|
|
19
20
|
Object.defineProperty(exports, "BusinessTypeProduct", { enumerable: true, get: function () { return BusinessTypeProduct_1.BusinessTypeProduct; } });
|
|
20
21
|
var Category_1 = require("./entities/Category");
|
|
@@ -105,6 +106,8 @@ var MasterNotification_1 = require("./entities/MasterNotification");
|
|
|
105
106
|
Object.defineProperty(exports, "MasterNotification", { enumerable: true, get: function () { return MasterNotification_1.MasterNotification; } });
|
|
106
107
|
var ReassignReview_1 = require("./entities/ReassignReview");
|
|
107
108
|
Object.defineProperty(exports, "ReassignReview", { enumerable: true, get: function () { return ReassignReview_1.ReassignReview; } });
|
|
109
|
+
var LocalPlan_1 = require("./entities/LocalPlan");
|
|
110
|
+
Object.defineProperty(exports, "LocalPlan", { enumerable: true, get: function () { return LocalPlan_1.LocalPlan; } });
|
|
108
111
|
var LocalsCompany_1 = require("./views/LocalsCompany");
|
|
109
112
|
Object.defineProperty(exports, "LocalsCompany", { enumerable: true, get: function () { return LocalsCompany_1.LocalsCompany; } });
|
|
110
113
|
var VerifyLocals_1 = require("./views/VerifyLocals");
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { NextFunction, Request, Response } from 'express';
|
|
2
|
-
export declare function timezoneMiddleware(req: Request, res: Response, next: NextFunction): void;
|
|
3
|
-
export declare function getTimeZone(): string;
|
|
1
|
+
import { NextFunction, Request, Response } from 'express';
|
|
2
|
+
export declare function timezoneMiddleware(req: Request, res: Response, next: NextFunction): void;
|
|
3
|
+
export declare function getTimeZone(): string;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getTimeZone = exports.timezoneMiddleware = void 0;
|
|
4
|
-
var async_hooks_1 = require("async_hooks");
|
|
5
|
-
var asyncLocalStorage = new async_hooks_1.AsyncLocalStorage();
|
|
6
|
-
function timezoneMiddleware(req, res, next) {
|
|
7
|
-
var userTimeZone = req.headers['user-timezone'];
|
|
8
|
-
if (Array.isArray(userTimeZone)) {
|
|
9
|
-
userTimeZone = userTimeZone[0];
|
|
10
|
-
}
|
|
11
|
-
userTimeZone = userTimeZone || 'UTC';
|
|
12
|
-
asyncLocalStorage.run(new Map([['timezone', userTimeZone]]), function () {
|
|
13
|
-
next();
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
exports.timezoneMiddleware = timezoneMiddleware;
|
|
17
|
-
function getTimeZone() {
|
|
18
|
-
var _a;
|
|
19
|
-
var store = asyncLocalStorage.getStore();
|
|
20
|
-
return (_a = store === null || store === void 0 ? void 0 : store.get('timezone')) !== null && _a !== void 0 ? _a : 'UTC';
|
|
21
|
-
}
|
|
22
|
-
exports.getTimeZone = getTimeZone;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getTimeZone = exports.timezoneMiddleware = void 0;
|
|
4
|
+
var async_hooks_1 = require("async_hooks");
|
|
5
|
+
var asyncLocalStorage = new async_hooks_1.AsyncLocalStorage();
|
|
6
|
+
function timezoneMiddleware(req, res, next) {
|
|
7
|
+
var userTimeZone = req.headers['user-timezone'];
|
|
8
|
+
if (Array.isArray(userTimeZone)) {
|
|
9
|
+
userTimeZone = userTimeZone[0];
|
|
10
|
+
}
|
|
11
|
+
userTimeZone = userTimeZone || 'UTC';
|
|
12
|
+
asyncLocalStorage.run(new Map([['timezone', userTimeZone]]), function () {
|
|
13
|
+
next();
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
exports.timezoneMiddleware = timezoneMiddleware;
|
|
17
|
+
function getTimeZone() {
|
|
18
|
+
var _a;
|
|
19
|
+
var store = asyncLocalStorage.getStore();
|
|
20
|
+
return (_a = store === null || store === void 0 ? void 0 : store.get('timezone')) !== null && _a !== void 0 ? _a : 'UTC';
|
|
21
|
+
}
|
|
22
|
+
exports.getTimeZone = getTimeZone;
|