forked from SudhanPlayz/Discord-MusicBot
-
Notifications
You must be signed in to change notification settings - Fork 79
/
schema.prisma
56 lines (49 loc) · 1.43 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
// 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"
// Allows the Prisma ORM to be built for your native platform and for docker platform
binaryTargets = ["native", "debian-openssl-1.1.x", "debian-openssl-3.0.x"]
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model Song {
id Int @id @default(autoincrement())
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
name String
link String
artist String?
Playlist Playlist? @relation(fields: [playlistId], references: [id])
playlistId Int?
}
model Playlist {
id Int @id @default(autoincrement())
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
name String
user User @relation(fields: [userId], references: [id])
userId String
songs Song[]
}
model User {
id String @id
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
username String @unique
DJ Boolean @default(false)
playlists Playlist[]
}
model UserAuth {
id Int @id @default(autoincrement())
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
userId String @unique
access_token String
token_type String
expires_in Int
refresh_token String
scope String
}