"""License data models."""

from dataclasses import dataclass
from datetime import datetime


@dataclass
class LicenseContext:
    """License information from validated JWT token."""

    license_key: str
    tier: str  # "pro", "enterprise"
    features: list[str]
    expires_at: datetime
    customer_name: str
    customer_email: str
    machine_id: str | None = None


@dataclass
class StoredLicense:
    """License information stored locally."""

    license_key: str
    activated_at: datetime
    last_validated_at: datetime
    machine_id: str
    context: LicenseContext | None = None
