from dataclasses import dataclass
from datetime import datetime


@dataclass(frozen=True, slots=True)
class Salesperson:
    id: str
    admin_user_id: str
    code: str
    name: str
    status: str
    created_at: datetime


@dataclass(frozen=True, slots=True)
class PromotionCode:
    id: str
    code: str
    salesperson_id: str
    channel: str
    status: str
    created_at: datetime


@dataclass(frozen=True, slots=True)
class LeadAttribution:
    id: str
    h5_user_id: str
    salesperson_id: str
    promotion_code_id: str
    source_code: str
    visit_count: int
    first_touch_at: datetime
    last_touch_at: datetime


@dataclass(frozen=True, slots=True)
class OrderAttribution:
    id: str
    order_id: str
    h5_user_id: str
    salesperson_id: str
    promotion_code_id: str
    source_code: str
    amount_cents: int
    attributed_at: datetime
