inventory
This commit is contained in:
@@ -119,6 +119,16 @@ model InventoryItem {
|
||||
usedInBomLines InventoryBomLine[] @relation("InventoryBomComponent")
|
||||
}
|
||||
|
||||
model Warehouse {
|
||||
id String @id @default(cuid())
|
||||
code String @unique
|
||||
name String
|
||||
notes String
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
locations WarehouseLocation[]
|
||||
}
|
||||
|
||||
model Customer {
|
||||
id String @id @default(cuid())
|
||||
name String
|
||||
@@ -169,6 +179,20 @@ model InventoryBomLine {
|
||||
@@index([componentItemId])
|
||||
}
|
||||
|
||||
model WarehouseLocation {
|
||||
id String @id @default(cuid())
|
||||
warehouseId String
|
||||
code String
|
||||
name String
|
||||
notes String
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
warehouse Warehouse @relation(fields: [warehouseId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@unique([warehouseId, code])
|
||||
@@index([warehouseId])
|
||||
}
|
||||
|
||||
model Vendor {
|
||||
id String @id @default(cuid())
|
||||
name String
|
||||
|
||||
Reference in New Issue
Block a user