diff --git a/src/Category/category.schema.ts b/src/Category/category.schema.ts index bbfe169..5ce1293 100644 --- a/src/Category/category.schema.ts +++ b/src/Category/category.schema.ts @@ -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.', + }), }), }); } diff --git a/src/Center/center.schema.ts b/src/Center/center.schema.ts index 6b13588..d6690a6 100644 --- a/src/Center/center.schema.ts +++ b/src/Center/center.schema.ts @@ -22,22 +22,50 @@ export class CenterSchema extends PothosSchema { return this.builder.prismaObject('Center', { description: 'A center in the system.', fields: (t) => ({ - id: t.exposeID('id'), - centerOwnerId: t.exposeID('centerOwnerId'), - name: t.exposeString('name'), - description: t.exposeString('description'), - logoUrl: t.exposeString('logoUrl'), - logoFile: t.relation('logoFile'), - location: t.exposeString('location'), - individual: t.exposeBoolean('individual'), + id: t.exposeID('id', { + description: 'The unique identifier of the center.', + }), + centerOwnerId: t.exposeID('centerOwnerId', { + description: 'The ID of the center owner.', + }), + name: t.exposeString('name', { + description: 'The name of the center.', + }), + description: t.exposeString('description', { + description: 'The description of the center.', + }), + logoUrl: t.exposeString('logoUrl', { + description: 'The URL of the center logo.', + }), + logoFile: t.relation('logoFile', { + description: 'The file associated with the center logo.', + }), + location: t.exposeString('location', { + description: 'The location of the center.', + }), + individual: t.exposeBoolean('individual', { + description: 'Whether the center is an individual center.', + }), createdAt: t.expose('createdAt', { type: 'DateTime' }), updatedAt: t.expose('updatedAt', { type: 'DateTime' }), - services: t.relation('services'), - centerOwner: t.relation('centerOwner'), - chatRoom: t.relation('chatRoom'), - centerStaff: t.relation('CenterStaff'), - resume: t.relation('Resume'), - uploadedFileId: t.exposeID('uploadedFileId'), + services: t.relation('services', { + description: 'The services provided by the center.', + }), + centerOwner: t.relation('centerOwner', { + description: 'The owner of the center.', + }), + chatRoom: t.relation('chatRoom', { + description: 'The chat room associated with the center.', + }), + centerStaff: t.relation('CenterStaff', { + description: 'The staff members of the center.', + }), + resume: t.relation('Resume', { + description: 'The resume of the center.', + }), + uploadedFileId: t.exposeID('uploadedFileId', { + description: 'The ID of the uploaded file.', + }), }), }); } diff --git a/src/CenterStaff/centerstaff.schema.ts b/src/CenterStaff/centerstaff.schema.ts index e76f6b4..d511cf7 100644 --- a/src/CenterStaff/centerstaff.schema.ts +++ b/src/CenterStaff/centerstaff.schema.ts @@ -22,13 +22,18 @@ export class CenterStaffSchema extends PothosSchema { return this.builder.prismaObject('CenterStaff', { description: 'A staff member of a center.', fields: (t) => ({ - staffId: t.exposeID('staffId'), - centerId: t.exposeID('centerId'), - serviceId: t.exposeID('serviceId'), - staff: t.relation('staff'), - center: t.relation('center'), - service: t.relation('service'), - createdWorkshop: t.relation('createdWorkshop'), + staffId: t.exposeID('staffId', { + description: 'The ID of the staff member.', + }), + centerId: t.exposeID('centerId', { + description: 'The ID of the center.', + }), + serviceId: t.exposeID('serviceId', { + description: 'The ID of the service.', + }), + staff: t.relation('staff', { + description: 'The staff member.', + }), }), }); } diff --git a/src/ChatRoom/chatroom.schema.ts b/src/ChatRoom/chatroom.schema.ts index b22c544..f2a46b8 100644 --- a/src/ChatRoom/chatroom.schema.ts +++ b/src/ChatRoom/chatroom.schema.ts @@ -22,17 +22,37 @@ export class ChatroomSchema extends PothosSchema { return this.builder.prismaObject('ChatRoom', { description: 'A chat room in the system.', fields: (t) => ({ - id: t.exposeID('id'), - type: t.exposeString('type'), - customerId: t.exposeID('customerId'), - centerId: t.exposeID('centerId'), - centerStaffId: t.exposeID('centerStaffId'), + id: t.exposeID('id', { + description: 'The ID of the chat room.', + }), + type: t.exposeString('type', { + description: 'The type of the chat room.', + }), + customerId: t.exposeID('customerId', { + description: 'The ID of the customer.', + }), + centerId: t.exposeID('centerId', { + description: 'The ID of the center.', + }), + centerStaffId: t.exposeID('centerStaffId', { + description: 'The ID of the center staff member.', + }), createdAt: t.expose('createdAt', { type: 'DateTime' }), - message: t.relation('message'), - customer: t.relation('customer'), - center: t.relation('center'), - centerStaff: t.relation('centerStaff'), - meetingRoom: t.relation('meetingRoom'), + message: t.relation('message', { + description: 'The messages in the chat room.', + }), + customer: t.relation('customer', { + description: 'The customer.', + }), + center: t.relation('center', { + description: 'The center.', + }), + centerStaff: t.relation('centerStaff', { + description: 'The center staff member.', + }), + meetingRoom: t.relation('meetingRoom', { + description: 'The meeting room.', + }), }), }); } diff --git a/src/Message/message.schema.ts b/src/Message/message.schema.ts index 5ede314..f9cedfb 100644 --- a/src/Message/message.schema.ts +++ b/src/Message/message.schema.ts @@ -22,14 +22,30 @@ export class MessageSchema extends PothosSchema { return this.builder.prismaObject('Message', { description: 'A message in the system.', fields: (t) => ({ - id: t.exposeID('id'), - senderId: t.exposeID('senderId'), - chatRoomId: t.exposeID('chatRoomId'), - // eslint-disable-next-line @typescript-eslint/no-explicit-any - message: t.expose('message', { type: 'Json' as any }), - sentAt: t.expose('sentAt', { type: 'DateTime' }), - sender: t.relation('sender'), - chatRoom: t.relation('chatRoom'), + id: t.exposeID('id', { + description: 'The ID of the message.', + }), + senderId: t.exposeID('senderId', { + description: 'The ID of the sender.', + }), + chatRoomId: t.exposeID('chatRoomId', { + description: 'The ID of the chat room.', + }), + message: t.expose('message', { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + type: 'Json' as any, + description: 'The message content.', + }), + sentAt: t.expose('sentAt', { + type: 'DateTime', + description: 'The date and time the message was sent.', + }), + sender: t.relation('sender', { + description: 'The sender of the message.', + }), + chatRoom: t.relation('chatRoom', { + description: 'The chat room.', + }), }), }); } diff --git a/src/Milestone/milestone.schema.ts b/src/Milestone/milestone.schema.ts index 0f082a1..3f35dc2 100644 --- a/src/Milestone/milestone.schema.ts +++ b/src/Milestone/milestone.schema.ts @@ -22,13 +22,22 @@ export class MilestoneSchema extends PothosSchema { return this.builder.prismaObject('Milestone', { description: 'A milestone in the system.', fields: (t) => ({ - id: t.exposeID('id'), - name: t.exposeString('name'), - order: t.exposeInt('order'), - description: t.exposeString('description'), - createdAt: t.expose('createdAt', { type: 'DateTime' }), - updatedAt: t.expose('updatedAt', { type: 'DateTime' }), - service: t.relation('service'), + id: t.exposeID('id', { + description: 'The ID of the milestone.', + }), + name: t.exposeString('name', { + description: 'The name of the milestone.', + }), + order: t.exposeInt('order', { + description: 'The order of the milestone.', + }), + description: t.exposeString('description', { + description: 'The description of the milestone.', + }), + createdAt: t.expose('createdAt', { + type: 'DateTime', + description: 'The date and time the milestone was created.', + }), }), }); } diff --git a/src/Order/order.schema.ts b/src/Order/order.schema.ts index 969ab5e..054c256 100644 --- a/src/Order/order.schema.ts +++ b/src/Order/order.schema.ts @@ -23,21 +23,46 @@ export class OrderSchema extends PothosSchema { return this.builder.prismaObject('Order', { description: 'An order in the system.', fields: (t) => ({ - id: t.exposeID('id'), - paymentId: t.exposeString('paymentId'), - userId: t.exposeID('userId'), - serviceId: t.exposeID('serviceId'), + id: t.exposeID('id', { + description: 'The ID of the order.', + }), + paymentId: t.exposeString('paymentId', { + description: 'The ID of the payment.', + }), + userId: t.exposeID('userId', { + description: 'The ID of the user.', + }), + serviceId: t.exposeID('serviceId', { + description: 'The ID of the service.', + }), status: t.expose('status', { type: OrderStatus, nullable: false, + description: 'The status of the order.', + }), + total: t.exposeInt('total', { + description: 'The total price of the order.', + }), + createdAt: t.expose('createdAt', { + type: 'DateTime', + description: 'The date and time the order was created.', + }), + updatedAt: t.expose('updatedAt', { + type: 'DateTime', + description: 'The date and time the order was updated.', + }), + user: t.relation('user', { + description: 'The user who made the order.', + }), + payment: t.relation('payment', { + description: 'The payment for the order.', + }), + service: t.relation('service', { + description: 'The service for the order.', + }), + refundTicket: t.relation('refundTicket', { + description: 'The refund ticket for the order.', }), - total: t.exposeInt('total'), - createdAt: t.expose('createdAt', { type: 'DateTime' }), - updatedAt: t.expose('updatedAt', { type: 'DateTime' }), - user: t.relation('user'), - payment: t.relation('payment'), - service: t.relation('service'), - refundTicket: t.relation('refundTicket'), }), }); } diff --git a/src/Payment/payment.schema.ts b/src/Payment/payment.schema.ts index 06cf670..528e4d0 100644 --- a/src/Payment/payment.schema.ts +++ b/src/Payment/payment.schema.ts @@ -24,15 +24,28 @@ export class PaymentSchema extends PothosSchema { return this.builder.prismaObject('Payment', { description: 'A payment in the system.', fields: (t) => ({ - id: t.exposeID('id'), - amount: t.exposeFloat('amount'), + id: t.exposeID('id', { + description: 'The ID of the payment.', + }), + amount: t.exposeFloat('amount', { + description: 'The amount of the payment.', + }), status: t.expose('status', { type: PaymentStatus, nullable: false, + description: 'The status of the payment.', + }), + createdAt: t.expose('createdAt', { + type: 'DateTime', + description: 'The date and time the payment was created.', + }), + updatedAt: t.expose('updatedAt', { + type: 'DateTime', + description: 'The date and time the payment was updated.', + }), + order: t.relation('Order', { + description: 'The order for the payment.', }), - createdAt: t.expose('createdAt', { type: 'DateTime' }), - updatedAt: t.expose('updatedAt', { type: 'DateTime' }), - order: t.relation('Order'), }), }); } diff --git a/src/RefundTicket/refundticket.schema.ts b/src/RefundTicket/refundticket.schema.ts index 7e38d73..4562428 100644 --- a/src/RefundTicket/refundticket.schema.ts +++ b/src/RefundTicket/refundticket.schema.ts @@ -22,12 +22,26 @@ export class RefundTicketSchema extends PothosSchema { refundTicket() { return this.builder.prismaObject('RefundTicket', { fields: (t) => ({ - id: t.exposeID('id'), - amount: t.exposeFloat('amount'), - status: t.exposeString('status'), - createdAt: t.expose('createdAt', { type: 'DateTime' }), - updatedAt: t.expose('updatedAt', { type: 'DateTime' }), - order: t.relation('order'), + id: t.exposeID('id', { + description: 'The ID of the refund ticket.', + }), + amount: t.exposeFloat('amount', { + description: 'The amount of the refund ticket.', + }), + status: t.exposeString('status', { + description: 'The status of the refund ticket.', + }), + createdAt: t.expose('createdAt', { + type: 'DateTime', + description: 'The date and time the refund ticket was created.', + }), + updatedAt: t.expose('updatedAt', { + type: 'DateTime', + description: 'The date and time the refund ticket was updated.', + }), + order: t.relation('order', { + description: 'The order for the refund ticket.', + }), }), }); } @@ -38,6 +52,8 @@ export class RefundTicketSchema extends PothosSchema { this.builder.queryFields((t) => ({ refundTickets: t.prismaField({ type: [this.refundTicket()], + description: + 'Retrieve a list of refund tickets with optional filtering, ordering, and pagination.', args: this.builder.generator.findManyArgs('RefundTicket'), resolve: async (query, root, args, ctx, info) => { return await this.prisma.refundTicket.findMany({ diff --git a/src/Resume/resume.schema.ts b/src/Resume/resume.schema.ts index e7a2f3e..67ffbec 100644 --- a/src/Resume/resume.schema.ts +++ b/src/Resume/resume.schema.ts @@ -47,19 +47,31 @@ export class ResumeSchema extends PothosSchema { return this.builder.prismaObject('ResumeFile', { description: 'A file associated with a resume.', fields: (t) => ({ - id: t.exposeID('id'), - resumeId: t.exposeID('resumeId'), - fileUrl: t.exposeString('fileUrl'), - type: t.exposeString('type'), + id: t.exposeID('id', { + description: 'The ID of the resume file.', + }), + resumeId: t.exposeID('resumeId', { + description: 'The ID of the resume.', + }), + fileUrl: t.exposeString('fileUrl', { + description: 'The URL of the resume file.', + }), + type: t.exposeString('type', { + description: 'The type of the resume file.', + }), createdAt: t.expose('createdAt', { type: 'DateTime', nullable: true, + description: 'The date and time the resume file was created.', }), updatedAt: t.expose('updatedAt', { type: 'DateTime', nullable: true, + description: 'The date and time the resume file was updated.', + }), + resume: t.relation('resume', { + description: 'The resume for the resume file.', }), - resume: t.relation('resume'), }), }); } diff --git a/src/Service/service.schema.ts b/src/Service/service.schema.ts index 9f86ef4..26ffda7 100644 --- a/src/Service/service.schema.ts +++ b/src/Service/service.schema.ts @@ -22,31 +22,67 @@ export class ServiceSchema extends PothosSchema { return this.builder.prismaObject('Service', { description: 'A service offered by a center.', fields: (t) => ({ - id: t.exposeID('id'), - name: t.exposeString('name'), - description: t.exposeString('description'), - price: t.exposeFloat('price'), - rating: t.exposeFloat('rating'), - imageFile: t.relation('imageFile'), - imageFileId: t.exposeID('imageFileId'), - imageFileUrl: t.exposeString('imageFileUrl'), + id: t.exposeID('id', { + description: 'The ID of the service.', + }), + name: t.exposeString('name', { + description: 'The name of the service.', + }), + description: t.exposeString('description', { + description: 'The description of the service.', + }), + price: t.exposeFloat('price', { + description: 'The price of the service.', + }), + rating: t.exposeFloat('rating', { + description: 'The rating of the service.', + }), + imageFile: t.relation('imageFile', { + description: 'The image file for the service.', + }), + imageFileId: t.exposeID('imageFileId', { + description: 'The ID of the image file for the service.', + }), + imageFileUrl: t.exposeString('imageFileUrl', { + description: 'The URL of the image file for the service.', + }), createdAt: t.expose('createdAt', { type: 'DateTime', nullable: true, + description: 'The date and time the service was created.', }), updatedAt: t.expose('updatedAt', { type: 'DateTime', nullable: true, + description: 'The date and time the service was updated.', + }), + center: t.relation('center', { + description: 'The center that offers the service.', + }), + centerId: t.exposeID('centerId', { + description: 'The ID of the center that offers the service.', + }), + workshop: t.relation('workshop', { + description: 'The workshop for the service.', + }), + milestone: t.relation('milestone', { + description: 'The milestone for the service.', + }), + schedule: t.relation('schedule', { + description: 'The schedule for the service.', + }), + serviceAndCategory: t.relation('serviceAndCategory', { + description: 'The service and category for the service.', + }), + workshopOrganization: t.relation('workshopOrganization', { + description: 'The workshop organization for the service.', + }), + user: t.relation('user', { + description: 'The user who requested the service.', + }), + userId: t.exposeID('userId', { + description: 'The ID of the user who requested the service.', }), - center: t.relation('center'), - centerId: t.exposeID('centerId'), - workshop: t.relation('workshop'), - milestone: t.relation('milestone'), - schedule: t.relation('schedule'), - serviceAndCategory: t.relation('serviceAndCategory'), - workshopOrganization: t.relation('workshopOrganization'), - user: t.relation('user'), - userId: t.exposeID('userId'), }), }); } diff --git a/src/ServiceAndCategory/serviceandcategory.schema.ts b/src/ServiceAndCategory/serviceandcategory.schema.ts index 3cbca72..ea9f6d5 100644 --- a/src/ServiceAndCategory/serviceandcategory.schema.ts +++ b/src/ServiceAndCategory/serviceandcategory.schema.ts @@ -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.', + }), }), }); } diff --git a/src/ServiceFeedback/servicefeedback.schema.ts b/src/ServiceFeedback/servicefeedback.schema.ts index 3a03629..f1ba4a7 100644 --- a/src/ServiceFeedback/servicefeedback.schema.ts +++ b/src/ServiceFeedback/servicefeedback.schema.ts @@ -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.', + }), }), }); } diff --git a/src/UploadedFile/uploadedfile.schema.ts b/src/UploadedFile/uploadedfile.schema.ts index 0c869c4..23f57c1 100644 --- a/src/UploadedFile/uploadedfile.schema.ts +++ b/src/UploadedFile/uploadedfile.schema.ts @@ -24,17 +24,30 @@ export class UploadedFileSchema extends PothosSchema { return this.builder.prismaObject('UploadedFile', { description: 'A file uploaded by a user.', fields: (t) => ({ - id: t.exposeID('id'), - userId: t.exposeID('userId'), - fileName: t.exposeString('fileName'), + id: t.exposeID('id', { + description: 'The ID of the uploaded file.', + }), + userId: t.exposeID('userId', { + description: 'The ID of the user who uploaded the file.', + }), + fileName: t.exposeString('fileName', { + description: 'The name of the file.', + }), // expose enum fileType: t.expose('fileType', { type: UploadedFileType, nullable: false, + description: 'The type of the file.', }), fileUrl: t.exposeString('fileUrl'), - uploadedAt: t.expose('uploadedAt', { type: 'DateTime' }), - user: t.relation('user'), + uploadedAt: t.expose('uploadedAt', { + type: 'DateTime', + nullable: true, + description: 'The date and time the file was uploaded.', + }), + user: t.relation('user', { + description: 'The user who uploaded the file.', + }), }), }); } diff --git a/src/User/user.schema.ts b/src/User/user.schema.ts index 694a30f..0bf299c 100644 --- a/src/User/user.schema.ts +++ b/src/User/user.schema.ts @@ -23,15 +23,38 @@ export class UserSchema extends PothosSchema { return this.builder.prismaObject('User', { description: 'A user in the system.', fields: (t) => ({ - id: t.exposeID('id'), - name: t.exposeString('name'), - email: t.exposeString('email'), - phoneNumber: t.exposeString('phoneNumber'), - oauthToken: t.exposeString('oauthToken', { nullable: true }), - role: t.exposeString('role'), - createdAt: t.expose('createdAt', { type: 'DateTime' }), - updatedAt: t.expose('updatedAt', { type: 'DateTime' }), - center: t.relation('center'), + id: t.exposeID('id', { + description: 'The ID of the user.', + }), + name: t.exposeString('name', { + description: 'The name of the user.', + }), + email: t.exposeString('email', { + description: 'The email of the user.', + }), + phoneNumber: t.exposeString('phoneNumber', { + description: 'The phone number of the user.', + }), + oauthToken: t.exposeString('oauthToken', { + nullable: true, + description: 'The OAuth token of the user.', + }), + role: t.exposeString('role', { + description: 'The role of the user.', + }), + createdAt: t.expose('createdAt', { + type: 'DateTime', + nullable: true, + description: 'The date and time the user was created.', + }), + updatedAt: t.expose('updatedAt', { + type: 'DateTime', + nullable: true, + description: 'The date and time the user was updated.', + }), + center: t.relation('center', { + description: 'The center of the user.', + }), }), }); } diff --git a/src/Workshop/workshop.schema.ts b/src/Workshop/workshop.schema.ts index ac30c59..d0f3c47 100644 --- a/src/Workshop/workshop.schema.ts +++ b/src/Workshop/workshop.schema.ts @@ -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'), }), }); } diff --git a/src/WorkshopMeetingRoom/workshopmeetingroom.schema.ts b/src/WorkshopMeetingRoom/workshopmeetingroom.schema.ts index d04504c..c2afada 100644 --- a/src/WorkshopMeetingRoom/workshopmeetingroom.schema.ts +++ b/src/WorkshopMeetingRoom/workshopmeetingroom.schema.ts @@ -21,8 +21,12 @@ export class WorkshopMeetingRoomSchema extends PothosSchema { workshopMeetingRoom() { return this.builder.prismaObject('WorkshopMeetingRoom', { fields: (t) => ({ - id: t.exposeID('id'), - workshopId: t.exposeID('workshopId'), + id: t.exposeID('id', { + description: 'The ID of the workshop meeting room.', + }), + workshopId: t.exposeID('workshopId', { + description: 'The ID of the workshop that the meeting room is for.', + }), }), }); } diff --git a/src/WorkshopOrganization/workshoporganization.schema.ts b/src/WorkshopOrganization/workshoporganization.schema.ts index 40ac9ba..53548bf 100644 --- a/src/WorkshopOrganization/workshoporganization.schema.ts +++ b/src/WorkshopOrganization/workshoporganization.schema.ts @@ -20,10 +20,18 @@ export class WorkshopOrganizationSchema extends PothosSchema { workshopOrganization() { return this.builder.prismaObject('WorkshopOrganization', { fields: (t) => ({ - workshopId: t.exposeID('workshopId'), - serviceId: t.exposeID('serviceId'), - workshop: t.relation('workshop'), - service: t.relation('service'), + workshopId: t.exposeID('workshopId', { + description: 'The ID of the workshop that the organization is for.', + }), + serviceId: t.exposeID('serviceId', { + description: 'The ID of the service that the organization is for.', + }), + workshop: t.relation('workshop', { + description: 'The workshop that the organization is for.', + }), + service: t.relation('service', { + description: 'The service that the organization is for.', + }), }), }); } diff --git a/src/WorkshopSubscription/workshopsubscription.schema.ts b/src/WorkshopSubscription/workshopsubscription.schema.ts index 39be4ba..543a3f9 100644 --- a/src/WorkshopSubscription/workshopsubscription.schema.ts +++ b/src/WorkshopSubscription/workshopsubscription.schema.ts @@ -21,10 +21,18 @@ export class WorkshopSubscriptionSchema extends PothosSchema { return this.builder.prismaObject('WorkshopSubscription', { description: 'A workshop subscription in the system.', fields: (t) => ({ - userId: t.exposeID('userId'), - workshopId: t.exposeID('workshopId'), - user: t.relation('user'), - workshop: t.relation('workshop'), + userId: t.exposeID('userId', { + description: 'The ID of the user who subscribed to the workshop.', + }), + workshopId: t.exposeID('workshopId', { + description: 'The ID of the workshop that the user subscribed to.', + }), + user: t.relation('user', { + description: 'The user who subscribed to the workshop.', + }), + workshop: t.relation('workshop', { + description: 'The workshop that the user subscribed to.', + }), }), }); }