phong bat
This commit is contained in:
@@ -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.',
|
||||
}),
|
||||
}),
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user