12345678910111213141516171819202122232425262728293031323334 |
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- from typing import List, Union, Dict
- from pydantic import BaseModel, Field
- from schemas.base import DetailMixin
- class ResourceUrlDetail(DetailMixin):
- data: Dict[str, Union[List[str], int]] = None
- class NewResourceCollect(BaseModel):
- ctype: str
- rid: int
- uid: int
- utype: int
- class Config:
- anystr_strip_whitespace = True
- class CollectDetail(DetailMixin):
- pass
- class CollectInfo(BaseModel):
- opt: int = Field(..., description="操作类型,0=取消收藏,1=添加收藏")
- class Config:
- anystr_strip_whitespace = True
|