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