-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathschema.prisma
56 lines (51 loc) · 1.3 KB
/
schema.prisma
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
generator client {
provider = "prisma-client-js"
binaryTargets = ["native", "rhel-openssl-1.1.x", "linux-musl-openssl-3.0.x", "linux-musl-arm64-openssl-3.0.x"]
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
// provider = "sqlite"
// url = env("DATABASE_URL")
}
model User {
id String @id @default(cuid())
name String
password String
email String @unique
image String?
accounts CxAccount[]
}
model CxAccount {
uid String @id @unique
username String
password String
cookies Json[]
info Json
lastLoginTime DateTime
courses Course[]
signlogs SignLog[]
setting Json
User User @relation(fields: [userId], references: [id])
userId String
}
model Course {
id String @id @unique
name String
courseId String
classId String
image String
link String
accounts CxAccount[]
}
model SignLog {
id String @id @default(cuid())
activityName String
activityId String
type Int
mode Int // 1 手动签到 2 自动签到
result String
time DateTime
accounts CxAccount @relation(fields: [accountId], references: [uid], onDelete: Cascade)
accountId String
}