payble fix with discount

This commit is contained in:
hamid zarghami
2025-12-18 10:38:16 +03:30
parent 1c39e9c6b3
commit 510d1718f4
3 changed files with 71 additions and 23 deletions
+23 -18
View File
@@ -12,7 +12,7 @@ export interface Category {
deletedAt: string | null;
title: string;
isActive: boolean;
restId: string;
restaurant: string;
avatarUrl: string | null;
}
@@ -22,23 +22,33 @@ export type FoodImage = string | { url: string; alt?: string | null };
export interface Food {
id: string;
createdAt?: string;
updatedAt?: string;
deletedAt?: string | null;
restaurant?: string;
category?: Category;
createdAt: string;
updatedAt: string;
deletedAt: string | null;
restaurant: string;
category: Category;
inventory: string;
title: string;
desc: string;
content: string[];
price: number;
order: number | null;
prepareTime: number | null;
weekDays: number[];
mealTypes: unknown[];
isActive: boolean;
images: string[];
inPlaceServe: boolean;
pickupServe: boolean;
score: number;
discount: number;
isSpecialOffer: boolean;
// فیلدهای قدیمی برای سازگاری با سایر بخش‌های کد
name?: string;
title?: string;
foodName?: string;
description?: string;
desc?: string | null;
content?: string[] | string | null;
price: number;
image?: string | null;
images?: FoodImage[] | null;
points?: number | null;
order?: number | null;
prepareTime?: number | null;
sat?: boolean;
sun?: boolean;
mon?: boolean;
@@ -47,12 +57,7 @@ export interface Food {
dinner?: boolean;
stock?: number;
stockDefault?: number;
isActive?: boolean;
inPlaceServe?: boolean;
pickupServe?: boolean;
rate?: number;
discount?: number;
isSpecialOffer?: boolean;
[key: string]: unknown;
}