"""Data models for the aionisource library."""

from __future__ import annotations

from dataclasses import dataclass
from datetime import datetime


@dataclass(frozen=True)
class UsageRead:
    """A single usage record from the portal's usageData table."""

    service_account_id: str
    meter_id: str
    read_date: datetime
    read_method: str
    reading: float
    average_temp: float | None
    number_of_billing_days: int
    units_used: float
    bill_amount: float
    cost_per_day: float | None


@dataclass(frozen=True)
class BillRecord:
    """A single bill/payment record from the portal's historyData table."""

    description: str
    date: datetime
    amount: float
    record_type: str
    bill_id: str | None
    url_link: str | None


@dataclass(frozen=True)
class AccountInfo:
    """Account information extracted from login response."""

    account_id: str
    display_name: str


@dataclass(frozen=True)
class AccountStatus:
    """Account status from the nisource-api/ldc/status endpoint."""

    display_name: str
    notification_count: int
    logged_in: bool
