integrate/app/authentik/models.py
Philipp Rothmann a113ffdfda fix tests
2022-03-06 15:29:00 +01:00

41 lines
No EOL
905 B
Python

from __future__ import annotations
from typing import Any, Dict, List, Optional
from pydantic import BaseModel
class UsersObjItem(BaseModel):
pk: int
username: str
name: str
is_active: bool
last_login: str
email: str
avatar: str
attributes: Dict[str, Any]
uid: str
class GroupsObjItem(BaseModel):
pk: str
name: str
is_superuser: bool
parent: Optional[str]
parent_name: Optional[str]
users: List[int]
attributes: Dict[str, Any]
users_obj: List[UsersObjItem]
class User(BaseModel):
pk: Optional[str]
username: str
name: str
is_active: bool = True
last_login: Optional[str] = None
is_superuser: Optional[bool] = None
groups: List[str] = []
groups_obj: Optional[List[GroupsObjItem]] = None
email: str
avatar: Optional[str] = None
attributes: Dict[str, Any] = {}
uid: Optional[str] = None