inventory

This commit is contained in:
2026-03-14 21:23:22 -05:00
parent d21e2e3c0b
commit 472c36915c
14 changed files with 730 additions and 1 deletions

View File

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