revert WIP: implement public file visibility feature and enhance search functionality
This commit is contained in:
2025-05-09 08:55:45 +00:00
parent 99397e774c
commit b63e3ae77f
10 changed files with 33 additions and 254 deletions
+12 -1
View File
@@ -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
}