merge change from db

This commit is contained in:
2024-10-25 14:49:16 +07:00
parent 2872ac69ef
commit 7e25e8d96b
26 changed files with 147 additions and 94 deletions

View File

@@ -7,6 +7,7 @@ import {
} from '@smatch-corp/nestjs-pothos';
import { Builder } from '../Graphql/graphql.builder';
import { PrismaService } from '../Prisma/prisma.service';
import { ChatRoomType } from '@prisma/client';
@Injectable()
export class ChatroomSchema extends PothosSchema {
@@ -25,7 +26,8 @@ export class ChatroomSchema extends PothosSchema {
id: t.exposeID('id', {
description: 'The ID of the chat room.',
}),
type: t.exposeString('type', {
type: t.expose('type', {
type: ChatRoomType,
description: 'The type of the chat room.',
}),
customerId: t.exposeID('customerId', {
@@ -37,7 +39,10 @@ export class ChatroomSchema extends PothosSchema {
centerStaffId: t.exposeID('centerStaffId', {
description: 'The ID of the center staff member.',
}),
createdAt: t.expose('createdAt', { type: 'DateTime' }),
createdAt: t.expose('createdAt', {
type: 'DateTime',
description: 'The date and time the chat room was created.',
}),
message: t.relation('message', {
description: 'The messages in the chat room.',
}),