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,29 +22,58 @@ export class WorkshopSchema extends PothosSchema {
return this.builder.prismaObject('Workshop', {
description: 'A workshop in the system.',
fields: (t) => ({
id: t.exposeID('id'),
title: t.exposeString('title'),
description: t.exposeString('description'),
staffId: t.exposeID('staffId'),
serviceId: t.exposeID('serviceId'),
id: t.exposeID('id', {
description: 'The ID of the workshop.',
}),
title: t.exposeString('title', {
description: 'The title of the workshop.',
}),
description: t.exposeString('description', {
description: 'The description of the workshop.',
}),
staffId: t.exposeID('staffId', {
description:
'The ID of the staff member who is leading the workshop.',
}),
serviceId: t.exposeID('serviceId', {
description: 'The ID of the service that the workshop is for.',
}),
imageFile: t.relation('imageFile', {
nullable: true,
}),
imageFileId: t.exposeID('imageFileId'),
imageFileUrl: t.exposeString('imageFileUrl'),
imageFileId: t.exposeID('imageFileId', {
description: 'The ID of the image file for the workshop.',
}),
imageFileUrl: t.exposeString('imageFileUrl', {
description: 'The URL of the image file for the workshop.',
}),
date: t.expose('date', {
type: 'DateTime',
nullable: true,
description: 'The date and time the workshop is scheduled.',
}),
createdAt: t.expose('createdAt', {
type: 'DateTime',
nullable: true,
description: 'The date and time the workshop was created.',
}),
updatedAt: t.expose('updatedAt', {
type: 'DateTime',
nullable: true,
description: 'The date and time the workshop was updated.',
}),
service: t.relation('service', {
description: 'The service that the workshop is for.',
}),
workshopOrganization: t.relation('workshopOrganization', {
description: 'The organization that the workshop is for.',
}),
workshopSubscription: t.relation('workshopSubscription', {
description: 'The subscription that the workshop is for.',
}),
staff: t.relation('staff', {
description: 'The staff member who is leading the workshop.',
}),
service: t.relation('service'),
workshopOrganization: t.relation('workshopOrganization'),
workshopSubscription: t.relation('workshopSubscription'),
staff: t.relation('staff'),
}),
});
}