This commit is contained in:
2025-11-15 11:35:46 +03:30
parent cfe4aeff7a
commit f0913840f2
4 changed files with 53 additions and 22 deletions
+5 -6
View File
@@ -11,7 +11,10 @@ export class Food extends BaseEntity {
title?: string;
@Property({ type: 'text', nullable: true })
content?: string;
desc?: string;
@Property({ type: 'json', nullable: true })
content?: string[];
@Property({ type: 'decimal', precision: 10, scale: 2, nullable: true })
price?: number;
@@ -43,9 +46,6 @@ export class Food extends BaseEntity {
@Property({ type: 'boolean', default: false })
dinner: boolean = false;
@Property({ type: 'boolean', default: false })
isPickup: boolean = false;
@Property({ type: 'int', default: 0 })
stock: number = 0;
@@ -55,7 +55,6 @@ export class Food extends BaseEntity {
@Property({ type: 'boolean', default: true })
isActive: boolean = true;
// you can store image URLs as JSON array
@Property({ type: 'json', nullable: true })
images?: string[];
@@ -66,7 +65,7 @@ export class Food extends BaseEntity {
pickupServe: boolean = false;
@Property({ type: 'float', default: 0 })
rate: number = 0;
rate?: number = 0;
@Property({ type: 'float', default: 0 })
discount: number = 0;