new message entity

This commit is contained in:
José Salazar
2025-11-26 13:24:06 -05:00
parent d80d8111fb
commit c896c695a8
3 changed files with 88 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
type Message @table(name: "messages") {
id: UUID! @default(expr: "uuidV4()")
conversationId: UUID! # conversation_id (FK lógica a Conversation.id)
senderName: String!
content: String!
readBy: String # read_by (jsonb -> String, array de user IDs)
createdDate: Timestamp @default(expr: "request.time")
updatedDate: Timestamp @default(expr: "request.time")
createdBy: String @default(expr: "auth.uid")
}