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. /// A StorageUnit is the base and can hold multiple StorageLocations.
model StorageUnit { model StorageUnit {
id Int @id @default(autoincrement()) id Int @id @default(autoincrement())
name String name String @unique
contactInfo contactInfo? @relation(fields: [contactInfoId], references: [id]) contactInfo contactInfo @relation(fields: [contactInfoId], references: [id])
contactInfoId Int? contactInfoId Int
StorageLocation StorageLocation[] StorageLocation StorageLocation[]
} }
@ -98,6 +98,7 @@ model contactInfo {
} }
enum contactType { enum contactType {
storageUnit
person person
customer customer
company company