test-entity-library-asm 2.6.5 → 2.6.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entities/Local.d.ts +1 -0
- package/dist/entities/Local.js +7 -0
- package/dist/entities/Master.d.ts +1 -0
- package/dist/entities/Master.js +7 -0
- package/dist/entities/Partner.d.ts +1 -0
- package/dist/entities/Partner.js +7 -0
- package/dist/entities/PartnerNotification.js +1 -1
- package/dist/entities/Permission.d.ts +9 -9
- package/dist/entities/Permission.js +63 -63
- 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/User.d.ts +1 -0
- package/dist/entities/User.js +7 -0
- 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/package.json +1 -1
- package/src/entities/Local.ts +7 -0
- package/src/entities/Master.ts +7 -0
- package/src/entities/Partner.ts +7 -0
- package/src/entities/PartnerNotification.ts +1 -1
- package/src/entities/User.ts +7 -0
package/dist/entities/Local.d.ts
CHANGED
package/dist/entities/Local.js
CHANGED
|
@@ -123,6 +123,13 @@ var Local = /** @class */ (function () {
|
|
|
123
123
|
}),
|
|
124
124
|
__metadata("design:type", Number)
|
|
125
125
|
], Local.prototype, "status", void 0);
|
|
126
|
+
__decorate([
|
|
127
|
+
(0, typeorm_1.Column)({
|
|
128
|
+
default: 1,
|
|
129
|
+
comment: 'Es el estado para verificar si se envia en la papelara o no.',
|
|
130
|
+
}),
|
|
131
|
+
__metadata("design:type", Number)
|
|
132
|
+
], Local.prototype, "visible", void 0);
|
|
126
133
|
__decorate([
|
|
127
134
|
(0, typeorm_1.ManyToMany)(function () { return Partner_1.Partner; }, function (partner) { return partner.locals_partner; }),
|
|
128
135
|
(0, typeorm_1.JoinTable)({
|
package/dist/entities/Master.js
CHANGED
|
@@ -115,6 +115,13 @@ var Master = /** @class */ (function () {
|
|
|
115
115
|
}),
|
|
116
116
|
__metadata("design:type", Number)
|
|
117
117
|
], Master.prototype, "status", void 0);
|
|
118
|
+
__decorate([
|
|
119
|
+
(0, typeorm_1.Column)({
|
|
120
|
+
default: 1,
|
|
121
|
+
comment: 'Es el estado para verificar si se envia en la papelara o no.',
|
|
122
|
+
}),
|
|
123
|
+
__metadata("design:type", Number)
|
|
124
|
+
], Master.prototype, "visible", void 0);
|
|
118
125
|
__decorate([
|
|
119
126
|
(0, typeorm_1.OneToMany)(function () { return DiscountCodeCompany_1.DiscountCodeCompany; }, function (discountCodeCompany) { return discountCodeCompany.updated_by; }),
|
|
120
127
|
__metadata("design:type", Array)
|
package/dist/entities/Partner.js
CHANGED
|
@@ -135,6 +135,13 @@ var Partner = /** @class */ (function () {
|
|
|
135
135
|
}),
|
|
136
136
|
__metadata("design:type", Number)
|
|
137
137
|
], Partner.prototype, "status", void 0);
|
|
138
|
+
__decorate([
|
|
139
|
+
(0, typeorm_1.Column)({
|
|
140
|
+
default: 1,
|
|
141
|
+
comment: 'Es el estado para verificar si se envia en la papelara o no.',
|
|
142
|
+
}),
|
|
143
|
+
__metadata("design:type", Number)
|
|
144
|
+
], Partner.prototype, "visible", void 0);
|
|
138
145
|
__decorate([
|
|
139
146
|
(0, typeorm_1.OneToMany)(function () { return Company_1.Company; }, function (company) { return company.partner; }),
|
|
140
147
|
__metadata("design:type", Array)
|
|
@@ -48,7 +48,7 @@ var PartnerNotification = /** @class */ (function () {
|
|
|
48
48
|
], PartnerNotification.prototype, "description", void 0);
|
|
49
49
|
__decorate([
|
|
50
50
|
(0, typeorm_1.Column)({
|
|
51
|
-
type: '
|
|
51
|
+
type: 'json',
|
|
52
52
|
nullable: true,
|
|
53
53
|
transformer: jsonTransformer_1.jsonTransformer,
|
|
54
54
|
comment: 'Configuración adicional de la notificación, como enlaces, qué hace después de darle click...',
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Role } from './Role';
|
|
2
|
-
export declare class Permission {
|
|
3
|
-
id: number;
|
|
4
|
-
code: string;
|
|
5
|
-
name: string;
|
|
6
|
-
description: string;
|
|
7
|
-
status: number;
|
|
8
|
-
roles: Role[];
|
|
9
|
-
}
|
|
1
|
+
import { Role } from './Role';
|
|
2
|
+
export declare class Permission {
|
|
3
|
+
id: number;
|
|
4
|
+
code: string;
|
|
5
|
+
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
status: number;
|
|
8
|
+
roles: Role[];
|
|
9
|
+
}
|
|
@@ -1,63 +1,63 @@
|
|
|
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.Permission = void 0;
|
|
13
|
-
var typeorm_1 = require("typeorm");
|
|
14
|
-
var Role_1 = require("./Role");
|
|
15
|
-
var Permission = /** @class */ (function () {
|
|
16
|
-
function Permission() {
|
|
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
|
-
], Permission.prototype, "id", void 0);
|
|
24
|
-
__decorate([
|
|
25
|
-
(0, typeorm_1.Column)({ length: 10, unique: true, comment: 'Código del permiso.' }),
|
|
26
|
-
__metadata("design:type", String)
|
|
27
|
-
], Permission.prototype, "code", void 0);
|
|
28
|
-
__decorate([
|
|
29
|
-
(0, typeorm_1.Column)({
|
|
30
|
-
length: 40,
|
|
31
|
-
comment: 'Id de la variable que se encuentra en los archivos `locale` para el multilenguaje.',
|
|
32
|
-
}),
|
|
33
|
-
__metadata("design:type", String)
|
|
34
|
-
], Permission.prototype, "name", void 0);
|
|
35
|
-
__decorate([
|
|
36
|
-
(0, typeorm_1.Column)({
|
|
37
|
-
length: 40,
|
|
38
|
-
comment: 'Id de la variable que se encuentra en los archivos `locale` para el multilenguaje.',
|
|
39
|
-
}),
|
|
40
|
-
__metadata("design:type", String)
|
|
41
|
-
], Permission.prototype, "description", void 0);
|
|
42
|
-
__decorate([
|
|
43
|
-
(0, typeorm_1.Column)({
|
|
44
|
-
default: 1,
|
|
45
|
-
comment: 'Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.',
|
|
46
|
-
}),
|
|
47
|
-
__metadata("design:type", Number)
|
|
48
|
-
], Permission.prototype, "status", void 0);
|
|
49
|
-
__decorate([
|
|
50
|
-
(0, typeorm_1.ManyToMany)(function () { return Role_1.Role; }),
|
|
51
|
-
(0, typeorm_1.JoinTable)({
|
|
52
|
-
name: 'role_permission',
|
|
53
|
-
}),
|
|
54
|
-
__metadata("design:type", Array)
|
|
55
|
-
], Permission.prototype, "roles", void 0);
|
|
56
|
-
Permission = __decorate([
|
|
57
|
-
(0, typeorm_1.Entity)('permission', {
|
|
58
|
-
comment: 'Permisos que va a tener cada rol.',
|
|
59
|
-
})
|
|
60
|
-
], Permission);
|
|
61
|
-
return Permission;
|
|
62
|
-
}());
|
|
63
|
-
exports.Permission = Permission;
|
|
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.Permission = void 0;
|
|
13
|
+
var typeorm_1 = require("typeorm");
|
|
14
|
+
var Role_1 = require("./Role");
|
|
15
|
+
var Permission = /** @class */ (function () {
|
|
16
|
+
function Permission() {
|
|
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
|
+
], Permission.prototype, "id", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.Column)({ length: 10, unique: true, comment: 'Código del permiso.' }),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], Permission.prototype, "code", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Column)({
|
|
30
|
+
length: 40,
|
|
31
|
+
comment: 'Id de la variable que se encuentra en los archivos `locale` para el multilenguaje.',
|
|
32
|
+
}),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], Permission.prototype, "name", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({
|
|
37
|
+
length: 40,
|
|
38
|
+
comment: 'Id de la variable que se encuentra en los archivos `locale` para el multilenguaje.',
|
|
39
|
+
}),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], Permission.prototype, "description", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.Column)({
|
|
44
|
+
default: 1,
|
|
45
|
+
comment: 'Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.',
|
|
46
|
+
}),
|
|
47
|
+
__metadata("design:type", Number)
|
|
48
|
+
], Permission.prototype, "status", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.ManyToMany)(function () { return Role_1.Role; }),
|
|
51
|
+
(0, typeorm_1.JoinTable)({
|
|
52
|
+
name: 'role_permission',
|
|
53
|
+
}),
|
|
54
|
+
__metadata("design:type", Array)
|
|
55
|
+
], Permission.prototype, "roles", void 0);
|
|
56
|
+
Permission = __decorate([
|
|
57
|
+
(0, typeorm_1.Entity)('permission', {
|
|
58
|
+
comment: 'Permisos que va a tener cada rol.',
|
|
59
|
+
})
|
|
60
|
+
], Permission);
|
|
61
|
+
return Permission;
|
|
62
|
+
}());
|
|
63
|
+
exports.Permission = Permission;
|
package/dist/entities/Role.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Permission } from './Permission';
|
|
2
|
-
import { RoleVisibleTo } from './RoleVisibleTo';
|
|
3
|
-
export declare class Role {
|
|
4
|
-
id: number;
|
|
5
|
-
code: string;
|
|
6
|
-
name: string;
|
|
7
|
-
description: string;
|
|
8
|
-
status: number;
|
|
9
|
-
permissions: Permission[];
|
|
10
|
-
rolesVisibleTo: RoleVisibleTo[];
|
|
11
|
-
visiblesTo: RoleVisibleTo[];
|
|
12
|
-
}
|
|
1
|
+
import { Permission } from './Permission';
|
|
2
|
+
import { RoleVisibleTo } from './RoleVisibleTo';
|
|
3
|
+
export declare class Role {
|
|
4
|
+
id: number;
|
|
5
|
+
code: string;
|
|
6
|
+
name: string;
|
|
7
|
+
description: string;
|
|
8
|
+
status: number;
|
|
9
|
+
permissions: Permission[];
|
|
10
|
+
rolesVisibleTo: RoleVisibleTo[];
|
|
11
|
+
visiblesTo: RoleVisibleTo[];
|
|
12
|
+
}
|
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
|
+
}
|