feat(layout): Add Tiers to FacilitySection and Position
- Added 'tiers' to FacilitySection for multi-level racks - Added 'tier' to FacilityPosition for Z-axis addressing - Updated unique constraint for positions
This commit is contained in:
parent
9cabd54718
commit
3a11590795
1 changed files with 3 additions and 1 deletions
|
|
@ -587,6 +587,7 @@ model FacilitySection {
|
||||||
height Int
|
height Int
|
||||||
rows Int // Grid rows
|
rows Int // Grid rows
|
||||||
columns Int // Grid columns
|
columns Int // Grid columns
|
||||||
|
tiers Int @default(1) // Number of vertical tiers
|
||||||
spacing Int @default(12) // inches between positions
|
spacing Int @default(12) // inches between positions
|
||||||
positions FacilityPosition[]
|
positions FacilityPosition[]
|
||||||
createdAt DateTime @default(now())
|
createdAt DateTime @default(now())
|
||||||
|
|
@ -601,11 +602,12 @@ model FacilityPosition {
|
||||||
sectionId String
|
sectionId String
|
||||||
row Int
|
row Int
|
||||||
column Int
|
column Int
|
||||||
|
tier Int @default(1) // Vertical level (1 = bottom)
|
||||||
slot Int @default(1) // For multi-plant positions
|
slot Int @default(1) // For multi-plant positions
|
||||||
status String @default("EMPTY") // EMPTY, OCCUPIED, RESERVED, DAMAGED
|
status String @default("EMPTY") // EMPTY, OCCUPIED, RESERVED, DAMAGED
|
||||||
plant FacilityPlant?
|
plant FacilityPlant?
|
||||||
|
|
||||||
@@unique([sectionId, row, column, slot])
|
@@unique([sectionId, row, column, tier, slot])
|
||||||
@@map("facility_positions")
|
@@map("facility_positions")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue