Dateien nach "prisma" hochladen
This commit is contained in:
parent
b7cbac9eb3
commit
aad208d839
@ -118,6 +118,31 @@ enum InvitationStatus {
|
||||
REVOKED
|
||||
}
|
||||
|
||||
enum StorageLocation {
|
||||
FRIDGE
|
||||
FREEZER
|
||||
KITCHEN_CABINET_1
|
||||
KITCHEN_CABINET_2
|
||||
KITCHEN_CABINET_3
|
||||
PANTRY
|
||||
}
|
||||
|
||||
enum TrashType {
|
||||
RESTMUELL
|
||||
BIOMUELL
|
||||
GELBER_SACK
|
||||
PAPIER
|
||||
GLAS
|
||||
}
|
||||
|
||||
enum DocumentCategory {
|
||||
HAUSORDNUNG
|
||||
WLAN
|
||||
VERTRAG
|
||||
TUTORIAL
|
||||
SONSTIGES
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// USERS
|
||||
// ----------------------------------------------------------------------------
|
||||
@ -152,6 +177,8 @@ model User {
|
||||
guestCodesIssued GuestCode[]
|
||||
notifications Notification[]
|
||||
invitationsSent Invitation[] @relation("InvitationsSent")
|
||||
storageSlots StorageSlot[]
|
||||
documentsUploaded Document[]
|
||||
|
||||
@@map("users")
|
||||
}
|
||||
@ -366,7 +393,7 @@ model Inventory {
|
||||
purchasePrice Decimal? @map("purchase_price") @db.Decimal(8, 2)
|
||||
condition ItemCondition @default(GOOD)
|
||||
manualPdfUrl String? @map("manual_pdf_url") // Anleitung (z.B. Entkalkung)
|
||||
photoUrl String? @map("photo_url")
|
||||
photoUrls String[] @default([]) @map("photo_urls") // mehrere Fotos möglich
|
||||
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
@ -521,3 +548,53 @@ model Notification {
|
||||
@@index([userId, sentAt])
|
||||
@@map("notifications")
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// KÜCHEN-/SCHRANKPLANER & MÜLL-KALENDER
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// Ein einzelnes Fach im Kühlschrank/Gefrierfach/Schrank, das sich ein Mieter
|
||||
// reservieren ("beanspruchen") kann. NULL userId = frei/gemeinschaftlich.
|
||||
model StorageSlot {
|
||||
id String @id @default(uuid())
|
||||
location StorageLocation
|
||||
label String // z. B. "Fach 1 oben"
|
||||
userId String? @map("user_id")
|
||||
user User? @relation(fields: [userId], references: [id])
|
||||
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
|
||||
@@map("storage_slots")
|
||||
}
|
||||
|
||||
// Müll-Kalender: Abholtermine je Mülltyp, für den Vorabend-Push.
|
||||
model TrashSchedule {
|
||||
id String @id @default(uuid())
|
||||
type TrashType
|
||||
date DateTime
|
||||
reminderSentAt DateTime? @map("reminder_sent_at")
|
||||
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
|
||||
@@index([date])
|
||||
@@map("trash_schedule")
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// DOKUMENTEN-SAFE & TUTORIALS
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
model Document {
|
||||
id String @id @default(uuid())
|
||||
title String
|
||||
category DocumentCategory @default(SONSTIGES)
|
||||
url String // Link zur Datei/zum Video (PDF, Bild, YouTube o. Ä.)
|
||||
description String?
|
||||
uploadedById String @map("uploaded_by_id")
|
||||
uploadedBy User @relation(fields: [uploadedById], references: [id])
|
||||
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
|
||||
@@map("documents")
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user