feat(topology): nullable layout coords on LAN + TopologyDecky

MazeNET phase 2 step 5. Pure storage — the generator emits None for
x/y and the web canvas fills them in later. No logic changes; no
compose, deploy, or validator impact.
This commit is contained in:
2026-04-20 17:48:29 -04:00
parent e475c0957e
commit 9afaac7612
4 changed files with 77 additions and 0 deletions

View File

@@ -232,6 +232,10 @@ class LAN(SQLModel, table=True):
docker_network_id: Optional[str] = Field(default=None)
subnet: str
is_dmz: bool = Field(default=False)
# Canvas layout coordinates (set by the web editor). Nullable so
# generator-emitted LANs don't need auto-layout at generation time.
x: Optional[float] = Field(default=None)
y: Optional[float] = Field(default=None)
class TopologyDecky(SQLModel, table=True):
@@ -270,6 +274,10 @@ class TopologyDecky(SQLModel, table=True):
updated_at: datetime = Field(
default_factory=lambda: datetime.now(timezone.utc)
)
# Canvas layout coordinates (set by the web editor). Nullable so
# generator-emitted deckies don't need auto-layout at generation time.
x: Optional[float] = Field(default=None)
y: Optional[float] = Field(default=None)
class TopologyEdge(SQLModel, table=True):