From 95393d7c8ba5cf6cd17f2038fc421c0d6d06f2e6 Mon Sep 17 00:00:00 2001 From: Factiven Date: Tue, 25 Jul 2023 18:43:13 +0700 Subject: Update_v3.6.7-beta-v1.4 >Implementing database --- prisma/schema.prisma | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 prisma/schema.prisma (limited to 'prisma/schema.prisma') 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[] +} -- cgit v1.2.3