@@ -3,11 +3,76 @@ generator client {
3
3
}
4
4
5
5
datasource db {
6
- provider = " mysql "
6
+ provider = " postgresql "
7
7
url = env (" DATABASE_URL " )
8
8
relationMode = " prisma "
9
9
}
10
10
11
- model Dummy {
12
- id Int @id @default (autoincrement () )
13
- }
11
+
12
+ model Account {
13
+ id String @id @default (cuid () )
14
+ userId String
15
+ type String
16
+ provider String
17
+ providerAccountId String
18
+ refresh_token String ? @db.Text
19
+ access_token String ? @db.Text
20
+ expires_at Int ?
21
+ token_type String ?
22
+ scope String ?
23
+ id_token String ? @db.Text
24
+ session_state String ?
25
+
26
+ user User @relation (fields : [userId ] , references : [id ] , onDelete : Cascade )
27
+
28
+ @@unique ([provider , providerAccountId ] )
29
+ @@index ([userId ] )
30
+ }
31
+
32
+ model Session {
33
+ id String @id @default (cuid () )
34
+ sessionToken String @unique
35
+ userId String
36
+ expires DateTime
37
+ user User @relation (fields : [userId ] , references : [id ] , onDelete : Cascade )
38
+
39
+ @@index ([userId ] )
40
+ }
41
+
42
+ model User {
43
+ id String @id @default (cuid () )
44
+ name String ?
45
+ email String ? @unique
46
+ emailVerified DateTime ?
47
+ image String ?
48
+ createdAt DateTime @default (now () )
49
+ accounts Account []
50
+ sessions Session []
51
+ }
52
+
53
+ model VerificationToken {
54
+ identifier String
55
+ token String @unique
56
+ expires DateTime
57
+
58
+ @@unique ([identifier , token ] )
59
+ }
60
+
61
+ model Course {
62
+ id String @id @default (cuid () )
63
+ name String
64
+ description String
65
+ code String
66
+ credits Int
67
+ stream String
68
+ prereqs String
69
+ professor String @default (" To be announced " )
70
+ duration Int
71
+ timing String
72
+ semester String
73
+ seats Int
74
+ openSeats Int
75
+ rating Float @default (0 )
76
+ ratingCount Int @default (0 )
77
+ createdAt DateTime @default (now () )
78
+ }
0 commit comments