Files
logaiback/prisma/schema.prisma
T
2026-04-16 14:18:51 +02:00

55 lines
1.5 KiB
Plaintext

generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "sqlite"
}
model User {
id Int @id @default(autoincrement())
email String @unique
password String
name String?
isAdmin Boolean @default(false)
createdAt DateTime @default(now())
conversations Conversation[]
}
model Conversation {
id Int @id @default(autoincrement())
title String
userId Int
user User @relation(fields: [userId], references: [id])
messages Message[]
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model Message {
id Int @id @default(autoincrement())
role String // 'user', 'assistant', 'system'
content String
conversationId Int
conversation Conversation @relation(fields: [conversationId], references: [id], onDelete: Cascade)
createdAt DateTime @default(now())
}
model Service {
id Int @id @default(autoincrement())
name String
type String // 'docker' or 'host'
pathOrContainerId String
alertKeyword String? // This will be deprecated by the AI model
createdAt DateTime @default(now())
}
model GlobalSettings {
id Int @id @default(1)
notionToken String?
notionDbId String?
ollamaUrl String? // e.g., http://localhost:11434
ollamaModel String? // e.g., qwen:7b
searxngUrl String? // e.g., http://localhost:8080
}