-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
92 lines (78 loc) · 1.89 KB
/
types.ts
File metadata and controls
92 lines (78 loc) · 1.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
import { PrismaClient } from "@prisma/client"
import type { AIModule } from "@prisma/client"
const prisma = new PrismaClient()
type PrismaModels = Omit<typeof prisma, "$on" | "$connect" | "$disconnect" | "$use" | "$transaction" | "$extends">
export type Topic = PrismaModels["topic"]["create"]["data"]
export type LearningPathItem = PrismaModels["learningPathItem"]["create"]["data"]
export type ContentItem = PrismaModels["contentItem"]["create"]["data"]
export type Bookmark = PrismaModels["bookmark"]["create"]["data"]
// Removed duplicate LearningPathWithItems interface
export interface ContentItemWithBookmarks extends ContentItem {
bookmarks: Bookmark[]
rating?: number
ratingCount?: number
version?: string
}
export interface QuizQuestion {
id: string
question: string
options: string[]
correctAnswer: string
}
export interface Annotation {
id: string
text: string
annotation: string
userId: string
contentItemId: string
createdAt: string
}
export interface LearningItem {
id: string
title: string
type: string
difficulty: string
estimatedTime: string
}
export interface ReviewSession {
id: string
userId: string
dueDate: string
completed: boolean
isUrgent: boolean
items: ReviewItem[]
completedAt?: string
}
export interface ReviewItem {
id: string
type: "flashcard" | "quiz"
question: string
answer: string
isCorrect?: boolean
answeredAt?: string
}
export interface PeerComparison {
percentile: number
}
export interface LearningPathModule {
title: string
description: string
}
export interface LearningPathContent {
title: string
description: string
modules: LearningPathModule[]
}
export interface LearningPath {
id: string
title: string
description: string
content: LearningPathContent
}
export interface LearningPathWithItems extends LearningPath {
items: {
id: string
order: number
aiModule: AIModule
}[]
}