"""Hospital model for hospital information."""
from typing import Annotated, Optional

from pydantic import Field, EmailStr, StringConstraints

from .base import BaseDocument

class Hospital(BaseDocument):
    """Hospital model representing hospital information."""
    trackingId: str = Field(..., description="Unique tracking identifier for the hospital")
    name: Annotated[
        str,
        StringConstraints(min_length=1, strip_whitespace=True)
    ] = Field(..., description="Name of the hospital")
    address: str = Field(..., description="Address of the hospital")
    phoneNumber: Optional[str] = Field(
        default=None, description="Contact phone number of the hospital"
    )
    email: Optional[EmailStr] = Field(
        default=None, description="Contact email of the hospital"
    )
