from __future__ import annotations

from dataclasses import dataclass
from datetime import datetime
from typing import Any


@dataclass(slots=True)
class Site:
    id: str
    site_key: str
    name: str
    primary_domain: str
    status: str
    settings: dict[str, Any] | list[Any] | None = None


@dataclass(slots=True)
class Experiment:
    id: str
    site_id: str
    experiment_key: str
    name: str
    module_type: str
    status: str
    start_at: datetime | None = None
    end_at: datetime | None = None
    targeting_config: dict[str, Any] | list[Any] | None = None


@dataclass(slots=True)
class Variant:
    id: str
    experiment_id: str
    variant_key: str
    name: str
    traffic_weight: int
    content_config: dict[str, Any] | list[Any] | None = None


@dataclass(slots=True)
class ExperimentRelease:
    id: str
    experiment_id: str
    version_no: int
    status: str
    runtime_payload: dict[str, Any] | list[Any] | None = None


@dataclass(slots=True)
class Goal:
    id: str
    site_id: str
    goal_key: str
    name: str
    goal_type: str
    match_rule: dict[str, Any] | list[Any] | None = None


@dataclass(slots=True)
class SdkConfig:
    id: str
    site_id: str
    sdk_key: str
    status: str
    origin_url: str | None = None
    cdn_url: str | None = None
    sdk_config: dict[str, Any] | list[Any] | None = None

