aboutsummaryrefslogtreecommitdiff
path: root/prisma/schema.prisma
blob: d4b66074f762b8737c5aaa2fa2dd3ee29fcc4bcd (plain) (blame)
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
datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}

generator client {
  provider = "prisma-client-js"
}

model RemovedMedia {
  id        String   @id @default(cuid())
  aniId     String?
  additions String[]
}

model UserProfile {
  id               String             @id @default(cuid())
  name             String             @unique
  setting          Json?
  WatchListEpisode WatchListEpisode[]
}

model WatchListEpisode {
  id            String      @id @default(cuid())
  aniId         String?
  title         String?
  aniTitle      String?
  image         String?
  episode       Int?
  timeWatched   Int?
  duration      Int?
  provider      String?
  nextId        String?
  nextNumber    Int?
  dub           Boolean?
  createdDate   DateTime?   @default(now())
  userProfile   UserProfile @relation(fields: [userProfileId], references: [name], onDelete: Cascade)
  userProfileId String
  watchId       String
}