perf: memo GridCard, fuse save fns, fix slash tab active color
This commit is contained in:
@@ -57,6 +57,7 @@ model User {
|
||||
bridgeNotes BridgeNote[]
|
||||
bridgeSuggestions BridgeSuggestion[]
|
||||
flashcardDecks FlashcardDeck[]
|
||||
errorLogs ErrorLog[]
|
||||
}
|
||||
|
||||
model Account {
|
||||
@@ -204,6 +205,7 @@ model Note {
|
||||
targetLiveBlocks LiveBlockRef[] @relation("TargetLiveBlocks")
|
||||
flashcards Flashcard[]
|
||||
properties NoteProperty[]
|
||||
embeddingChunks NoteEmbeddingChunk[]
|
||||
|
||||
@@index([isPinned])
|
||||
@@index([isArchived])
|
||||
@@ -342,6 +344,7 @@ model UserAISettings {
|
||||
noteHistoryMode String @default("manual")
|
||||
autoSave Boolean @default(true)
|
||||
aiProcessingConsent Boolean @default(false)
|
||||
svgComplexity String @default("simple")
|
||||
integrationTokens Json? // Stores third-party integration tokens (Readwise, Calendar, etc.)
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@ -371,6 +374,24 @@ model NoteEmbedding {
|
||||
@@index([noteId])
|
||||
}
|
||||
|
||||
model NoteEmbeddingChunk {
|
||||
id String @id @default(cuid())
|
||||
noteId String
|
||||
fragmentId String
|
||||
chunkIndex Int
|
||||
content String
|
||||
charCount Int
|
||||
embedding Unsupported("vector(1536)")?
|
||||
embeddingModel String? @default("text-embedding-3-small")
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
note Note @relation(fields: [noteId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@unique([noteId, fragmentId])
|
||||
@@index([noteId])
|
||||
@@index([fragmentId])
|
||||
}
|
||||
|
||||
model NoteLink {
|
||||
id String @id @default(cuid())
|
||||
sourceNoteId String
|
||||
@@ -711,6 +732,7 @@ model UserAPIKey {
|
||||
encryptedKey String
|
||||
keyHash String
|
||||
model String?
|
||||
baseUrl String? @db.Text
|
||||
isActive Boolean @default(true)
|
||||
lastUsedAt DateTime?
|
||||
lastUsedFor String?
|
||||
@@ -962,3 +984,23 @@ model AuditLog {
|
||||
@@index([action])
|
||||
@@index([createdAt])
|
||||
}
|
||||
|
||||
model ErrorLog {
|
||||
id String @id @default(cuid())
|
||||
userId String?
|
||||
message String
|
||||
stack String? @db.Text
|
||||
url String?
|
||||
userAgent String? @db.Text
|
||||
component String? // Component name where error occurred
|
||||
severity String @default("error") // error, warning, info
|
||||
resolved Boolean @default(false)
|
||||
createdAt DateTime @default(now())
|
||||
|
||||
user User? @relation(fields: [userId], references: [id], onDelete: SetNull)
|
||||
|
||||
@@index([userId])
|
||||
@@index([severity])
|
||||
@@index([createdAt])
|
||||
@@index([resolved])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user