-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.prisma
47 lines (41 loc) · 1.41 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
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model User {
id String @db.VarChar(255) @id
username String @db.VarChar(255)
email String @db.VarChar(255)
projects Project[]
Credentials Credential[]
}
model Credential {
id Int @default(autoincrement()) @id
User User @relation(fields: [userId], references: [id], onDelete: Cascade)
userId String @db.VarChar(255)
config Json @db.Json
apiService String @db.VarChar(20)
}
model Project {
id Int @default(autoincrement()) @id
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
userId String @db.VarChar(255)
boardId String @db.VarChar(255)
title String @db.VarChar(100)
url String @db.VarChar(255)
serviceName String @db.VarChar(20)
cards Card[]
}
model Card {
id Int @default(autoincrement()) @id
cardId String @db.VarChar(255)
project Project @relation(fields: [projectId], references: [id], onDelete: Cascade)
projectId Int
X Int
Y Int
}