test-entity-library-asm 3.9.48 → 3.9.50
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 +8 -0
- package/dist/entities/Partner.d.ts +1 -0
- package/dist/entities/Partner.js +4 -0
- package/dist/index.js +0 -11
- package/dist/views/LocalsCompanyInformationForTheTable.d.ts +16 -0
- package/dist/views/LocalsCompanyInformationForTheTable.js +64 -0
- package/package.json +1 -1
- package/src/entities/Local.ts +8 -4
- package/src/entities/Partner.ts +3 -0
- package/src/index.ts +0 -13
- package/src/views/LocalsCompanyInformationForTheTable.ts +48 -0
package/dist/entities/Local.d.ts
CHANGED
package/dist/entities/Local.js
CHANGED
|
@@ -87,6 +87,14 @@ __decorate([
|
|
|
87
87
|
(0, typeorm_1.Column)({ type: "datetime", default: () => "CURRENT_TIMESTAMP" }),
|
|
88
88
|
__metadata("design:type", Date)
|
|
89
89
|
], Local.prototype, "created", void 0);
|
|
90
|
+
__decorate([
|
|
91
|
+
(0, typeorm_1.ManyToOne)(() => Partner_1.Partner, (partner) => partner.created_by_locals, {
|
|
92
|
+
onDelete: "NO ACTION",
|
|
93
|
+
onUpdate: "NO ACTION",
|
|
94
|
+
}),
|
|
95
|
+
(0, typeorm_1.JoinColumn)({ name: "created_by" }),
|
|
96
|
+
__metadata("design:type", Partner_1.Partner)
|
|
97
|
+
], Local.prototype, "created_by", void 0);
|
|
90
98
|
__decorate([
|
|
91
99
|
(0, typeorm_1.Column)({
|
|
92
100
|
type: "datetime",
|
package/dist/entities/Partner.js
CHANGED
|
@@ -316,6 +316,10 @@ __decorate([
|
|
|
316
316
|
(0, typeorm_1.OneToMany)(() => __1.LocalChange, (localChange) => localChange.created_by),
|
|
317
317
|
__metadata("design:type", Array)
|
|
318
318
|
], Partner.prototype, "local_changes", void 0);
|
|
319
|
+
__decorate([
|
|
320
|
+
(0, typeorm_1.OneToMany)(() => Local_1.Local, (local) => local.created_by),
|
|
321
|
+
__metadata("design:type", Array)
|
|
322
|
+
], Partner.prototype, "created_by_locals", void 0);
|
|
319
323
|
exports.Partner = Partner = __decorate([
|
|
320
324
|
(0, typeorm_1.Entity)({
|
|
321
325
|
comment: "Tabla agregada para los usuarios qué quieran registrar su local o empresa de comida rápida en la plataforma.\r\n\r\nEste usuario es independiente a los usuarios de la tabla `user` ya que tiene diferentes plataformas.\r\n\r\nTambién van a estar los usuarios qué el administrador/dueño desee agregar como empleados/colaboradores.",
|
package/dist/index.js
CHANGED
|
@@ -42,17 +42,6 @@ let connection = null;
|
|
|
42
42
|
function createDataBaseSource() {
|
|
43
43
|
if (!connection) {
|
|
44
44
|
(0, dotenv_1.config)({ path: (0, path_1.resolve)(process.cwd(), ".env") });
|
|
45
|
-
console.log("ENTIDADES REGISTRADAS:");
|
|
46
|
-
console.log(Object.keys(EntitiesViewsRoutes));
|
|
47
|
-
console.log({
|
|
48
|
-
type: process.env.DB_TYPE,
|
|
49
|
-
host: process.env.DB_HOST,
|
|
50
|
-
port: process.env.DB_PORT,
|
|
51
|
-
username: process.env.DB_USERNAME,
|
|
52
|
-
database: process.env.DB_DATABASE,
|
|
53
|
-
password: process.env.DB_PASSWORD,
|
|
54
|
-
synchronize: process.env.DB_SYNCHRONIZE,
|
|
55
|
-
});
|
|
56
45
|
connection = new typeorm_1.DataSource({
|
|
57
46
|
type: process.env.DB_TYPE,
|
|
58
47
|
// dateStrings: true,
|
|
@@ -56,6 +56,22 @@ export declare class LocalsCompanyInformationForTheTable {
|
|
|
56
56
|
country_prefix: string;
|
|
57
57
|
country_status: number;
|
|
58
58
|
country_structure_phone: string;
|
|
59
|
+
created_by_id: number;
|
|
60
|
+
created_by_code: string;
|
|
61
|
+
created_by_document: string | null;
|
|
62
|
+
created_by_name: string;
|
|
63
|
+
created_by_surname: string;
|
|
64
|
+
created_by_full_name: string;
|
|
65
|
+
created_by_phone: string | null;
|
|
66
|
+
created_by_owner: number;
|
|
67
|
+
created_by_email: string;
|
|
68
|
+
created_by_city: string | null;
|
|
69
|
+
created_by_address: string | null;
|
|
70
|
+
created_by_profile: any | null;
|
|
71
|
+
created_by_status: number;
|
|
72
|
+
created_by_visible: number;
|
|
73
|
+
created_by_created: Date;
|
|
74
|
+
created_by_updated: Date;
|
|
59
75
|
partner_id: number;
|
|
60
76
|
partner_code: string;
|
|
61
77
|
partner_document: string | null;
|
|
@@ -254,6 +254,70 @@ __decorate([
|
|
|
254
254
|
(0, typeorm_1.ViewColumn)(),
|
|
255
255
|
__metadata("design:type", String)
|
|
256
256
|
], LocalsCompanyInformationForTheTable.prototype, "country_structure_phone", void 0);
|
|
257
|
+
__decorate([
|
|
258
|
+
(0, typeorm_1.ViewColumn)(),
|
|
259
|
+
__metadata("design:type", Number)
|
|
260
|
+
], LocalsCompanyInformationForTheTable.prototype, "created_by_id", void 0);
|
|
261
|
+
__decorate([
|
|
262
|
+
(0, typeorm_1.ViewColumn)(),
|
|
263
|
+
__metadata("design:type", String)
|
|
264
|
+
], LocalsCompanyInformationForTheTable.prototype, "created_by_code", void 0);
|
|
265
|
+
__decorate([
|
|
266
|
+
(0, typeorm_1.ViewColumn)(),
|
|
267
|
+
__metadata("design:type", Object)
|
|
268
|
+
], LocalsCompanyInformationForTheTable.prototype, "created_by_document", void 0);
|
|
269
|
+
__decorate([
|
|
270
|
+
(0, typeorm_1.ViewColumn)(),
|
|
271
|
+
__metadata("design:type", String)
|
|
272
|
+
], LocalsCompanyInformationForTheTable.prototype, "created_by_name", void 0);
|
|
273
|
+
__decorate([
|
|
274
|
+
(0, typeorm_1.ViewColumn)(),
|
|
275
|
+
__metadata("design:type", String)
|
|
276
|
+
], LocalsCompanyInformationForTheTable.prototype, "created_by_surname", void 0);
|
|
277
|
+
__decorate([
|
|
278
|
+
(0, typeorm_1.ViewColumn)(),
|
|
279
|
+
__metadata("design:type", String)
|
|
280
|
+
], LocalsCompanyInformationForTheTable.prototype, "created_by_full_name", void 0);
|
|
281
|
+
__decorate([
|
|
282
|
+
(0, typeorm_1.ViewColumn)(),
|
|
283
|
+
__metadata("design:type", Object)
|
|
284
|
+
], LocalsCompanyInformationForTheTable.prototype, "created_by_phone", void 0);
|
|
285
|
+
__decorate([
|
|
286
|
+
(0, typeorm_1.ViewColumn)(),
|
|
287
|
+
__metadata("design:type", Number)
|
|
288
|
+
], LocalsCompanyInformationForTheTable.prototype, "created_by_owner", void 0);
|
|
289
|
+
__decorate([
|
|
290
|
+
(0, typeorm_1.ViewColumn)(),
|
|
291
|
+
__metadata("design:type", String)
|
|
292
|
+
], LocalsCompanyInformationForTheTable.prototype, "created_by_email", void 0);
|
|
293
|
+
__decorate([
|
|
294
|
+
(0, typeorm_1.ViewColumn)(),
|
|
295
|
+
__metadata("design:type", Object)
|
|
296
|
+
], LocalsCompanyInformationForTheTable.prototype, "created_by_city", void 0);
|
|
297
|
+
__decorate([
|
|
298
|
+
(0, typeorm_1.ViewColumn)(),
|
|
299
|
+
__metadata("design:type", Object)
|
|
300
|
+
], LocalsCompanyInformationForTheTable.prototype, "created_by_address", void 0);
|
|
301
|
+
__decorate([
|
|
302
|
+
(0, typeorm_1.ViewColumn)({ transformer: jsonTransformer }),
|
|
303
|
+
__metadata("design:type", Object)
|
|
304
|
+
], LocalsCompanyInformationForTheTable.prototype, "created_by_profile", void 0);
|
|
305
|
+
__decorate([
|
|
306
|
+
(0, typeorm_1.ViewColumn)(),
|
|
307
|
+
__metadata("design:type", Number)
|
|
308
|
+
], LocalsCompanyInformationForTheTable.prototype, "created_by_status", void 0);
|
|
309
|
+
__decorate([
|
|
310
|
+
(0, typeorm_1.ViewColumn)(),
|
|
311
|
+
__metadata("design:type", Number)
|
|
312
|
+
], LocalsCompanyInformationForTheTable.prototype, "created_by_visible", void 0);
|
|
313
|
+
__decorate([
|
|
314
|
+
(0, typeorm_1.ViewColumn)(),
|
|
315
|
+
__metadata("design:type", Date)
|
|
316
|
+
], LocalsCompanyInformationForTheTable.prototype, "created_by_created", void 0);
|
|
317
|
+
__decorate([
|
|
318
|
+
(0, typeorm_1.ViewColumn)(),
|
|
319
|
+
__metadata("design:type", Date)
|
|
320
|
+
], LocalsCompanyInformationForTheTable.prototype, "created_by_updated", void 0);
|
|
257
321
|
__decorate([
|
|
258
322
|
(0, typeorm_1.ViewColumn)(),
|
|
259
323
|
__metadata("design:type", Number)
|
package/package.json
CHANGED
package/src/entities/Local.ts
CHANGED
|
@@ -90,6 +90,13 @@ export class Local {
|
|
|
90
90
|
@Column({ type: "datetime", default: () => "CURRENT_TIMESTAMP" })
|
|
91
91
|
created: Date;
|
|
92
92
|
|
|
93
|
+
@ManyToOne(() => Partner, (partner) => partner.created_by_locals, {
|
|
94
|
+
onDelete: "NO ACTION",
|
|
95
|
+
onUpdate: "NO ACTION",
|
|
96
|
+
})
|
|
97
|
+
@JoinColumn({ name: "created_by" })
|
|
98
|
+
created_by: Partner;
|
|
99
|
+
|
|
93
100
|
@Column({
|
|
94
101
|
type: "datetime",
|
|
95
102
|
onUpdate: "CURRENT_TIMESTAMP",
|
|
@@ -269,9 +276,6 @@ export class Local {
|
|
|
269
276
|
)
|
|
270
277
|
locals_payment_method: LocalPaymentMethod[];
|
|
271
278
|
|
|
272
|
-
@OneToMany(
|
|
273
|
-
() => LocalChange,
|
|
274
|
-
(localChange) => localChange.local,
|
|
275
|
-
)
|
|
279
|
+
@OneToMany(() => LocalChange, (localChange) => localChange.local)
|
|
276
280
|
locals_changes: LocalChange[];
|
|
277
281
|
}
|
package/src/entities/Partner.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -34,19 +34,6 @@ export function createDataBaseSource(): DataSource {
|
|
|
34
34
|
if (!connection) {
|
|
35
35
|
config({ path: resolve(process.cwd(), ".env") });
|
|
36
36
|
|
|
37
|
-
console.log("ENTIDADES REGISTRADAS:");
|
|
38
|
-
console.log(Object.keys(EntitiesViewsRoutes));
|
|
39
|
-
|
|
40
|
-
console.log({
|
|
41
|
-
type: process.env.DB_TYPE,
|
|
42
|
-
host: process.env.DB_HOST,
|
|
43
|
-
port: process.env.DB_PORT,
|
|
44
|
-
username: process.env.DB_USERNAME,
|
|
45
|
-
database: process.env.DB_DATABASE,
|
|
46
|
-
password: process.env.DB_PASSWORD,
|
|
47
|
-
synchronize: process.env.DB_SYNCHRONIZE,
|
|
48
|
-
});
|
|
49
|
-
|
|
50
37
|
connection = new DataSource({
|
|
51
38
|
type: process.env.DB_TYPE as unknown as IType,
|
|
52
39
|
// dateStrings: true,
|
|
@@ -187,6 +187,54 @@ export class LocalsCompanyInformationForTheTable {
|
|
|
187
187
|
@ViewColumn()
|
|
188
188
|
country_structure_phone: string;
|
|
189
189
|
|
|
190
|
+
@ViewColumn()
|
|
191
|
+
created_by_id: number;
|
|
192
|
+
|
|
193
|
+
@ViewColumn()
|
|
194
|
+
created_by_code: string;
|
|
195
|
+
|
|
196
|
+
@ViewColumn()
|
|
197
|
+
created_by_document: string | null;
|
|
198
|
+
|
|
199
|
+
@ViewColumn()
|
|
200
|
+
created_by_name: string;
|
|
201
|
+
|
|
202
|
+
@ViewColumn()
|
|
203
|
+
created_by_surname: string;
|
|
204
|
+
|
|
205
|
+
@ViewColumn()
|
|
206
|
+
created_by_full_name: string;
|
|
207
|
+
|
|
208
|
+
@ViewColumn()
|
|
209
|
+
created_by_phone: string | null;
|
|
210
|
+
|
|
211
|
+
@ViewColumn()
|
|
212
|
+
created_by_owner: number;
|
|
213
|
+
|
|
214
|
+
@ViewColumn()
|
|
215
|
+
created_by_email: string;
|
|
216
|
+
|
|
217
|
+
@ViewColumn()
|
|
218
|
+
created_by_city: string | null;
|
|
219
|
+
|
|
220
|
+
@ViewColumn()
|
|
221
|
+
created_by_address: string | null;
|
|
222
|
+
|
|
223
|
+
@ViewColumn({ transformer: jsonTransformer })
|
|
224
|
+
created_by_profile: any | null;
|
|
225
|
+
|
|
226
|
+
@ViewColumn()
|
|
227
|
+
created_by_status: number;
|
|
228
|
+
|
|
229
|
+
@ViewColumn()
|
|
230
|
+
created_by_visible: number;
|
|
231
|
+
|
|
232
|
+
@ViewColumn()
|
|
233
|
+
created_by_created: Date;
|
|
234
|
+
|
|
235
|
+
@ViewColumn()
|
|
236
|
+
created_by_updated: Date;
|
|
237
|
+
|
|
190
238
|
@ViewColumn()
|
|
191
239
|
partner_id: number;
|
|
192
240
|
|