feat(flashcards): révision SM-2, génération IA et page /revision
Some checks failed
CI / Lint, Test & Build (push) Failing after 32s
CI / Deploy production (on server) (push) Has been skipped

Livre US-FLASHCARDS avec decks, session de révision, stats et migration Prisma. Finalise le Web Clipper (i18n 15 langues) et corrige les erreurs ESLint bloquant la CI.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Antigravity
2026-05-24 19:22:20 +00:00
parent 8697ae244f
commit 36336e6b0d
50 changed files with 7687 additions and 98 deletions

View File

@@ -54,6 +54,7 @@ model User {
noteClusters NoteCluster[]
bridgeNotes BridgeNote[]
bridgeSuggestions BridgeSuggestion[]
flashcardDecks FlashcardDeck[]
}
model Account {
@@ -111,6 +112,7 @@ model Notebook {
children Notebook[] @relation("NotebookTree")
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
workflows Workflow[]
flashcardDeck FlashcardDeck?
@@index([userId, order])
@@index([userId])
@@ -195,6 +197,7 @@ model Note {
bridgeNote BridgeNote?
sourceLiveBlocks LiveBlockRef[] @relation("SourceLiveBlocks")
targetLiveBlocks LiveBlockRef[] @relation("TargetLiveBlocks")
flashcards Flashcard[]
@@index([isPinned])
@@index([isArchived])
@@ -855,3 +858,49 @@ model BridgeSuggestion {
@@index([userId, isDismissed])
@@index([clusterAId, clusterBId])
}
model FlashcardDeck {
id String @id @default(cuid())
userId String
notebookId String? @unique
name String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
flashcards Flashcard[]
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
notebook Notebook? @relation(fields: [notebookId], references: [id], onDelete: SetNull)
@@index([userId])
}
model Flashcard {
id String @id @default(cuid())
deckId String
noteId String?
front String
back String
type String @default("qa")
interval Int @default(1)
easinessFactor Float @default(2.5)
nextReviewAt DateTime @default(now())
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
deck FlashcardDeck @relation(fields: [deckId], references: [id], onDelete: Cascade)
note Note? @relation(fields: [noteId], references: [id], onDelete: SetNull)
reviews FlashcardReview[]
@@index([deckId])
@@index([noteId])
@@index([nextReviewAt])
}
model FlashcardReview {
id String @id @default(cuid())
cardId String
grade Int
reviewedAt DateTime @default(now())
card Flashcard @relation(fields: [cardId], references: [id], onDelete: Cascade)
@@index([cardId])
@@index([reviewedAt])
}