18 lines
448 B
Python
18 lines
448 B
Python
from typing import List
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class MenuFavoriteCreateBody(BaseModel):
|
|
path: str = Field(..., min_length=1, max_length=512)
|
|
|
|
|
|
class MenuFavoriteDeleteBody(BaseModel):
|
|
path: str = Field(..., min_length=1, max_length=512)
|
|
|
|
|
|
class MenuFavoriteReorderBody(BaseModel):
|
|
"""收藏菜单完整有序列表(paths 须与当前有效收藏集合一致)"""
|
|
|
|
paths: List[str] = Field(default_factory=list)
|