from typing import Optional

from pydantic import BaseModel, ConfigDict, Field


class StateDTO(BaseModel):
    m3_key: str = Field(..., min_length=1, max_length=3)
    description: str
    mex_key: Optional[str] = None
    ame_key: Optional[str] = None

    model_config = ConfigDict(from_attributes=True)
