Model/domain/epc/property_overrides/construction_age_band.py
Jun-te Kim 3a0a122b7f Group landlord property-override enums under domain/epc/property_overrides 🟪
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 14:49:58 +00:00

31 lines
1.1 KiB
Python

from enum import Enum
class ConstructionAgeBand(Enum):
"""A landlord-supplied construction age band, as resolved by the
landlord-description-overrides context.
Each member's value is the RdSAP England-&-Wales age-band **letter code**
(A..M) the calculator's U-value cascades read from
`SapBuildingPart.construction_age_band` — the same representation the gov-EPC
API lodges. The construction-age-band Simulation Overlay
(``domain/epc/property_overlays/construction_age_band_overlay.py``) sets the
letter directly, so these values MUST stay the bare letter codes. Member
names carry the year ranges for readability. ``UNKNOWN`` covers values the
classifier cannot resolve (it leaves the lodged cert's age band untouched).
"""
A_BEFORE_1900 = "A"
B_1900_1929 = "B"
C_1930_1949 = "C"
D_1950_1966 = "D"
E_1967_1975 = "E"
F_1976_1982 = "F"
G_1983_1990 = "G"
H_1991_1995 = "H"
I_1996_2002 = "I"
J_2003_2006 = "J"
K_2007_2011 = "K"
L_2012_2022 = "L"
M_2023_ONWARDS = "M"
UNKNOWN = "Unknown"