revert 99397e774c
revert WIP: implement public file visibility feature and enhance search functionality
This commit is contained in:
+12
-1
@@ -15,6 +15,17 @@ datasource db {
|
||||
url = env("DATABASE_URL")
|
||||
}
|
||||
|
||||
model Post {
|
||||
id Int @id @default(autoincrement())
|
||||
name String
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
createdBy User @relation(fields: [createdById], references: [id])
|
||||
createdById String
|
||||
|
||||
@@index([name])
|
||||
}
|
||||
|
||||
// Necessary for Next auth
|
||||
model Account {
|
||||
@@ -52,6 +63,7 @@ model User {
|
||||
image String?
|
||||
accounts Account[]
|
||||
sessions Session[]
|
||||
posts Post[]
|
||||
files File[] // Relation to the File model
|
||||
}
|
||||
|
||||
@@ -73,5 +85,4 @@ model File {
|
||||
description String @default("")
|
||||
uploadedBy User? @relation(fields: [uploadedById], references: [id], onDelete: SetNull)
|
||||
uploadedById String?
|
||||
public Boolean @default(false) // Indicates if the file is public or private
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user