from dataclasses import dataclass, field


@dataclass
class Window:
    width_m: float
    height_m: float
    area_m2: float
    opening_type: str


@dataclass
class Door:
    width_mm: float  # TODO: should this be m or mm?


@dataclass
class Room:
    name: str
    width_m: float
    length_m: float
    area_m2: float
    windows: list[Window] = field(default_factory=list[Window])
    doors: list[Door] = field(default_factory=list[Door])


@dataclass
class Floor:
    level: int | None
    name: str | None
    rooms: list[Room] = field(default_factory=list[Room])


@dataclass
class Plan:
    uid: str
    name: str | None
    address: str | None = None
    postcode: str | None = None
    floors: list[Floor] = field(default_factory=list[Floor])
