from dataclasses import dataclass, field
from typing import List, Dict

import pandas as pd


@dataclass
class AISPoint:
    mmsi: str
    ts: pd.Timestamp
    lat: float
    lon: float
    sog: float
    cog: float
    state: str = 'UNKNOWN'


@dataclass
class VesselTrajectory:
    mmsi: str
    points: List[AISPoint] = field(default_factory=list)
    vessel_type: str = 'UNKNOWN'
    cluster_id: int = -1
    season: str = 'UNKNOWN'
    fishing_pct: float = 0.0
    features: Dict = field(default_factory=dict)


@dataclass
class ClassificationResult:
    mmsi: str
    vessel_type: str
    confidence: float
    dominant_state: str
    fishing_pct: float
    cluster_id: int
    season: str
    feature_vector: Dict
