Refactor code structure for improved readability and maintainability

This commit is contained in:
2025-04-13 07:19:07 +02:00
parent 3c19fc0fba
commit 08d1278f11
19 changed files with 1063 additions and 97 deletions
+13
View File
@@ -63,6 +63,7 @@ model User {
accounts Account[]
sessions Session[]
posts Post[]
files File[] // Relation to the File model
}
model VerificationToken {
@@ -72,3 +73,15 @@ model VerificationToken {
@@unique([identifier, token])
}
model File {
id String @id @default(cuid())
url String
name String
size Int // Size in bytes
extension String
uploadDate DateTime @default(now())
uploadedBy User? @relation(fields: [uploadedById], references: [id], onDelete: SetNull)
uploadedById String?
}