-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Copy pathschema.prisma
64 lines (54 loc) · 1.51 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
57
58
59
60
61
62
63
64
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
generator client {
provider = "prisma-client-js"
}
model User {
id Int @id @default(autoincrement())
email String?
username String?
projects Project[]
}
model Project {
id String @id @default(uuid())
name String
description String
primaryColor String @default("sky")
authMethod String @default("usernameAndPassword")
creativityLevel String @default("balanced")
createdAt DateTime @default(now())
status String @default("pending")
referrer String @default("unknown")
zipDownloadedAt DateTime?
userId Int?
user User? @relation(fields: [userId], references: [id])
files File[]
logs Log[]
feedbacks Feedback[]
}
model Feedback {
id String @id @default(uuid())
score Int
message String
createdAt DateTime @default(now())
projectId String
project Project @relation(fields: [projectId], references: [id])
}
model File {
id String @id @default(uuid())
name String
content String
createdAt DateTime @default(now())
projectId String
project Project @relation(fields: [projectId], references: [id])
@@index([name, projectId])
}
model Log {
id String @id @default(uuid())
content String
createdAt DateTime @default(now())
projectId String
project Project @relation(fields: [projectId], references: [id])
}