phong bat
This commit is contained in:
@@ -22,9 +22,15 @@ export class CategorySchema extends PothosSchema {
|
||||
return this.builder.prismaObject('Category', {
|
||||
description: 'A category of services.',
|
||||
fields: (t) => ({
|
||||
id: t.exposeID('id'),
|
||||
name: t.exposeString('name'),
|
||||
subCategory: t.relation('SubCategory'),
|
||||
id: t.exposeID('id', {
|
||||
description: 'The unique identifier of the category.',
|
||||
}),
|
||||
name: t.exposeString('name', {
|
||||
description: 'The name of the category.',
|
||||
}),
|
||||
subCategory: t.relation('SubCategory', {
|
||||
description: 'The subcategory of the category.',
|
||||
}),
|
||||
}),
|
||||
});
|
||||
}
|
||||
@@ -35,10 +41,20 @@ export class CategorySchema extends PothosSchema {
|
||||
description: 'A subcategory of services.',
|
||||
fields: (t) => ({
|
||||
id: t.exposeID('id'),
|
||||
name: t.exposeString('name'),
|
||||
categoryId: t.exposeID('categoryId'),
|
||||
category: t.relation('category'),
|
||||
serviceAndCategory: t.relation('serviceAndCategory'),
|
||||
name: t.exposeString('name', {
|
||||
description: 'The name of the subcategory.',
|
||||
}),
|
||||
categoryId: t.exposeID('categoryId', {
|
||||
description:
|
||||
'The ID of the category that the subcategory belongs to.',
|
||||
}),
|
||||
category: t.relation('category', {
|
||||
description: 'The category that the subcategory belongs to.',
|
||||
}),
|
||||
serviceAndCategory: t.relation('serviceAndCategory', {
|
||||
description:
|
||||
'The service and category that the subcategory belongs to.',
|
||||
}),
|
||||
}),
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user