aboutsummaryrefslogtreecommitdiff
path: root/prisma/schema.prisma
diff options
context:
space:
mode:
authorFactiven <[email protected]>2023-07-25 18:43:13 +0700
committerFactiven <[email protected]>2023-07-25 18:43:13 +0700
commit95393d7c8ba5cf6cd17f2038fc421c0d6d06f2e6 (patch)
tree97154270ec3ad400e63a683e194ea56eca0b9b0b /prisma/schema.prisma
parentadded .env disqus shortname (diff)
downloadmoopa-v.3.6.7-beta-v1.4.tar.xz
moopa-v.3.6.7-beta-v1.4.zip
Update_v3.6.7-beta-v1.4v.3.6.7-beta-v1.4
>Implementing database
Diffstat (limited to 'prisma/schema.prisma')
-rw-r--r--prisma/schema.prisma34
1 files changed, 34 insertions, 0 deletions
diff --git a/prisma/schema.prisma b/prisma/schema.prisma
new file mode 100644
index 0000000..adf0fa1
--- /dev/null
+++ b/prisma/schema.prisma
@@ -0,0 +1,34 @@
+datasource db {
+ provider = "postgresql"
+ url = env("DATABASE_URL")
+}
+
+generator client {
+ provider = "prisma-client-js"
+}
+
+model WatchListEpisode {
+ id String @id @default(cuid())
+ title String
+ episode Int
+ url String
+ timeWatched Int
+ duration Int
+ watchListItem WatchListItem @relation(fields: [watchListItemId], references: [id])
+ watchListItemId String
+}
+
+model WatchListItem {
+ id String @id @default(cuid())
+ title String
+ episodes WatchListEpisode[]
+ userProfile UserProfile? @relation(fields: [userProfileId], references: [id])
+ userProfileId String?
+}
+
+model UserProfile {
+ id String @id @default(cuid())
+ name String
+ setting Json
+ watchList WatchListItem[]
+}