finalized dashboard
This commit is contained in:
+8
-37
@@ -14,9 +14,9 @@ model User {
|
||||
password String
|
||||
collections Collection[]
|
||||
tags Tag[]
|
||||
pinnedCollections PinnedCollections[]
|
||||
pinnedLinks PinnedLinks[]
|
||||
pinnedTags PinnedTags[]
|
||||
|
||||
pinnedLinks Link[]
|
||||
|
||||
collectionsJoined UsersAndCollections[]
|
||||
isPrivate Boolean @default(false)
|
||||
whitelistedUsers String[] @default([])
|
||||
@@ -29,7 +29,8 @@ model Collection {
|
||||
description String @default("")
|
||||
color String @default("#0ea5e9")
|
||||
isPublic Boolean @default(false)
|
||||
pins PinnedCollections[]
|
||||
|
||||
|
||||
owner User @relation(fields: [ownerId], references: [id])
|
||||
ownerId Int
|
||||
members UsersAndCollections[]
|
||||
@@ -39,37 +40,6 @@ model Collection {
|
||||
@@unique([name, ownerId])
|
||||
}
|
||||
|
||||
model PinnedCollections {
|
||||
id Int @id @default(autoincrement())
|
||||
|
||||
user User @relation(fields: [userId], references: [id])
|
||||
userId Int
|
||||
|
||||
collection Collection @relation(fields: [collectionId], references: [id])
|
||||
collectionId Int
|
||||
}
|
||||
|
||||
model PinnedLinks {
|
||||
id Int @id @default(autoincrement())
|
||||
|
||||
user User @relation(fields: [userId], references: [id])
|
||||
userId Int
|
||||
|
||||
link Link @relation(fields: [linkId], references: [id])
|
||||
linkId Int
|
||||
}
|
||||
|
||||
model PinnedTags {
|
||||
id Int @id @default(autoincrement())
|
||||
|
||||
user User @relation(fields: [userId], references: [id])
|
||||
userId Int
|
||||
|
||||
tag Tag @relation(fields: [tagId], references: [id])
|
||||
tagId Int
|
||||
}
|
||||
|
||||
|
||||
model UsersAndCollections {
|
||||
user User @relation(fields: [userId], references: [id])
|
||||
userId Int
|
||||
@@ -89,10 +59,12 @@ model Link {
|
||||
name String
|
||||
url String
|
||||
title String
|
||||
|
||||
pinnedBy User[]
|
||||
|
||||
collection Collection @relation(fields: [collectionId], references: [id])
|
||||
collectionId Int
|
||||
tags Tag[]
|
||||
pins PinnedLinks[]
|
||||
createdAt DateTime @default(now())
|
||||
}
|
||||
|
||||
@@ -100,7 +72,6 @@ model Tag {
|
||||
id Int @id @default(autoincrement())
|
||||
name String
|
||||
links Link[]
|
||||
pins PinnedTags[]
|
||||
owner User @relation(fields: [ownerId], references: [id])
|
||||
ownerId Int
|
||||
|
||||
|
||||
Reference in New Issue
Block a user