diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 09109a1..d89dff5 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -67,10 +67,10 @@ model StorageLocation { /// A StorageUnit is the base and can hold multiple StorageLocations. model StorageUnit { id Int @id @default(autoincrement()) - name String + name String @unique - contactInfo contactInfo? @relation(fields: [contactInfoId], references: [id]) - contactInfoId Int? + contactInfo contactInfo @relation(fields: [contactInfoId], references: [id]) + contactInfoId Int StorageLocation StorageLocation[] } @@ -98,6 +98,7 @@ model contactInfo { } enum contactType { + storageUnit person customer company