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,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.',
}),
}),
});
}