auth.py 352 B

123456789101112131415161718
  1. from pydantic import BaseModel
  2. from typing import List, Optional
  3. class Token(BaseModel):
  4. access_token: str
  5. token_type: str
  6. class TokenData(BaseModel):
  7. user_id: str
  8. user_name: str
  9. project_id: str
  10. role_id: int
  11. class SwitchProject(BaseModel):
  12. project_id: str
  13. user_id: str
  14. user_name: str
  15. role_ids: List[str] = []