menu_favorite.py 448 B

1234567891011121314151617
  1. from typing import List
  2. from pydantic import BaseModel, Field
  3. class MenuFavoriteCreateBody(BaseModel):
  4. path: str = Field(..., min_length=1, max_length=512)
  5. class MenuFavoriteDeleteBody(BaseModel):
  6. path: str = Field(..., min_length=1, max_length=512)
  7. class MenuFavoriteReorderBody(BaseModel):
  8. """收藏菜单完整有序列表(paths 须与当前有效收藏集合一致)"""
  9. paths: List[str] = Field(default_factory=list)