"""Shuttle schemas."""
from typing import Optional
from uuid import UUID
from pydantic import BaseModel

class ShuttleBase(BaseModel):
    route_name: str
    description: Optional[str] = None
    origin: str
    destination: str
    vehicle_type: str
    company_name: Optional[str] = None
    trip_type: str = "one_way"
    price_per_person: Optional[float] = None
    price_private_trip: Optional[float] = None
    estimated_duration: str
    departure_times: Optional[str] = None
    contact_whatsapp: str
    image_url: Optional[str] = None
    is_active: bool = True

class ShuttleCreate(ShuttleBase):
    pass

class ShuttleUpdate(BaseModel):
    route_name: Optional[str] = None
    description: Optional[str] = None
    origin: Optional[str] = None
    destination: Optional[str] = None
    vehicle_type: Optional[str] = None
    company_name: Optional[str] = None
    trip_type: Optional[str] = None
    price_per_person: Optional[float] = None
    price_private_trip: Optional[float] = None
    estimated_duration: Optional[str] = None
    departure_times: Optional[str] = None
    contact_whatsapp: Optional[str] = None
    image_url: Optional[str] = None
    is_active: Optional[bool] = None

class ShuttleRead(ShuttleBase):
    id: UUID

    class Config:
        from_attributes = True
