from datetime import datetime

from pydantic import BaseModel, Field


class MenuConfigCreate(BaseModel):
    label: str = Field(..., max_length=64)
    path: str = Field(default="", max_length=128)
    icon: str = Field(default="", max_length=64)
    sort_order: int = 0
    is_active: bool = True
    parent_id: str | None = None
    menu_type: str = "page"
    menu_target: str = "frontend"
    is_default: bool = False


class MenuConfigOut(MenuConfigCreate):
    id: str

    model_config = {"from_attributes": True}
