mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
Window carries no opening_type — ventilation table is the sole persistence point 🟩
This commit is contained in:
parent
3f5b3cf172
commit
7a1aaf4965
3 changed files with 0 additions and 4 deletions
|
|
@ -73,7 +73,6 @@ def _map_window(wi: api.WallItem) -> Window:
|
||||||
width_m=round(wi.size.x, 2),
|
width_m=round(wi.size.x, 2),
|
||||||
height_m=round(wi.size.z, 2),
|
height_m=round(wi.size.z, 2),
|
||||||
area_m2=round(wi.size.x * wi.size.z, 2),
|
area_m2=round(wi.size.x * wi.size.z, 2),
|
||||||
opening_type=wi.symbol.id.removeprefix("window"),
|
|
||||||
ventilation=_map_window_ventilation(wi.custom_displayable_fields),
|
ventilation=_map_window_ventilation(wi.custom_displayable_fields),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,6 @@ class Window:
|
||||||
width_m: float
|
width_m: float
|
||||||
height_m: float
|
height_m: float
|
||||||
area_m2: float
|
area_m2: float
|
||||||
opening_type: str
|
|
||||||
ventilation: Optional[WindowVentilation] = None
|
ventilation: Optional[WindowVentilation] = None
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,6 @@ class MagicPlanWindowModel(SQLModel, table=True):
|
||||||
width_m: Optional[float] = None
|
width_m: Optional[float] = None
|
||||||
height_m: Optional[float] = None
|
height_m: Optional[float] = None
|
||||||
area_m2: Optional[float] = None
|
area_m2: Optional[float] = None
|
||||||
opening_type: Optional[str] = None
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_domain(cls, window: Window, room_id: int) -> "MagicPlanWindowModel":
|
def from_domain(cls, window: Window, room_id: int) -> "MagicPlanWindowModel":
|
||||||
|
|
@ -86,7 +85,6 @@ class MagicPlanWindowModel(SQLModel, table=True):
|
||||||
width_m=window.width_m,
|
width_m=window.width_m,
|
||||||
height_m=window.height_m,
|
height_m=window.height_m,
|
||||||
area_m2=window.area_m2,
|
area_m2=window.area_m2,
|
||||||
opening_type=window.opening_type,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue