From 57287c866c86802d8234a43f4861aafd343bb21c Mon Sep 17 00:00:00 2001 From: hosseintaromi Date: Tue, 29 Jul 2025 09:49:48 +0330 Subject: [PATCH] feat: update type definitions and models Product Model: - Add sku, price, status, category properties - Add status to ProductFilters interface Category Model: - Add parent_id property for hierarchical categories ProductOption Model: - Add name property for better identification These changes resolve TS2339 property errors throughout the application --- src/pages/categories/core/_models.ts | 1 + src/pages/product-options/core/_models.ts | 1 + src/pages/products/core/_models.ts | 5 +++++ 3 files changed, 7 insertions(+) diff --git a/src/pages/categories/core/_models.ts b/src/pages/categories/core/_models.ts index 5dfa3c9..907dd7c 100644 --- a/src/pages/categories/core/_models.ts +++ b/src/pages/categories/core/_models.ts @@ -2,6 +2,7 @@ export interface Category { id: number; name: string; description?: string; + parent_id?: number; created_at: string; updated_at: string; } diff --git a/src/pages/product-options/core/_models.ts b/src/pages/product-options/core/_models.ts index c099ddc..ea4c172 100644 --- a/src/pages/product-options/core/_models.ts +++ b/src/pages/product-options/core/_models.ts @@ -14,6 +14,7 @@ export interface Option { export interface ProductOption { id: number; title: string; + name: string; description: string; maintenance: Maintenance; options: Option[]; diff --git a/src/pages/products/core/_models.ts b/src/pages/products/core/_models.ts index fd473a2..b4c7c5e 100644 --- a/src/pages/products/core/_models.ts +++ b/src/pages/products/core/_models.ts @@ -33,10 +33,14 @@ export interface Product { enabled: boolean; category_ids?: number[]; categories?: Category[]; + category?: Category; product_option_id?: number; product_option?: ProductOption; total_sold: number; type: number; + sku?: string; + price?: number; + status?: string; attributes?: Record; images: ProductImage[]; variants?: ProductVariant[]; @@ -75,6 +79,7 @@ export interface ProductVariantFormData { export interface ProductFilters { search?: string; category_id?: number; + status?: string; min_price?: number; max_price?: number; page?: number;