fix: product category types (#8833)
This commit is contained in:
@@ -14,6 +14,7 @@ export interface BaseProductCategory {
|
|||||||
parent_category: BaseProductCategory | null
|
parent_category: BaseProductCategory | null
|
||||||
category_children: BaseProductCategory[]
|
category_children: BaseProductCategory[]
|
||||||
products?: BaseProduct[]
|
products?: BaseProduct[]
|
||||||
|
metadata?: Record<string, unknown> | null
|
||||||
created_at: string
|
created_at: string
|
||||||
updated_at: string
|
updated_at: string
|
||||||
deleted_at: string | null
|
deleted_at: string | null
|
||||||
@@ -21,7 +22,7 @@ export interface BaseProductCategory {
|
|||||||
|
|
||||||
export interface BaseProductCategoryListParams
|
export interface BaseProductCategoryListParams
|
||||||
extends FindParams,
|
extends FindParams,
|
||||||
BaseFilterable<BaseProductCategoryListParams> {
|
BaseFilterable<BaseProductCategoryListParams> {
|
||||||
q?: string
|
q?: string
|
||||||
id?: string | string[]
|
id?: string | string[]
|
||||||
name?: string | string[]
|
name?: string | string[]
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ class ProductCategory {
|
|||||||
deleted_at?: Date
|
deleted_at?: Date
|
||||||
|
|
||||||
@Property({ columnType: "jsonb", nullable: true })
|
@Property({ columnType: "jsonb", nullable: true })
|
||||||
metadata?: Record<string, unknown> | null
|
metadata: Record<string, unknown> | null = null
|
||||||
|
|
||||||
@ManyToMany(() => Product, (product) => product.categories)
|
@ManyToMany(() => Product, (product) => product.categories)
|
||||||
products = new Collection<Product>(this)
|
products = new Collection<Product>(this)
|
||||||
|
|||||||
Reference in New Issue
Block a user