"""
DTOs for Seal.
"""

from typing import Optional

from pydantic import BaseModel, Field


class SealBaseDTO(BaseModel):
    seal: str = Field(..., description="Seal identifier", max_length=15)


class SealCreateDTO(SealBaseDTO):
    """Schema for creating a seal"""
    pass


class SealUpdateDTO(SealBaseDTO):
    """Schema for updating a seal"""
    seal: Optional[str] = Field(None, description="Seal identifier", max_length=15)


class SealResponseDTO(SealBaseDTO):
    """Schema for seal response"""
    id: int
    company_id: int
    tenant_id: int

    class Config:
        from_attributes = True
