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,15 +22,37 @@ export class ServiceFeedbackSchema extends PothosSchema {
return this.builder.prismaObject('ServiceFeedback', {
description: 'A feedback for a service.',
fields: (t) => ({
id: t.exposeID('id'),
userId: t.exposeID('userId'),
serviceId: t.exposeID('serviceId'),
rating: t.exposeFloat('rating'),
comments: t.exposeString('comments'),
createdAt: t.expose('createdAt', { type: 'DateTime' }),
updatedAt: t.expose('updatedAt', { type: 'DateTime' }),
user: t.relation('user'),
service: t.relation('service'),
id: t.exposeID('id', {
description: 'The ID of the service feedback.',
}),
userId: t.exposeID('userId', {
description: 'The ID of the user who provided the feedback.',
}),
serviceId: t.exposeID('serviceId', {
description: 'The ID of the service that was provided.',
}),
rating: t.exposeFloat('rating', {
description: 'The rating of the service.',
}),
comments: t.exposeString('comments', {
description: 'The comments of the service feedback.',
}),
createdAt: t.expose('createdAt', {
type: 'DateTime',
nullable: true,
description: 'The date and time the service feedback was created.',
}),
updatedAt: t.expose('updatedAt', {
type: 'DateTime',
nullable: true,
description: 'The date and time the service feedback was updated.',
}),
user: t.relation('user', {
description: 'The user who provided the feedback.',
}),
service: t.relation('service', {
description: 'The service that was provided.',
}),
}),
});
}