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

from backend.app.db.models.recommendations import PlanTypeEnum
from datatypes.epc.domain.epc import Epc


@dataclass(frozen=True)
class PlanRecord:
    property_id: int
    portfolio_id: int
    created_at: datetime
    is_default: bool

    valuation_increase_lower_bound: Optional[float] = None
    valuation_increase_upper_bound: Optional[float] = None
    valuation_increase_average: Optional[float] = None
    plan_type: Optional[PlanTypeEnum] = None
    post_sap_points: Optional[float] = None
    post_epc_rating: Optional[Epc] = None
    post_co2_emissions: Optional[float] = None
    co2_savings: Optional[float] = None
    post_energy_bill: Optional[float] = None
    energy_bill_savings: Optional[float] = None
    post_energy_consumption: Optional[float] = None
    energy_consumption_savings: Optional[float] = None
    valuation_post_retrofit: Optional[float] = None
    valuation_increase: Optional[float] = None
    cost_of_works: Optional[float] = None
    contingency_cost: Optional[float] = None
    name: Optional[str] = None
