feat(blog): category and tag data structure
This commit is contained in:
parent
27f9c83e8e
commit
a16f9d0ca8
@ -17,12 +17,23 @@ export const BlogCategories: CollectionConfig = {
|
||||
position: "sidebar",
|
||||
},
|
||||
hooks: {
|
||||
beforeValidate: [formatSlug("title")],
|
||||
beforeValidate: [formatSlug("name")],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "parent_category",
|
||||
label: "Parent Category",
|
||||
type: "relationship",
|
||||
relationTo: "blogCategories",
|
||||
},
|
||||
{
|
||||
name: "description",
|
||||
type: "textarea",
|
||||
},
|
||||
],
|
||||
admin: {
|
||||
hideAPIURL: true,
|
||||
group: "Blogs",
|
||||
useAsTitle: "name",
|
||||
},
|
||||
};
|
||||
|
@ -17,7 +17,7 @@ export const BlogTags: CollectionConfig = {
|
||||
position: "sidebar",
|
||||
},
|
||||
hooks: {
|
||||
beforeValidate: [formatSlug("title")],
|
||||
beforeValidate: [formatSlug("name")],
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -204,6 +204,8 @@ export interface BlogCategory {
|
||||
id: number;
|
||||
name: string;
|
||||
slug?: string | null;
|
||||
parent_category?: (number | null) | BlogCategory;
|
||||
description?: string | null;
|
||||
updatedAt: string;
|
||||
createdAt: string;
|
||||
}
|
||||
@ -725,6 +727,8 @@ export interface TeamsSelect<T extends boolean = true> {
|
||||
export interface BlogCategoriesSelect<T extends boolean = true> {
|
||||
name?: T;
|
||||
slug?: T;
|
||||
parent_category?: T;
|
||||
description?: T;
|
||||
updatedAt?: T;
|
||||
createdAt?: T;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user