from dataclasses import dataclass
from datetime import datetime
from typing import Optional

from backend.app.db.models.portfolio import PortfolioGoal


@dataclass(frozen=True)
class ScenarioRecord:
    name: str
    created_at: datetime
    housing_type: str
    goal: PortfolioGoal
    goal_value: str
    trigger_file_path: str
    multi_plan: bool
    is_default: bool
    budget: Optional[float] = None
    already_installed_file_path: Optional[str] = None
    patches_file_path: Optional[str] = None
    non_invasive_recommendations_file_path: Optional[str] = None
    exclusions: Optional[str] = None

    cost: Optional[float] = None
    contingency: Optional[float] = None
    funding: Optional[float] = None
    total_work_hours: Optional[float] = None
    energy_savings: Optional[float] = None
    co2_equivalent_savings: Optional[float] = None
    energy_cost_savings: Optional[float] = None
    epc_breakdown_pre_retrofit: Optional[str] = None
    epc_breakdown_post_retrofit: Optional[str] = None
    number_of_properties: Optional[int] = None
    n_units_to_retrofit: Optional[int] = None
    co2_per_unit_pre_retrofit: Optional[str] = None
    co2_per_unit_post_retrofit: Optional[str] = None
    energy_bill_per_unit_pre_retrofit: Optional[str] = None
    energy_bill_per_unit_post_retrofit: Optional[str] = None
    energy_consumption_per_unit_pre_retrofit: Optional[str] = None
    energy_consumption_per_unit_post_retrofit: Optional[str] = None
    valuation_improvement_per_unit: Optional[str] = None
    cost_per_unit: Optional[str] = None
    cost_per_co2_saved: Optional[str] = None
    cost_per_sap_point: Optional[str] = None
    valuation_return_on_investment: Optional[str] = None
    property_valuation_increase: Optional[float] = None
    labour_days: Optional[float] = None
