refactor step 2

This commit is contained in:
2025-12-15 12:35:29 +03:30
parent b776f2b83a
commit 184ceb4800
10 changed files with 111 additions and 182 deletions
+2 -9
View File
@@ -19,10 +19,9 @@ export class Food extends BaseEntity {
@OneToMany(() => Review, review => review.food, { cascade: [Cascade.ALL], orphanRemoval: true })
reviews = new Collection<Review>(this);
@OneToOne(() => Inventory, inventory => inventory.food, {
@OneToOne(() => Inventory, {
mappedBy: 'food',
nullable: true,
cascade: [Cascade.ALL],
orphanRemoval: true,
})
inventory?: Inventory;
@@ -62,12 +61,6 @@ export class Food extends BaseEntity {
@Property({ type: 'boolean', default: false })
dinner: boolean = false;
// @Property({ type: 'int', default: 0 })
// stock: number = 0;
// @Property({ type: 'int', default: 0 })
// stockDefault: number = 0;
@Property({ type: 'boolean', default: true })
isActive: boolean = true;