phong bat

This commit is contained in:
2024-10-17 15:15:08 +07:00
parent 59923b02cb
commit 5c56e79d63
19 changed files with 456 additions and 145 deletions

View File

@@ -22,10 +22,18 @@ export class ServiceAndCategorySchema extends PothosSchema {
return this.builder.prismaObject('ServiceAndCategory', {
description: 'A service and category in the system.',
fields: (t) => ({
serviceId: t.exposeID('serviceId'),
service: t.relation('service'),
subCategory: t.relation('SubCategory'),
subCategoryId: t.exposeID('subCategoryId'),
serviceId: t.exposeID('serviceId', {
description: 'The ID of the service.',
}),
service: t.relation('service', {
description: 'The service for the service and category.',
}),
subCategory: t.relation('SubCategory', {
description: 'The sub category for the service and category.',
}),
subCategoryId: t.exposeID('subCategoryId', {
description: 'The ID of the sub category.',
}),
}),
});
}