feat: add property to product

This commit is contained in:
2026-06-18 13:43:30 +03:30
parent a186db08e2
commit 555e56c50a
6 changed files with 155 additions and 8 deletions
+16
View File
@@ -8,6 +8,12 @@ export interface Product {
created_at: string;
updated_at: string;
descriptions: string[] | null;
// Display-only text fields (no calculation)
discounted_price: string | null; // قیمت کلی تخفیف خورده
daily_price: string | null; // قیمت روزانه
discount: string | null; // تخفیف
is_best_seller: boolean; // پرفروش‌ترین
sort_order: number; // ترتیب (۰ بالاترین)
}
export interface CreateProductData {
@@ -15,6 +21,11 @@ export interface CreateProductData {
price: number;
type: number;
descriptions?: string[];
discounted_price?: string;
daily_price?: string;
discount?: string;
is_best_seller?: boolean;
sort_order?: number;
}
export interface UpdateProductData {
@@ -22,6 +33,11 @@ export interface UpdateProductData {
price?: number;
type?: number;
descriptions?: string[];
discounted_price?: string;
daily_price?: string;
discount?: string;
is_best_seller?: boolean;
sort_order?: number;
}
export interface ApiResponse<T> {