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