feat: add UserHighlight model to database schema

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-12 07:18:57 +00:00
parent 7ca2076ca8
commit b7b18c8d69
2 changed files with 818 additions and 0 deletions

View File

@@ -33,6 +33,7 @@ model User {
bookmarks Bookmark[]
chapterBookmarks ChapterBookmark[]
highlights Highlight[]
userHighlights UserHighlight[]
notes Note[]
chatMessages ChatMessage[]
chatConversations ChatConversation[]
@@ -245,6 +246,20 @@ model Highlight {
@@index([verseId])
}
model UserHighlight {
id String @id @default(cuid())
userId String
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
verseId String
color String @default("yellow") // yellow, orange, pink, blue
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@unique([userId, verseId])
@@index([userId])
@@index([verseId])
}
model Note {
id String @id @default(uuid())
userId String