"""
DTOs (Data Transfer Objects) para módulo de firmas
"""

from typing import Optional

from pydantic import BaseModel, Field


class SignatureCreateDTO(BaseModel):
    """DTO para crear una firma"""

    code: str = Field(..., max_length=10, description="Signature code")

    signature: Optional[str] = Field(
        None, max_length=1000, description="Signature")
    photo_path: Optional[str] = Field(
        None, max_length=1000, description="Photo path")

    class Config:
        from_attributes = True


class SignatureUpdateDTO(BaseModel):
    """DTO para actualizar una firma"""

    signature: Optional[str] = Field(
        None, max_length=1000, description="Signature")
    photo_path: Optional[str] = Field(
        None, max_length=1000, description="Photo path")

    class Config:
        from_attributes = True


class SignatureResponseDTO(BaseModel):
    """DTO para responder con datos de una firma"""

    id: int
    code: str
    signature: Optional[str] = None
    photo_path: Optional[str] = None
    tenant_id: int
    company_id: int

    class Config:
        from_attributes = True
