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
This commit is contained in:
parent
81d9f0fdd2
commit
57287c866c
|
|
@ -2,6 +2,7 @@ export interface Category {
|
|||
id: number;
|
||||
name: string;
|
||||
description?: string;
|
||||
parent_id?: number;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ export interface Option {
|
|||
export interface ProductOption {
|
||||
id: number;
|
||||
title: string;
|
||||
name: string;
|
||||
description: string;
|
||||
maintenance: Maintenance;
|
||||
options: Option[];
|
||||
|
|
|
|||
|
|
@ -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<string, any>;
|
||||
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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue