# app/modules/prospecting/schemas/contact.py
"""Pydantic schemas for prospect contacts."""

from datetime import datetime

from pydantic import BaseModel, Field


class ProspectContactCreate(BaseModel):
    """Schema for creating a contact."""

    contact_type: str = Field(..., pattern="^(email|phone|address|social|form)$")
    value: str = Field(..., max_length=500)
    label: str | None = Field(None, max_length=100)
    is_primary: bool = False


class ProspectContactResponse(BaseModel):
    """Schema for contact response."""

    id: int
    prospect_id: int
    contact_type: str
    value: str
    label: str | None = None
    source_url: str | None = None
    source_element: str | None = None
    is_validated: bool = False
    is_primary: bool = False
    created_at: datetime
    updated_at: datetime

    class Config:
        from_attributes = True
