From b29550f4299e4fb21cbb0919197e164f4cdbaaff Mon Sep 17 00:00:00 2001 From: Spacelord Date: Sun, 21 May 2023 01:53:52 +0200 Subject: [PATCH] Added contactInfo to item in DB Schema --- prisma/schema.prisma | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 5f9fbcf..61eecb0 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -40,12 +40,15 @@ model Item { comment String? status itemStatus @default(normal) /// TODO: Would it be better to create a separate model for this as well instead of providing several static statuses to choose from(enum)? + contactInfo contactInfo? @relation(fields: [contactInfoId], references: [id]) /// + contactInfoId Int? + manufacturer String category itemCategory? @relation(fields: [categoryId], references: [id]) categoryId Int? - contents Item[] @relation("items") /// Item beinhaltet.. + contents Item[] @relation("items") /// Item beinhaltet.. baseItem Item[] @relation("items") /// Item zugehörig zu. storageLocation StorageLocation? @relation(fields: [storageLocationId], references: [id]) @@ -95,10 +98,12 @@ model contactInfo { country String StorageUnit StorageUnit[] + Item Item[] } enum contactType { storageUnit + owner person customer company