Adds in AI chatting system.
This commit is contained in:
parent
28c054de22
commit
8655eae39c
11 changed files with 1198 additions and 119 deletions
|
@ -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")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue