feat(rack-planner): implement port-to-port connections (patch cables) with dynamic SVG visualization layer
This commit is contained in:
@@ -53,6 +53,23 @@ model Port {
|
||||
nativeVlan Int?
|
||||
vlans PortVlan[]
|
||||
notes String?
|
||||
|
||||
// Connections — port can be source or target of a patch cable
|
||||
sourceConnections Connection[] @relation("SourcePort")
|
||||
targetConnections Connection[] @relation("TargetPort")
|
||||
}
|
||||
|
||||
model Connection {
|
||||
id String @id @default(cuid())
|
||||
fromPortId String
|
||||
fromPort Port @relation("SourcePort", fields: [fromPortId], references: [id], onDelete: Cascade)
|
||||
toPortId String
|
||||
toPort Port @relation("TargetPort", fields: [toPortId], references: [id], onDelete: Cascade)
|
||||
color String? // Optional custom cable color
|
||||
label String? // Optional cable label (e.g. "Cable #104")
|
||||
createdAt DateTime @default(now())
|
||||
|
||||
@@unique([fromPortId, toPortId])
|
||||
}
|
||||
|
||||
model Vlan {
|
||||
|
||||
Reference in New Issue
Block a user