import { DaffGenericCategory } from '@daffodil/category'
The DaffGenericCategory broadly describes the model of a Category of products in Daffodil. As Categories are often considered Trees of Categories, this type is a recursive generic.
interface DaffGenericCategory<T extends DaffGenericCategory<T>> {
name: string
description: string
meta_title: string
meta_description: string
children_count: number
total_products: number
children: T[]
product_ids: string[]
breadcrumbs: DaffCategoryBreadcrumb[]
}
name string |
---|
The name of the category that can be used as a UI label. |
description string |
---|
A description of the category. |
meta_title string |
---|
A title for the category for usage in the tab title of the webpage. |
meta_description string |
---|
An overview description of the category for search engine results. |
children_count number |
---|
The number of child category nodes under this category. |
total_products number |
---|
The number of products that belong to the category. |
children T[] |
---|
The direct child categories of this category. |
product_ids string[] |
---|
The ids for all of the products that belong to the category. |
breadcrumbs DaffCategoryBreadcrumb[] |
---|
The breadcrumb trail that leads from this category to its root category. |