test-entity-library-asm 2.6.9 → 2.6.11
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/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/Partners.d.ts +1 -0
- package/dist/views/Partners.js +4 -0
- 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/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/src/views/Partners.ts +2 -0
|
@@ -13,11 +13,8 @@ export declare class Company {
|
|
|
13
13
|
city: City;
|
|
14
14
|
partner: Partner;
|
|
15
15
|
profile: any;
|
|
16
|
-
quantity_locals: number;
|
|
17
|
-
quantity_users: number;
|
|
18
16
|
legal_information: any;
|
|
19
17
|
legal_agent: any;
|
|
20
|
-
plan: Plan;
|
|
21
18
|
created: Date;
|
|
22
19
|
expiration: Date;
|
|
23
20
|
updated: Date;
|
|
@@ -28,4 +25,5 @@ export declare class Company {
|
|
|
28
25
|
product_toppings: ProductTopping[];
|
|
29
26
|
partners_company: Partner[];
|
|
30
27
|
roles_company: PartnerRole[];
|
|
28
|
+
plans_company: Plan[];
|
|
31
29
|
}
|
package/dist/entities/Company.js
CHANGED
|
@@ -63,20 +63,6 @@ var Company = /** @class */ (function () {
|
|
|
63
63
|
}),
|
|
64
64
|
__metadata("design:type", Object)
|
|
65
65
|
], Company.prototype, "profile", void 0);
|
|
66
|
-
__decorate([
|
|
67
|
-
(0, typeorm_1.Column)({
|
|
68
|
-
default: 1,
|
|
69
|
-
comment: 'Cantidad de locales qué la empresa de comida rápida puede tener por defecto, por defecto es un solo local.',
|
|
70
|
-
}),
|
|
71
|
-
__metadata("design:type", Number)
|
|
72
|
-
], Company.prototype, "quantity_locals", void 0);
|
|
73
|
-
__decorate([
|
|
74
|
-
(0, typeorm_1.Column)({
|
|
75
|
-
default: 6,
|
|
76
|
-
comment: 'La cantidad de usuarios que puede asociar a la empresa, es decir, si la empresa desea agregar cajeros, administradores para cada punto lo puede hacer. Por defecto, la cantidad de usuarios que puede tener la empresa es de 6.',
|
|
77
|
-
}),
|
|
78
|
-
__metadata("design:type", Number)
|
|
79
|
-
], Company.prototype, "quantity_users", void 0);
|
|
80
66
|
__decorate([
|
|
81
67
|
(0, typeorm_1.Column)({
|
|
82
68
|
type: 'longtext',
|
|
@@ -95,14 +81,6 @@ var Company = /** @class */ (function () {
|
|
|
95
81
|
}),
|
|
96
82
|
__metadata("design:type", Object)
|
|
97
83
|
], Company.prototype, "legal_agent", void 0);
|
|
98
|
-
__decorate([
|
|
99
|
-
(0, typeorm_1.ManyToOne)(function () { return Plan_1.Plan; }, function (plan) { return plan.companies; }, {
|
|
100
|
-
onDelete: 'RESTRICT',
|
|
101
|
-
onUpdate: 'RESTRICT',
|
|
102
|
-
}),
|
|
103
|
-
(0, typeorm_1.JoinColumn)({ name: 'plan' }),
|
|
104
|
-
__metadata("design:type", Plan_1.Plan)
|
|
105
|
-
], Company.prototype, "plan", void 0);
|
|
106
84
|
__decorate([
|
|
107
85
|
(0, typeorm_1.Column)({
|
|
108
86
|
type: 'datetime',
|
|
@@ -158,6 +136,10 @@ var Company = /** @class */ (function () {
|
|
|
158
136
|
(0, typeorm_1.OneToMany)(function () { return PartnerRole_1.PartnerRole; }, function (partnerRole) { return partnerRole.company; }),
|
|
159
137
|
__metadata("design:type", Array)
|
|
160
138
|
], Company.prototype, "roles_company", void 0);
|
|
139
|
+
__decorate([
|
|
140
|
+
(0, typeorm_1.OneToMany)(function () { return Plan_1.Plan; }, function (plan) { return plan.company; }),
|
|
141
|
+
__metadata("design:type", Array)
|
|
142
|
+
], Company.prototype, "plans_company", void 0);
|
|
161
143
|
Company = __decorate([
|
|
162
144
|
(0, typeorm_1.Entity)({
|
|
163
145
|
comment: 'Tabla creada para las empresas de comida rápida que deseen registrarse en la plataforma.',
|
package/dist/entities/Local.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { Terminal } from './Terminal';
|
|
|
10
10
|
import { User } from './User';
|
|
11
11
|
import { Partner } from './Partner';
|
|
12
12
|
import { BusinessTypeProduct } from './BusinessTypeProduct';
|
|
13
|
-
import { DiscountCodeUser, PosSystem } from '..';
|
|
13
|
+
import { DiscountCodeUser, LocalPlan, PosSystem } from '..';
|
|
14
14
|
export declare class Local {
|
|
15
15
|
id: number;
|
|
16
16
|
company: Company;
|
|
@@ -38,4 +38,5 @@ export declare class Local {
|
|
|
38
38
|
users_favorite_local: User[];
|
|
39
39
|
business_type_products: BusinessTypeProduct[];
|
|
40
40
|
discount_code_locals: DiscountCodeUser[];
|
|
41
|
+
locals_plan: LocalPlan[];
|
|
41
42
|
}
|
package/dist/entities/Local.js
CHANGED
|
@@ -126,7 +126,7 @@ var Local = /** @class */ (function () {
|
|
|
126
126
|
__decorate([
|
|
127
127
|
(0, typeorm_1.Column)({
|
|
128
128
|
default: 1,
|
|
129
|
-
comment: 'Es el estado para verificar si se
|
|
129
|
+
comment: 'Es el estado para verificar si se envía en la papelera o no.',
|
|
130
130
|
}),
|
|
131
131
|
__metadata("design:type", Number)
|
|
132
132
|
], Local.prototype, "visible", void 0);
|
|
@@ -198,6 +198,10 @@ var Local = /** @class */ (function () {
|
|
|
198
198
|
(0, typeorm_1.OneToMany)(function () { return __1.DiscountCodeUser; }, function (discountCodeUser) { return discountCodeUser.local; }),
|
|
199
199
|
__metadata("design:type", Array)
|
|
200
200
|
], Local.prototype, "discount_code_locals", void 0);
|
|
201
|
+
__decorate([
|
|
202
|
+
(0, typeorm_1.OneToMany)(function () { return __1.LocalPlan; }, function (localPlan) { return localPlan.local; }),
|
|
203
|
+
__metadata("design:type", Array)
|
|
204
|
+
], Local.prototype, "locals_plan", void 0);
|
|
201
205
|
Local = __decorate([
|
|
202
206
|
(0, typeorm_1.Entity)({ comment: 'Locales disponibles de las empresas (company).' })
|
|
203
207
|
], Local);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Local, Plan } from '..';
|
|
2
|
+
export declare class LocalPlan {
|
|
3
|
+
id: number;
|
|
4
|
+
plan: Plan;
|
|
5
|
+
local: Local;
|
|
6
|
+
type: number;
|
|
7
|
+
maximum_number_messages_ws: number;
|
|
8
|
+
messages_ws_price: number;
|
|
9
|
+
maximum_number_request_gpt: number;
|
|
10
|
+
request_gpt_price: number;
|
|
11
|
+
price: number;
|
|
12
|
+
profile: any;
|
|
13
|
+
start_date: Date;
|
|
14
|
+
end_date: Date;
|
|
15
|
+
status: number;
|
|
16
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
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.LocalPlan = void 0;
|
|
13
|
+
var typeorm_1 = require("typeorm");
|
|
14
|
+
var __1 = require("..");
|
|
15
|
+
var jsonTransformer_1 = require("../transformers/jsonTransformer");
|
|
16
|
+
var dateTransformer_1 = require("../transformers/dateTransformer");
|
|
17
|
+
var LocalPlan = /** @class */ (function () {
|
|
18
|
+
function LocalPlan() {
|
|
19
|
+
}
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
22
|
+
comment: 'Número de identificación (ID) único de cada registro.',
|
|
23
|
+
}),
|
|
24
|
+
__metadata("design:type", Number)
|
|
25
|
+
], LocalPlan.prototype, "id", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.ManyToOne)(function () { return __1.Plan; }, function (plan) { return plan.local_plans; }, {
|
|
28
|
+
onDelete: 'CASCADE',
|
|
29
|
+
onUpdate: 'NO ACTION',
|
|
30
|
+
}),
|
|
31
|
+
(0, typeorm_1.JoinColumn)({ name: 'plan' }),
|
|
32
|
+
__metadata("design:type", __1.Plan)
|
|
33
|
+
], LocalPlan.prototype, "plan", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.ManyToOne)(function () { return __1.Local; }, function (local) { return local.locals_plan; }, {
|
|
36
|
+
onDelete: 'CASCADE',
|
|
37
|
+
onUpdate: 'NO ACTION',
|
|
38
|
+
}),
|
|
39
|
+
(0, typeorm_1.JoinColumn)({ name: 'local' }),
|
|
40
|
+
__metadata("design:type", __1.Local)
|
|
41
|
+
], LocalPlan.prototype, "local", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.Column)({
|
|
44
|
+
default: 0,
|
|
45
|
+
comment: 'Valor de tipo numérico para saber sí el local tiene el plan mensual o anual:\n\n 1. Mensual. \n\n2. Anual.',
|
|
46
|
+
}),
|
|
47
|
+
__metadata("design:type", Number)
|
|
48
|
+
], LocalPlan.prototype, "type", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.Column)({
|
|
51
|
+
nullable: true,
|
|
52
|
+
comment: 'Cantidad máxima de mensajes por el chatbot de whatsapp.',
|
|
53
|
+
}),
|
|
54
|
+
__metadata("design:type", Number)
|
|
55
|
+
], LocalPlan.prototype, "maximum_number_messages_ws", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.Column)({
|
|
58
|
+
nullable: true,
|
|
59
|
+
comment: 'Precio por el uso de chatbot de whatsapp.',
|
|
60
|
+
}),
|
|
61
|
+
__metadata("design:type", Number)
|
|
62
|
+
], LocalPlan.prototype, "messages_ws_price", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, typeorm_1.Column)({
|
|
65
|
+
nullable: true,
|
|
66
|
+
comment: 'Cantidad máxima de solicitudes para el uso de GPT`s.',
|
|
67
|
+
}),
|
|
68
|
+
__metadata("design:type", Number)
|
|
69
|
+
], LocalPlan.prototype, "maximum_number_request_gpt", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, typeorm_1.Column)({
|
|
72
|
+
nullable: true,
|
|
73
|
+
comment: 'Precio por el uso de gpt`s.',
|
|
74
|
+
}),
|
|
75
|
+
__metadata("design:type", Number)
|
|
76
|
+
], LocalPlan.prototype, "request_gpt_price", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, typeorm_1.Column)({
|
|
79
|
+
comment: 'Precio por el plan del local.',
|
|
80
|
+
}),
|
|
81
|
+
__metadata("design:type", Number)
|
|
82
|
+
], LocalPlan.prototype, "price", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, typeorm_1.Column)({
|
|
85
|
+
type: 'mediumtext',
|
|
86
|
+
nullable: true,
|
|
87
|
+
transformer: jsonTransformer_1.jsonTransformer,
|
|
88
|
+
comment: 'Por si necesitamos agregar más elementos a la tabla. \n\nEsto se comporta como un Objeto guardado en la columna.',
|
|
89
|
+
}),
|
|
90
|
+
__metadata("design:type", Object)
|
|
91
|
+
], LocalPlan.prototype, "profile", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, typeorm_1.Column)({
|
|
94
|
+
type: 'datetime',
|
|
95
|
+
transformer: new dateTransformer_1.DateTransformer(),
|
|
96
|
+
comment: 'Fecha de creación del registro.',
|
|
97
|
+
}),
|
|
98
|
+
__metadata("design:type", Date)
|
|
99
|
+
], LocalPlan.prototype, "start_date", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, typeorm_1.Column)({
|
|
102
|
+
type: 'datetime',
|
|
103
|
+
transformer: new dateTransformer_1.DateTransformer(),
|
|
104
|
+
comment: 'Fecha de creación del registro.',
|
|
105
|
+
}),
|
|
106
|
+
__metadata("design:type", Date)
|
|
107
|
+
], LocalPlan.prototype, "end_date", void 0);
|
|
108
|
+
__decorate([
|
|
109
|
+
(0, typeorm_1.Column)({
|
|
110
|
+
default: 1,
|
|
111
|
+
comment: '¿El master tiene acceso a la plataforma?:\r\n1. Activo: El master tiene acceso.\r\n0. Inactivo: El master no tiene acceso a la plataforma.',
|
|
112
|
+
}),
|
|
113
|
+
__metadata("design:type", Number)
|
|
114
|
+
], LocalPlan.prototype, "status", void 0);
|
|
115
|
+
LocalPlan = __decorate([
|
|
116
|
+
(0, typeorm_1.Entity)({
|
|
117
|
+
name: 'local_plan',
|
|
118
|
+
comment: 'Tabla para el manejo de los planes de los locales.',
|
|
119
|
+
})
|
|
120
|
+
], LocalPlan);
|
|
121
|
+
return LocalPlan;
|
|
122
|
+
}());
|
|
123
|
+
exports.LocalPlan = LocalPlan;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
+
import { MasterNotification, ReassignReview, VerifyLocal } from '..';
|
|
1
2
|
import { City } from './City';
|
|
2
3
|
import { DiscountCodeCompany } from './DiscountCodeCompany';
|
|
3
4
|
import { MasterRole } from './MasterRole';
|
|
4
|
-
import { Plan } from './Plan';
|
|
5
|
-
import { MasterNotification, ReassignReview, VerifyLocal } from '..';
|
|
6
5
|
export declare class Master {
|
|
7
6
|
id: number;
|
|
8
7
|
code: string;
|
|
@@ -21,7 +20,6 @@ export declare class Master {
|
|
|
21
20
|
visible: number;
|
|
22
21
|
discount_code_companies: DiscountCodeCompany[];
|
|
23
22
|
masters_roles: MasterRole[];
|
|
24
|
-
plans: Plan[];
|
|
25
23
|
verifyLocals: VerifyLocal[];
|
|
26
24
|
master_notifications: MasterNotification[];
|
|
27
25
|
reassign_reviews: ReassignReview[];
|
package/dist/entities/Master.js
CHANGED
|
@@ -11,13 +11,12 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Master = void 0;
|
|
13
13
|
var typeorm_1 = require("typeorm");
|
|
14
|
+
var __1 = require("..");
|
|
15
|
+
var dateTransformer_1 = require("../transformers/dateTransformer");
|
|
16
|
+
var jsonTransformer_1 = require("../transformers/jsonTransformer");
|
|
14
17
|
var City_1 = require("./City");
|
|
15
18
|
var DiscountCodeCompany_1 = require("./DiscountCodeCompany");
|
|
16
19
|
var MasterRole_1 = require("./MasterRole");
|
|
17
|
-
var Plan_1 = require("./Plan");
|
|
18
|
-
var jsonTransformer_1 = require("../transformers/jsonTransformer");
|
|
19
|
-
var dateTransformer_1 = require("../transformers/dateTransformer");
|
|
20
|
-
var __1 = require("..");
|
|
21
20
|
var Master = /** @class */ (function () {
|
|
22
21
|
function Master() {
|
|
23
22
|
}
|
|
@@ -118,7 +117,7 @@ var Master = /** @class */ (function () {
|
|
|
118
117
|
__decorate([
|
|
119
118
|
(0, typeorm_1.Column)({
|
|
120
119
|
default: 1,
|
|
121
|
-
comment: 'Es el estado para verificar si se
|
|
120
|
+
comment: 'Es el estado para verificar si se envía en la papelera o no.',
|
|
122
121
|
}),
|
|
123
122
|
__metadata("design:type", Number)
|
|
124
123
|
], Master.prototype, "visible", void 0);
|
|
@@ -141,10 +140,6 @@ var Master = /** @class */ (function () {
|
|
|
141
140
|
}),
|
|
142
141
|
__metadata("design:type", Array)
|
|
143
142
|
], Master.prototype, "masters_roles", void 0);
|
|
144
|
-
__decorate([
|
|
145
|
-
(0, typeorm_1.OneToMany)(function () { return Plan_1.Plan; }, function (plan) { return plan.created_by; }),
|
|
146
|
-
__metadata("design:type", Array)
|
|
147
|
-
], Master.prototype, "plans", void 0);
|
|
148
143
|
__decorate([
|
|
149
144
|
(0, typeorm_1.OneToMany)(function () { return __1.VerifyLocal; }, function (verifyLocal) { return verifyLocal.partner; }),
|
|
150
145
|
__metadata("design:type", Array)
|
|
@@ -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/Plan.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Company } from './Company';
|
|
2
|
-
import {
|
|
2
|
+
import { LocalPlan } from '..';
|
|
3
3
|
export declare class Plan {
|
|
4
4
|
id: number;
|
|
5
5
|
code: string;
|
|
6
|
+
company: Company;
|
|
6
7
|
name: string;
|
|
7
8
|
description: string;
|
|
8
|
-
|
|
9
|
+
quantity_locals: number;
|
|
9
10
|
created: Date;
|
|
10
11
|
expiration: Date;
|
|
11
|
-
created_by: Master;
|
|
12
12
|
status: number;
|
|
13
|
-
|
|
13
|
+
local_plans: LocalPlan[];
|
|
14
14
|
}
|
package/dist/entities/Plan.js
CHANGED
|
@@ -12,7 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.Plan = void 0;
|
|
13
13
|
var typeorm_1 = require("typeorm");
|
|
14
14
|
var Company_1 = require("./Company");
|
|
15
|
-
var
|
|
15
|
+
var __1 = require("..");
|
|
16
16
|
var Plan = /** @class */ (function () {
|
|
17
17
|
function Plan() {
|
|
18
18
|
}
|
|
@@ -26,6 +26,14 @@ var Plan = /** @class */ (function () {
|
|
|
26
26
|
(0, typeorm_1.Column)({ length: 20, unique: true, comment: 'Código del plan.' }),
|
|
27
27
|
__metadata("design:type", String)
|
|
28
28
|
], Plan.prototype, "code", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.ManyToOne)(function () { return Company_1.Company; }, function (company) { return company.plans_company; }, {
|
|
31
|
+
onDelete: 'CASCADE',
|
|
32
|
+
onUpdate: 'NO ACTION',
|
|
33
|
+
}),
|
|
34
|
+
(0, typeorm_1.JoinColumn)({ name: 'company' }),
|
|
35
|
+
__metadata("design:type", Company_1.Company)
|
|
36
|
+
], Plan.prototype, "company", void 0);
|
|
29
37
|
__decorate([
|
|
30
38
|
(0, typeorm_1.Column)({
|
|
31
39
|
length: 50,
|
|
@@ -42,12 +50,9 @@ var Plan = /** @class */ (function () {
|
|
|
42
50
|
__metadata("design:type", String)
|
|
43
51
|
], Plan.prototype, "description", void 0);
|
|
44
52
|
__decorate([
|
|
45
|
-
(0, typeorm_1.Column)(
|
|
46
|
-
default: 0,
|
|
47
|
-
comment: 'Con este campo sabemos sí el plan es o no es personalizado para una empresa en específico.\r\n1. Personalizado.\r\n0. No personalizado.',
|
|
48
|
-
}),
|
|
53
|
+
(0, typeorm_1.Column)(),
|
|
49
54
|
__metadata("design:type", Number)
|
|
50
|
-
], Plan.prototype, "
|
|
55
|
+
], Plan.prototype, "quantity_locals", void 0);
|
|
51
56
|
__decorate([
|
|
52
57
|
(0, typeorm_1.Column)({ type: 'datetime', comment: 'Fecha de creación del registro.' }),
|
|
53
58
|
__metadata("design:type", Date)
|
|
@@ -56,15 +61,6 @@ var Plan = /** @class */ (function () {
|
|
|
56
61
|
(0, typeorm_1.Column)({ type: 'date', comment: 'Fecha de expiración del registro.' }),
|
|
57
62
|
__metadata("design:type", Date)
|
|
58
63
|
], Plan.prototype, "expiration", void 0);
|
|
59
|
-
__decorate([
|
|
60
|
-
(0, typeorm_1.ManyToOne)(function () { return Master_1.Master; }, function (user) { return user.plans; }, {
|
|
61
|
-
nullable: true,
|
|
62
|
-
onDelete: 'RESTRICT',
|
|
63
|
-
onUpdate: 'NO ACTION',
|
|
64
|
-
}),
|
|
65
|
-
(0, typeorm_1.JoinColumn)({ name: 'created_by' }),
|
|
66
|
-
__metadata("design:type", Master_1.Master)
|
|
67
|
-
], Plan.prototype, "created_by", void 0);
|
|
68
64
|
__decorate([
|
|
69
65
|
(0, typeorm_1.Column)({
|
|
70
66
|
default: 1,
|
|
@@ -73,9 +69,9 @@ var Plan = /** @class */ (function () {
|
|
|
73
69
|
__metadata("design:type", Number)
|
|
74
70
|
], Plan.prototype, "status", void 0);
|
|
75
71
|
__decorate([
|
|
76
|
-
(0, typeorm_1.OneToMany)(function () { return
|
|
72
|
+
(0, typeorm_1.OneToMany)(function () { return __1.LocalPlan; }, function (localPlan) { return localPlan.plan; }),
|
|
77
73
|
__metadata("design:type", Array)
|
|
78
|
-
], Plan.prototype, "
|
|
74
|
+
], Plan.prototype, "local_plans", void 0);
|
|
79
75
|
Plan = __decorate([
|
|
80
76
|
(0, typeorm_1.Entity)({
|
|
81
77
|
comment: 'Planes que tendrá la plataforma para las empresas (company)',
|
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
|
+
}
|