test-entity-library-asm 1.4.2 → 1.4.3
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.js
CHANGED
|
@@ -143,6 +143,10 @@ var Company = /** @class */ (function () {
|
|
|
143
143
|
(0, typeorm_1.OneToMany)(function () { return ProductTopping_1.ProductTopping; }, function (productTopping) { return productTopping.company; }),
|
|
144
144
|
__metadata("design:type", Array)
|
|
145
145
|
], Company.prototype, "product_toppings", void 0);
|
|
146
|
+
__decorate([
|
|
147
|
+
(0, typeorm_1.OneToMany)(function () { return Partner_1.Partner; }, function (partner) { return partner.company; }),
|
|
148
|
+
__metadata("design:type", Array)
|
|
149
|
+
], Company.prototype, "partners_company", void 0);
|
|
146
150
|
Company = __decorate([
|
|
147
151
|
(0, typeorm_1.Entity)({
|
|
148
152
|
comment: 'Tabla creada para las empresas de comida rápida que deseen registrarse en la plataforma.',
|
package/dist/entities/Partner.js
CHANGED
|
@@ -27,6 +27,15 @@ var Partner = /** @class */ (function () {
|
|
|
27
27
|
}),
|
|
28
28
|
__metadata("design:type", Number)
|
|
29
29
|
], Partner.prototype, "id", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.ManyToOne)(function () { return Company_1.Company; }, function (company) { return company.partners_company; }, {
|
|
32
|
+
onDelete: 'CASCADE',
|
|
33
|
+
onUpdate: 'NO ACTION',
|
|
34
|
+
nullable: true
|
|
35
|
+
}),
|
|
36
|
+
(0, typeorm_1.JoinColumn)({ name: 'company' }),
|
|
37
|
+
__metadata("design:type", Company_1.Company)
|
|
38
|
+
], Partner.prototype, "company", void 0);
|
|
30
39
|
__decorate([
|
|
31
40
|
(0, typeorm_1.Column)({ length: 30, unique: true, comment: 'Código único del partner.' }),
|
|
32
41
|
__metadata("design:type", String)
|
package/package.json
CHANGED
package/src/entities/Company.ts
CHANGED
package/src/entities/Partner.ts
CHANGED
|
@@ -26,6 +26,14 @@ export class Partner {
|
|
|
26
26
|
})
|
|
27
27
|
id: number
|
|
28
28
|
|
|
29
|
+
@ManyToOne(() => Company, (company) => company.partners_company, {
|
|
30
|
+
onDelete: 'CASCADE',
|
|
31
|
+
onUpdate: 'NO ACTION',
|
|
32
|
+
nullable: true
|
|
33
|
+
})
|
|
34
|
+
@JoinColumn({ name: 'company' })
|
|
35
|
+
company: Company
|
|
36
|
+
|
|
29
37
|
@Column({ length: 30, unique: true, comment: 'Código único del partner.' })
|
|
30
38
|
code: string
|
|
31
39
|
|