Files
2026-05-25 17:08:18 +08:00

22 lines
522 B
Python

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}