diff --git a/backend/condition/domain/asset_condition.py b/backend/condition/domain/asset_condition.py index 2b7946c2..dffbdf88 100644 --- a/backend/condition/domain/asset_condition.py +++ b/backend/condition/domain/asset_condition.py @@ -1,5 +1,6 @@ from dataclasses import dataclass from typing import Optional +from datetime import date from backend.condition.domain.element import Element @@ -7,8 +8,8 @@ from backend.condition.domain.element import Element class AssetCondition: uprn: int element: Element # TODO: should HHSRS elements be handled differently? - condition_description: str # TODO: this probably needs to be some sort of enum so it's searchable/filterable on the frontend + condition_description: str # TODO: this probably needs to be some sort of enum so it's searchable/filterable on the frontend. Could be hard to map from string though quantity: int renewal_year: Optional[int] = None source: Optional[str] = None - # TODO: add install_date + install_date: Optional[date] = None diff --git a/backend/condition/tests/mapping/test_lbwf_mapper.py b/backend/condition/tests/mapping/test_lbwf_mapper.py index 926e34c1..151e5d19 100644 --- a/backend/condition/tests/mapping/test_lbwf_mapper.py +++ b/backend/condition/tests/mapping/test_lbwf_mapper.py @@ -179,7 +179,8 @@ def test_lbwf_mapper_maps_house(): condition_description="General Needs", quantity=1, renewal_year=None, - source=None + source=None, + install_date=None, ), AssetCondition( uprn=1, @@ -187,7 +188,8 @@ def test_lbwf_mapper_maps_house(): condition_description="Ground Floor", quantity=1, renewal_year=None, - source=None + source=None, + install_date=None, ), AssetCondition( uprn=1, @@ -195,7 +197,8 @@ def test_lbwf_mapper_maps_house(): condition_description="Yes", quantity=None, renewal_year=None, - source="Source of Data = ACT" + source="Source of Data = ACT", + install_date=None, ), AssetCondition( uprn=1, @@ -203,7 +206,8 @@ def test_lbwf_mapper_maps_house(): condition_description="Bathroom on Entrance Level in Property", quantity=1, renewal_year=None, - source="Source of Data = Codeman" + source="Source of Data = Codeman", + install_date=None, ), AssetCondition( uprn=1, @@ -211,7 +215,8 @@ def test_lbwf_mapper_maps_house(): condition_description="No Central Heating in Property", quantity=1, renewal_year=None, - source="Source of Data = Codeman" + source="Source of Data = Codeman", + install_date=None, ), AssetCondition( uprn=1, @@ -219,7 +224,8 @@ def test_lbwf_mapper_maps_house(): condition_description="Category 4 - Typical Risk", quantity=1, renewal_year=None, - source="Source of Data = Morgan Sindall" + source="Source of Data = Morgan Sindall", + install_date=None, ), AssetCondition( uprn=1, @@ -227,7 +233,8 @@ def test_lbwf_mapper_maps_house(): condition_description="Render or Pebbledash Wall Finish 1 in External Area", quantity=1, renewal_year=2052, - source="Source of Data = Codeman" + source="Source of Data = Codeman", + install_date=date(2009,4,1), ), ]