from datetime import datetime
from typing import Optional

from pydantic import BaseModel, ConfigDict, Field

from api.v1.common.dto_mixins import UpdateFlagsMixin


class PedimentoConfigUpdatesBase(BaseModel, UpdateFlagsMixin):
    """Base schema for Pedimento Config Updates"""

    pedimento_id: Optional[int] = Field(None, description="Pedimento ID")
    tenant_id: Optional[int] = Field(None, description="Tenant ID")

class PedimentoConfigUpdatesCreate(PedimentoConfigUpdatesBase):
    """Schema for creating a new Pedimento Config Updates"""

    pass


class PedimentoConfigUpdatesUpdate(BaseModel, UpdateFlagsMixin):
    """Schema for updating a Pedimento Config Updates"""
    pass


class PedimentoConfigUpdatesResponse(PedimentoConfigUpdatesBase):
    """Schema for Pedimento Config Updates response"""

    id: int
    created_at: datetime

    model_config = ConfigDict(from_attributes=True)
