test-entity-library-asm 2.6.10 → 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/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
|
@@ -1,187 +1,187 @@
|
|
|
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.UserInformation = void 0;
|
|
13
|
-
var typeorm_1 = require("typeorm");
|
|
14
|
-
var moment = require("moment-timezone");
|
|
15
|
-
var __1 = require("..");
|
|
16
|
-
// JSON Transformer
|
|
17
|
-
var jsonTransformer = {
|
|
18
|
-
to: function (value) { return JSON.stringify(value); },
|
|
19
|
-
from: function (value) { return JSON.parse(value); },
|
|
20
|
-
};
|
|
21
|
-
var DateTransformer = {
|
|
22
|
-
to: function (value) {
|
|
23
|
-
return moment.utc(value).format("YYYY-MM-DD HH:mm:ss");
|
|
24
|
-
},
|
|
25
|
-
from: function (value) {
|
|
26
|
-
return moment.utc(value).tz((0, __1.getTimeZone)()).format("YYYY-MM-DD HH:mm:ss");
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
var UserInformation = /** @class */ (function () {
|
|
30
|
-
function UserInformation() {
|
|
31
|
-
}
|
|
32
|
-
__decorate([
|
|
33
|
-
(0, typeorm_1.ViewColumn)(),
|
|
34
|
-
__metadata("design:type", Number)
|
|
35
|
-
], UserInformation.prototype, "id", void 0);
|
|
36
|
-
__decorate([
|
|
37
|
-
(0, typeorm_1.ViewColumn)(),
|
|
38
|
-
__metadata("design:type", Number)
|
|
39
|
-
], UserInformation.prototype, "company", void 0);
|
|
40
|
-
__decorate([
|
|
41
|
-
(0, typeorm_1.ViewColumn)(),
|
|
42
|
-
__metadata("design:type", String)
|
|
43
|
-
], UserInformation.prototype, "code", void 0);
|
|
44
|
-
__decorate([
|
|
45
|
-
(0, typeorm_1.ViewColumn)(),
|
|
46
|
-
__metadata("design:type", String)
|
|
47
|
-
], UserInformation.prototype, "document", void 0);
|
|
48
|
-
__decorate([
|
|
49
|
-
(0, typeorm_1.ViewColumn)(),
|
|
50
|
-
__metadata("design:type", String)
|
|
51
|
-
], UserInformation.prototype, "name", void 0);
|
|
52
|
-
__decorate([
|
|
53
|
-
(0, typeorm_1.ViewColumn)(),
|
|
54
|
-
__metadata("design:type", String)
|
|
55
|
-
], UserInformation.prototype, "surname", void 0);
|
|
56
|
-
__decorate([
|
|
57
|
-
(0, typeorm_1.ViewColumn)(),
|
|
58
|
-
__metadata("design:type", String)
|
|
59
|
-
], UserInformation.prototype, "email", void 0);
|
|
60
|
-
__decorate([
|
|
61
|
-
(0, typeorm_1.ViewColumn)(),
|
|
62
|
-
__metadata("design:type", String)
|
|
63
|
-
], UserInformation.prototype, "phone", void 0);
|
|
64
|
-
__decorate([
|
|
65
|
-
(0, typeorm_1.ViewColumn)(),
|
|
66
|
-
__metadata("design:type", Number)
|
|
67
|
-
], UserInformation.prototype, "city", void 0);
|
|
68
|
-
__decorate([
|
|
69
|
-
(0, typeorm_1.ViewColumn)(),
|
|
70
|
-
__metadata("design:type", String)
|
|
71
|
-
], UserInformation.prototype, "address", void 0);
|
|
72
|
-
__decorate([
|
|
73
|
-
(0, typeorm_1.ViewColumn)(),
|
|
74
|
-
__metadata("design:type", String)
|
|
75
|
-
], UserInformation.prototype, "password", void 0);
|
|
76
|
-
__decorate([
|
|
77
|
-
(0, typeorm_1.ViewColumn)({ transformer: jsonTransformer }),
|
|
78
|
-
__metadata("design:type", Object)
|
|
79
|
-
], UserInformation.prototype, "profile", void 0);
|
|
80
|
-
__decorate([
|
|
81
|
-
(0, typeorm_1.ViewColumn)(),
|
|
82
|
-
__metadata("design:type", Number)
|
|
83
|
-
], UserInformation.prototype, "owner", void 0);
|
|
84
|
-
__decorate([
|
|
85
|
-
(0, typeorm_1.ViewColumn)({ transformer: DateTransformer }),
|
|
86
|
-
__metadata("design:type", String)
|
|
87
|
-
], UserInformation.prototype, "created", void 0);
|
|
88
|
-
__decorate([
|
|
89
|
-
(0, typeorm_1.ViewColumn)({ transformer: DateTransformer }),
|
|
90
|
-
__metadata("design:type", String)
|
|
91
|
-
], UserInformation.prototype, "updated", void 0);
|
|
92
|
-
__decorate([
|
|
93
|
-
(0, typeorm_1.ViewColumn)(),
|
|
94
|
-
__metadata("design:type", Number)
|
|
95
|
-
], UserInformation.prototype, "status", void 0);
|
|
96
|
-
__decorate([
|
|
97
|
-
(0, typeorm_1.ViewColumn)(),
|
|
98
|
-
__metadata("design:type", Number)
|
|
99
|
-
], UserInformation.prototype, "visible", void 0);
|
|
100
|
-
__decorate([
|
|
101
|
-
(0, typeorm_1.ViewColumn)(),
|
|
102
|
-
__metadata("design:type", Number)
|
|
103
|
-
], UserInformation.prototype, "region", void 0);
|
|
104
|
-
__decorate([
|
|
105
|
-
(0, typeorm_1.ViewColumn)(),
|
|
106
|
-
__metadata("design:type", String)
|
|
107
|
-
], UserInformation.prototype, "name_city", void 0);
|
|
108
|
-
__decorate([
|
|
109
|
-
(0, typeorm_1.ViewColumn)(),
|
|
110
|
-
__metadata("design:type", Number)
|
|
111
|
-
], UserInformation.prototype, "status_city", void 0);
|
|
112
|
-
__decorate([
|
|
113
|
-
(0, typeorm_1.ViewColumn)(),
|
|
114
|
-
__metadata("design:type", String)
|
|
115
|
-
], UserInformation.prototype, "code_company", void 0);
|
|
116
|
-
__decorate([
|
|
117
|
-
(0, typeorm_1.ViewColumn)(),
|
|
118
|
-
__metadata("design:type", String)
|
|
119
|
-
], UserInformation.prototype, "name_company", void 0);
|
|
120
|
-
__decorate([
|
|
121
|
-
(0, typeorm_1.ViewColumn)(),
|
|
122
|
-
__metadata("design:type", Number)
|
|
123
|
-
], UserInformation.prototype, "city_company", void 0);
|
|
124
|
-
__decorate([
|
|
125
|
-
(0, typeorm_1.ViewColumn)(),
|
|
126
|
-
__metadata("design:type", Number)
|
|
127
|
-
], UserInformation.prototype, "partner", void 0);
|
|
128
|
-
__decorate([
|
|
129
|
-
(0, typeorm_1.ViewColumn)({ transformer: jsonTransformer }),
|
|
130
|
-
__metadata("design:type", Object)
|
|
131
|
-
], UserInformation.prototype, "profile_company", void 0);
|
|
132
|
-
__decorate([
|
|
133
|
-
(0, typeorm_1.ViewColumn)(),
|
|
134
|
-
__metadata("design:type", Number)
|
|
135
|
-
], UserInformation.prototype, "quantity_locals", void 0);
|
|
136
|
-
__decorate([
|
|
137
|
-
(0, typeorm_1.ViewColumn)(),
|
|
138
|
-
__metadata("design:type", Number)
|
|
139
|
-
], UserInformation.prototype, "quantity_users", void 0);
|
|
140
|
-
__decorate([
|
|
141
|
-
(0, typeorm_1.ViewColumn)({ transformer: jsonTransformer }),
|
|
142
|
-
__metadata("design:type", Object)
|
|
143
|
-
], UserInformation.prototype, "legal_information", void 0);
|
|
144
|
-
__decorate([
|
|
145
|
-
(0, typeorm_1.ViewColumn)({ transformer: jsonTransformer }),
|
|
146
|
-
__metadata("design:type", Object)
|
|
147
|
-
], UserInformation.prototype, "legal_agent", void 0);
|
|
148
|
-
__decorate([
|
|
149
|
-
(0, typeorm_1.ViewColumn)(),
|
|
150
|
-
__metadata("design:type", Number)
|
|
151
|
-
], UserInformation.prototype, "plan", void 0);
|
|
152
|
-
__decorate([
|
|
153
|
-
(0, typeorm_1.ViewColumn)({ transformer: DateTransformer }),
|
|
154
|
-
__metadata("design:type", String)
|
|
155
|
-
], UserInformation.prototype, "created_company", void 0);
|
|
156
|
-
__decorate([
|
|
157
|
-
(0, typeorm_1.ViewColumn)({ transformer: DateTransformer }),
|
|
158
|
-
__metadata("design:type", String)
|
|
159
|
-
], UserInformation.prototype, "expiration_company", void 0);
|
|
160
|
-
__decorate([
|
|
161
|
-
(0, typeorm_1.ViewColumn)({ transformer: DateTransformer }),
|
|
162
|
-
__metadata("design:type", String)
|
|
163
|
-
], UserInformation.prototype, "updated_company", void 0);
|
|
164
|
-
__decorate([
|
|
165
|
-
(0, typeorm_1.ViewColumn)(),
|
|
166
|
-
__metadata("design:type", Number)
|
|
167
|
-
], UserInformation.prototype, "status_company", void 0);
|
|
168
|
-
__decorate([
|
|
169
|
-
(0, typeorm_1.ViewColumn)({ transformer: jsonTransformer }),
|
|
170
|
-
__metadata("design:type", Object)
|
|
171
|
-
], UserInformation.prototype, "locals_asigned", void 0);
|
|
172
|
-
__decorate([
|
|
173
|
-
(0, typeorm_1.ViewColumn)({ transformer: jsonTransformer }),
|
|
174
|
-
__metadata("design:type", Object)
|
|
175
|
-
], UserInformation.prototype, "roles_asigned", void 0);
|
|
176
|
-
__decorate([
|
|
177
|
-
(0, typeorm_1.ViewColumn)({ transformer: jsonTransformer }),
|
|
178
|
-
__metadata("design:type", Object)
|
|
179
|
-
], UserInformation.prototype, "terminals_asigned", void 0);
|
|
180
|
-
UserInformation = __decorate([
|
|
181
|
-
(0, typeorm_1.ViewEntity)({
|
|
182
|
-
name: "user_information",
|
|
183
|
-
})
|
|
184
|
-
], UserInformation);
|
|
185
|
-
return UserInformation;
|
|
186
|
-
}());
|
|
187
|
-
exports.UserInformation = UserInformation;
|
|
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.UserInformation = void 0;
|
|
13
|
+
var typeorm_1 = require("typeorm");
|
|
14
|
+
var moment = require("moment-timezone");
|
|
15
|
+
var __1 = require("..");
|
|
16
|
+
// JSON Transformer
|
|
17
|
+
var jsonTransformer = {
|
|
18
|
+
to: function (value) { return JSON.stringify(value); },
|
|
19
|
+
from: function (value) { return JSON.parse(value); },
|
|
20
|
+
};
|
|
21
|
+
var DateTransformer = {
|
|
22
|
+
to: function (value) {
|
|
23
|
+
return moment.utc(value).format("YYYY-MM-DD HH:mm:ss");
|
|
24
|
+
},
|
|
25
|
+
from: function (value) {
|
|
26
|
+
return moment.utc(value).tz((0, __1.getTimeZone)()).format("YYYY-MM-DD HH:mm:ss");
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
var UserInformation = /** @class */ (function () {
|
|
30
|
+
function UserInformation() {
|
|
31
|
+
}
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.ViewColumn)(),
|
|
34
|
+
__metadata("design:type", Number)
|
|
35
|
+
], UserInformation.prototype, "id", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.ViewColumn)(),
|
|
38
|
+
__metadata("design:type", Number)
|
|
39
|
+
], UserInformation.prototype, "company", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.ViewColumn)(),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], UserInformation.prototype, "code", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.ViewColumn)(),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], UserInformation.prototype, "document", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.ViewColumn)(),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], UserInformation.prototype, "name", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.ViewColumn)(),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], UserInformation.prototype, "surname", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.ViewColumn)(),
|
|
58
|
+
__metadata("design:type", String)
|
|
59
|
+
], UserInformation.prototype, "email", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, typeorm_1.ViewColumn)(),
|
|
62
|
+
__metadata("design:type", String)
|
|
63
|
+
], UserInformation.prototype, "phone", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, typeorm_1.ViewColumn)(),
|
|
66
|
+
__metadata("design:type", Number)
|
|
67
|
+
], UserInformation.prototype, "city", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, typeorm_1.ViewColumn)(),
|
|
70
|
+
__metadata("design:type", String)
|
|
71
|
+
], UserInformation.prototype, "address", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, typeorm_1.ViewColumn)(),
|
|
74
|
+
__metadata("design:type", String)
|
|
75
|
+
], UserInformation.prototype, "password", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, typeorm_1.ViewColumn)({ transformer: jsonTransformer }),
|
|
78
|
+
__metadata("design:type", Object)
|
|
79
|
+
], UserInformation.prototype, "profile", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, typeorm_1.ViewColumn)(),
|
|
82
|
+
__metadata("design:type", Number)
|
|
83
|
+
], UserInformation.prototype, "owner", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, typeorm_1.ViewColumn)({ transformer: DateTransformer }),
|
|
86
|
+
__metadata("design:type", String)
|
|
87
|
+
], UserInformation.prototype, "created", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, typeorm_1.ViewColumn)({ transformer: DateTransformer }),
|
|
90
|
+
__metadata("design:type", String)
|
|
91
|
+
], UserInformation.prototype, "updated", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, typeorm_1.ViewColumn)(),
|
|
94
|
+
__metadata("design:type", Number)
|
|
95
|
+
], UserInformation.prototype, "status", void 0);
|
|
96
|
+
__decorate([
|
|
97
|
+
(0, typeorm_1.ViewColumn)(),
|
|
98
|
+
__metadata("design:type", Number)
|
|
99
|
+
], UserInformation.prototype, "visible", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, typeorm_1.ViewColumn)(),
|
|
102
|
+
__metadata("design:type", Number)
|
|
103
|
+
], UserInformation.prototype, "region", void 0);
|
|
104
|
+
__decorate([
|
|
105
|
+
(0, typeorm_1.ViewColumn)(),
|
|
106
|
+
__metadata("design:type", String)
|
|
107
|
+
], UserInformation.prototype, "name_city", void 0);
|
|
108
|
+
__decorate([
|
|
109
|
+
(0, typeorm_1.ViewColumn)(),
|
|
110
|
+
__metadata("design:type", Number)
|
|
111
|
+
], UserInformation.prototype, "status_city", void 0);
|
|
112
|
+
__decorate([
|
|
113
|
+
(0, typeorm_1.ViewColumn)(),
|
|
114
|
+
__metadata("design:type", String)
|
|
115
|
+
], UserInformation.prototype, "code_company", void 0);
|
|
116
|
+
__decorate([
|
|
117
|
+
(0, typeorm_1.ViewColumn)(),
|
|
118
|
+
__metadata("design:type", String)
|
|
119
|
+
], UserInformation.prototype, "name_company", void 0);
|
|
120
|
+
__decorate([
|
|
121
|
+
(0, typeorm_1.ViewColumn)(),
|
|
122
|
+
__metadata("design:type", Number)
|
|
123
|
+
], UserInformation.prototype, "city_company", void 0);
|
|
124
|
+
__decorate([
|
|
125
|
+
(0, typeorm_1.ViewColumn)(),
|
|
126
|
+
__metadata("design:type", Number)
|
|
127
|
+
], UserInformation.prototype, "partner", void 0);
|
|
128
|
+
__decorate([
|
|
129
|
+
(0, typeorm_1.ViewColumn)({ transformer: jsonTransformer }),
|
|
130
|
+
__metadata("design:type", Object)
|
|
131
|
+
], UserInformation.prototype, "profile_company", void 0);
|
|
132
|
+
__decorate([
|
|
133
|
+
(0, typeorm_1.ViewColumn)(),
|
|
134
|
+
__metadata("design:type", Number)
|
|
135
|
+
], UserInformation.prototype, "quantity_locals", void 0);
|
|
136
|
+
__decorate([
|
|
137
|
+
(0, typeorm_1.ViewColumn)(),
|
|
138
|
+
__metadata("design:type", Number)
|
|
139
|
+
], UserInformation.prototype, "quantity_users", void 0);
|
|
140
|
+
__decorate([
|
|
141
|
+
(0, typeorm_1.ViewColumn)({ transformer: jsonTransformer }),
|
|
142
|
+
__metadata("design:type", Object)
|
|
143
|
+
], UserInformation.prototype, "legal_information", void 0);
|
|
144
|
+
__decorate([
|
|
145
|
+
(0, typeorm_1.ViewColumn)({ transformer: jsonTransformer }),
|
|
146
|
+
__metadata("design:type", Object)
|
|
147
|
+
], UserInformation.prototype, "legal_agent", void 0);
|
|
148
|
+
__decorate([
|
|
149
|
+
(0, typeorm_1.ViewColumn)(),
|
|
150
|
+
__metadata("design:type", Number)
|
|
151
|
+
], UserInformation.prototype, "plan", void 0);
|
|
152
|
+
__decorate([
|
|
153
|
+
(0, typeorm_1.ViewColumn)({ transformer: DateTransformer }),
|
|
154
|
+
__metadata("design:type", String)
|
|
155
|
+
], UserInformation.prototype, "created_company", void 0);
|
|
156
|
+
__decorate([
|
|
157
|
+
(0, typeorm_1.ViewColumn)({ transformer: DateTransformer }),
|
|
158
|
+
__metadata("design:type", String)
|
|
159
|
+
], UserInformation.prototype, "expiration_company", void 0);
|
|
160
|
+
__decorate([
|
|
161
|
+
(0, typeorm_1.ViewColumn)({ transformer: DateTransformer }),
|
|
162
|
+
__metadata("design:type", String)
|
|
163
|
+
], UserInformation.prototype, "updated_company", void 0);
|
|
164
|
+
__decorate([
|
|
165
|
+
(0, typeorm_1.ViewColumn)(),
|
|
166
|
+
__metadata("design:type", Number)
|
|
167
|
+
], UserInformation.prototype, "status_company", void 0);
|
|
168
|
+
__decorate([
|
|
169
|
+
(0, typeorm_1.ViewColumn)({ transformer: jsonTransformer }),
|
|
170
|
+
__metadata("design:type", Object)
|
|
171
|
+
], UserInformation.prototype, "locals_asigned", void 0);
|
|
172
|
+
__decorate([
|
|
173
|
+
(0, typeorm_1.ViewColumn)({ transformer: jsonTransformer }),
|
|
174
|
+
__metadata("design:type", Object)
|
|
175
|
+
], UserInformation.prototype, "roles_asigned", void 0);
|
|
176
|
+
__decorate([
|
|
177
|
+
(0, typeorm_1.ViewColumn)({ transformer: jsonTransformer }),
|
|
178
|
+
__metadata("design:type", Object)
|
|
179
|
+
], UserInformation.prototype, "terminals_asigned", void 0);
|
|
180
|
+
UserInformation = __decorate([
|
|
181
|
+
(0, typeorm_1.ViewEntity)({
|
|
182
|
+
name: "user_information",
|
|
183
|
+
})
|
|
184
|
+
], UserInformation);
|
|
185
|
+
return UserInformation;
|
|
186
|
+
}());
|
|
187
|
+
exports.UserInformation = UserInformation;
|
package/package.json
CHANGED
package/src/entities/Company.ts
CHANGED
|
@@ -56,20 +56,6 @@ export class Company {
|
|
|
56
56
|
})
|
|
57
57
|
profile: any
|
|
58
58
|
|
|
59
|
-
@Column({
|
|
60
|
-
default: 1,
|
|
61
|
-
comment:
|
|
62
|
-
'Cantidad de locales qué la empresa de comida rápida puede tener por defecto, por defecto es un solo local.',
|
|
63
|
-
})
|
|
64
|
-
quantity_locals: number
|
|
65
|
-
|
|
66
|
-
@Column({
|
|
67
|
-
default: 6,
|
|
68
|
-
comment:
|
|
69
|
-
'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.',
|
|
70
|
-
})
|
|
71
|
-
quantity_users: number
|
|
72
|
-
|
|
73
59
|
@Column({
|
|
74
60
|
type: 'longtext',
|
|
75
61
|
nullable: true,
|
|
@@ -88,13 +74,6 @@ export class Company {
|
|
|
88
74
|
})
|
|
89
75
|
legal_agent: any
|
|
90
76
|
|
|
91
|
-
@ManyToOne(() => Plan, (plan) => plan.companies, {
|
|
92
|
-
onDelete: 'RESTRICT',
|
|
93
|
-
onUpdate: 'RESTRICT',
|
|
94
|
-
})
|
|
95
|
-
@JoinColumn({ name: 'plan' })
|
|
96
|
-
plan: Plan
|
|
97
|
-
|
|
98
77
|
@Column({
|
|
99
78
|
type: 'datetime',
|
|
100
79
|
transformer: new DateTransformer(),
|
|
@@ -146,4 +125,7 @@ export class Company {
|
|
|
146
125
|
|
|
147
126
|
@OneToMany(() => PartnerRole, (partnerRole) => partnerRole.company)
|
|
148
127
|
roles_company: PartnerRole[]
|
|
128
|
+
|
|
129
|
+
@OneToMany(() => Plan, (plan) => plan.company)
|
|
130
|
+
plans_company: Plan[]
|
|
149
131
|
}
|
package/src/entities/Local.ts
CHANGED
|
@@ -20,7 +20,7 @@ import { Terminal } from './Terminal'
|
|
|
20
20
|
import { User } from './User'
|
|
21
21
|
import { Partner } from './Partner'
|
|
22
22
|
import { BusinessTypeProduct } from './BusinessTypeProduct'
|
|
23
|
-
import { DiscountCodeUser, PosSystem } from '..'
|
|
23
|
+
import { DiscountCodeUser, LocalPlan, PosSystem } from '..'
|
|
24
24
|
import { jsonTransformer } from '../transformers/jsonTransformer'
|
|
25
25
|
|
|
26
26
|
@Entity({ comment: 'Locales disponibles de las empresas (company).' })
|
|
@@ -110,8 +110,7 @@ export class Local {
|
|
|
110
110
|
|
|
111
111
|
@Column({
|
|
112
112
|
default: 1,
|
|
113
|
-
comment:
|
|
114
|
-
'Es el estado para verificar si se envia en la papelara o no.',
|
|
113
|
+
comment: 'Es el estado para verificar si se envía en la papelera o no.',
|
|
115
114
|
})
|
|
116
115
|
visible: number
|
|
117
116
|
|
|
@@ -173,7 +172,12 @@ export class Local {
|
|
|
173
172
|
})
|
|
174
173
|
business_type_products: BusinessTypeProduct[]
|
|
175
174
|
|
|
176
|
-
@OneToMany(
|
|
175
|
+
@OneToMany(
|
|
176
|
+
() => DiscountCodeUser,
|
|
177
|
+
(discountCodeUser) => discountCodeUser.local
|
|
178
|
+
)
|
|
177
179
|
discount_code_locals: DiscountCodeUser[]
|
|
178
|
-
}
|
|
179
180
|
|
|
181
|
+
@OneToMany(() => LocalPlan, (localPlan) => localPlan.local)
|
|
182
|
+
locals_plan: LocalPlan[]
|
|
183
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Column,
|
|
3
|
+
Entity,
|
|
4
|
+
JoinColumn,
|
|
5
|
+
ManyToOne,
|
|
6
|
+
PrimaryGeneratedColumn,
|
|
7
|
+
} from 'typeorm'
|
|
8
|
+
import { Local, Plan } from '..'
|
|
9
|
+
import { jsonTransformer } from '../transformers/jsonTransformer'
|
|
10
|
+
import { DateTransformer } from '../transformers/dateTransformer'
|
|
11
|
+
|
|
12
|
+
@Entity({
|
|
13
|
+
name: 'local_plan',
|
|
14
|
+
comment: 'Tabla para el manejo de los planes de los locales.',
|
|
15
|
+
})
|
|
16
|
+
export class LocalPlan {
|
|
17
|
+
@PrimaryGeneratedColumn({
|
|
18
|
+
comment: 'Número de identificación (ID) único de cada registro.',
|
|
19
|
+
})
|
|
20
|
+
id: number
|
|
21
|
+
|
|
22
|
+
@ManyToOne(() => Plan, (plan) => plan.local_plans, {
|
|
23
|
+
onDelete: 'CASCADE',
|
|
24
|
+
onUpdate: 'NO ACTION',
|
|
25
|
+
})
|
|
26
|
+
@JoinColumn({ name: 'plan' })
|
|
27
|
+
plan: Plan
|
|
28
|
+
|
|
29
|
+
@ManyToOne(() => Local, (local) => local.locals_plan, {
|
|
30
|
+
onDelete: 'CASCADE',
|
|
31
|
+
onUpdate: 'NO ACTION',
|
|
32
|
+
})
|
|
33
|
+
@JoinColumn({ name: 'local' })
|
|
34
|
+
local: Local
|
|
35
|
+
|
|
36
|
+
@Column({
|
|
37
|
+
default: 0,
|
|
38
|
+
comment:
|
|
39
|
+
'Valor de tipo numérico para saber sí el local tiene el plan mensual o anual:\n\n 1. Mensual. \n\n2. Anual.',
|
|
40
|
+
})
|
|
41
|
+
type: number
|
|
42
|
+
|
|
43
|
+
@Column({
|
|
44
|
+
nullable: true,
|
|
45
|
+
comment: 'Cantidad máxima de mensajes por el chatbot de whatsapp.',
|
|
46
|
+
})
|
|
47
|
+
maximum_number_messages_ws: number
|
|
48
|
+
|
|
49
|
+
@Column({
|
|
50
|
+
nullable: true,
|
|
51
|
+
comment: 'Precio por el uso de chatbot de whatsapp.',
|
|
52
|
+
})
|
|
53
|
+
messages_ws_price: number
|
|
54
|
+
|
|
55
|
+
@Column({
|
|
56
|
+
nullable: true,
|
|
57
|
+
comment: 'Cantidad máxima de solicitudes para el uso de GPT`s.',
|
|
58
|
+
})
|
|
59
|
+
maximum_number_request_gpt: number
|
|
60
|
+
|
|
61
|
+
@Column({
|
|
62
|
+
nullable: true,
|
|
63
|
+
comment: 'Precio por el uso de gpt`s.',
|
|
64
|
+
})
|
|
65
|
+
request_gpt_price: number
|
|
66
|
+
|
|
67
|
+
@Column({
|
|
68
|
+
comment: 'Precio por el plan del local.',
|
|
69
|
+
})
|
|
70
|
+
price: number
|
|
71
|
+
|
|
72
|
+
@Column({
|
|
73
|
+
type: 'mediumtext',
|
|
74
|
+
nullable: true,
|
|
75
|
+
transformer: jsonTransformer,
|
|
76
|
+
comment:
|
|
77
|
+
'Por si necesitamos agregar más elementos a la tabla. \n\nEsto se comporta como un Objeto guardado en la columna.',
|
|
78
|
+
})
|
|
79
|
+
profile: any
|
|
80
|
+
|
|
81
|
+
@Column({
|
|
82
|
+
type: 'datetime',
|
|
83
|
+
transformer: new DateTransformer(),
|
|
84
|
+
comment: 'Fecha de creación del registro.',
|
|
85
|
+
})
|
|
86
|
+
start_date: Date
|
|
87
|
+
|
|
88
|
+
@Column({
|
|
89
|
+
type: 'datetime',
|
|
90
|
+
transformer: new DateTransformer(),
|
|
91
|
+
comment: 'Fecha de creación del registro.',
|
|
92
|
+
})
|
|
93
|
+
end_date: Date
|
|
94
|
+
|
|
95
|
+
@Column({
|
|
96
|
+
default: 1,
|
|
97
|
+
comment:
|
|
98
|
+
'¿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.',
|
|
99
|
+
})
|
|
100
|
+
status: number
|
|
101
|
+
}
|
package/src/entities/Master.ts
CHANGED
|
@@ -8,13 +8,12 @@ import {
|
|
|
8
8
|
OneToMany,
|
|
9
9
|
PrimaryGeneratedColumn,
|
|
10
10
|
} from 'typeorm'
|
|
11
|
+
import { MasterNotification, ReassignReview, VerifyLocal } from '..'
|
|
12
|
+
import { DateTransformer } from '../transformers/dateTransformer'
|
|
13
|
+
import { jsonTransformer } from '../transformers/jsonTransformer'
|
|
11
14
|
import { City } from './City'
|
|
12
15
|
import { DiscountCodeCompany } from './DiscountCodeCompany'
|
|
13
16
|
import { MasterRole } from './MasterRole'
|
|
14
|
-
import { Plan } from './Plan'
|
|
15
|
-
import { jsonTransformer } from '../transformers/jsonTransformer'
|
|
16
|
-
import { DateTransformer } from '../transformers/dateTransformer'
|
|
17
|
-
import { MasterNotification, ReassignReview, VerifyLocal } from '..'
|
|
18
17
|
|
|
19
18
|
@Entity({
|
|
20
19
|
comment:
|
|
@@ -106,7 +105,7 @@ export class Master {
|
|
|
106
105
|
@Column({
|
|
107
106
|
default: 1,
|
|
108
107
|
comment:
|
|
109
|
-
'Es el estado para verificar si se
|
|
108
|
+
'Es el estado para verificar si se envía en la papelera o no.',
|
|
110
109
|
})
|
|
111
110
|
visible: number
|
|
112
111
|
|
|
@@ -130,9 +129,6 @@ export class Master {
|
|
|
130
129
|
})
|
|
131
130
|
masters_roles: MasterRole[]
|
|
132
131
|
|
|
133
|
-
@OneToMany(() => Plan, (plan) => plan.created_by)
|
|
134
|
-
plans: Plan[]
|
|
135
|
-
|
|
136
132
|
@OneToMany(() => VerifyLocal, (verifyLocal) => verifyLocal.partner)
|
|
137
133
|
verifyLocals: VerifyLocal[]
|
|
138
134
|
|
package/src/entities/Plan.ts
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
PrimaryGeneratedColumn,
|
|
8
8
|
} from 'typeorm'
|
|
9
9
|
import { Company } from './Company'
|
|
10
|
-
import {
|
|
10
|
+
import { LocalPlan } from '..'
|
|
11
11
|
|
|
12
12
|
@Entity({
|
|
13
13
|
comment: 'Planes que tendrá la plataforma para las empresas (company)',
|
|
@@ -21,6 +21,13 @@ export class Plan {
|
|
|
21
21
|
@Column({ length: 20, unique: true, comment: 'Código del plan.' })
|
|
22
22
|
code: string
|
|
23
23
|
|
|
24
|
+
@ManyToOne(() => Company, (company) => company.plans_company, {
|
|
25
|
+
onDelete: 'CASCADE',
|
|
26
|
+
onUpdate: 'NO ACTION',
|
|
27
|
+
})
|
|
28
|
+
@JoinColumn({ name: 'company' })
|
|
29
|
+
company: Company
|
|
30
|
+
|
|
24
31
|
@Column({
|
|
25
32
|
length: 50,
|
|
26
33
|
comment:
|
|
@@ -36,12 +43,8 @@ export class Plan {
|
|
|
36
43
|
})
|
|
37
44
|
description: string
|
|
38
45
|
|
|
39
|
-
@Column(
|
|
40
|
-
|
|
41
|
-
comment:
|
|
42
|
-
'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.',
|
|
43
|
-
})
|
|
44
|
-
customized: number
|
|
46
|
+
@Column()
|
|
47
|
+
quantity_locals: number
|
|
45
48
|
|
|
46
49
|
@Column({ type: 'datetime', comment: 'Fecha de creación del registro.' })
|
|
47
50
|
created: Date
|
|
@@ -49,14 +52,6 @@ export class Plan {
|
|
|
49
52
|
@Column({ type: 'date', comment: 'Fecha de expiración del registro.' })
|
|
50
53
|
expiration: Date
|
|
51
54
|
|
|
52
|
-
@ManyToOne(() => Master, (user) => user.plans, {
|
|
53
|
-
nullable: true,
|
|
54
|
-
onDelete: 'RESTRICT',
|
|
55
|
-
onUpdate: 'NO ACTION',
|
|
56
|
-
})
|
|
57
|
-
@JoinColumn({ name: 'created_by' })
|
|
58
|
-
created_by: Master
|
|
59
|
-
|
|
60
55
|
@Column({
|
|
61
56
|
default: 1,
|
|
62
57
|
comment:
|
|
@@ -64,6 +59,6 @@ export class Plan {
|
|
|
64
59
|
})
|
|
65
60
|
status: number
|
|
66
61
|
|
|
67
|
-
@OneToMany(() =>
|
|
68
|
-
|
|
62
|
+
@OneToMany(() => LocalPlan, (localPlan) => localPlan.plan)
|
|
63
|
+
local_plans: LocalPlan[]
|
|
69
64
|
}
|
|
@@ -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
|
|
|
47
48
|
export { LocalsCompany } from './views/LocalsCompany'
|
|
48
49
|
export { VerifyLocals } from './views/VerifyLocals'
|