Added stroageUnit to contactType enum in db Schema

- contactInfo in StorageUnit is not optional anymore.
This commit is contained in:
Leon Meier 2023-05-16 00:03:05 +02:00
parent d51b063918
commit d7abadf6a6

View File

@ -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