Adds in AI chatting system.

This commit is contained in:
Cameron Redmore 2025-04-24 23:20:20 +01:00
parent 28c054de22
commit 8655eae39c
11 changed files with 1198 additions and 119 deletions

View file

@ -123,3 +123,25 @@ model Authenticator {
@@map("authenticators")
}
// --- Add Chat Models ---
model ChatThread {
id String @id @default(uuid())
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
messages ChatMessage[]
@@map("chat_threads")
}
model ChatMessage {
id String @id @default(uuid())
threadId String @map("thread_id")
sender String // 'user' or 'bot'
content String
createdAt DateTime @default(now()) @map("created_at")
thread ChatThread @relation(fields: [threadId], references: [id], onDelete: Cascade)
@@map("chat_messages")
}