Add user router
This commit is contained in:
parent
b22bc4e164
commit
e33d74308a
5 changed files with 93 additions and 13 deletions
|
@ -1,18 +1,20 @@
|
|||
from typing import Optional
|
||||
from uuid import UUID
|
||||
from pydantic import BaseModel
|
||||
|
||||
from app.schemas.id_token import IdToken
|
||||
|
||||
class UserBase(BaseModel):
|
||||
friendly_name: str
|
||||
is_active: bool
|
||||
|
||||
class UserUpdate(BaseModel):
|
||||
friendly_name: Optional[str] = None
|
||||
is_active: Optional[bool] = None
|
||||
|
||||
class UserCreate(UserBase):
|
||||
pass
|
||||
|
||||
class User(UserBase):
|
||||
id: UUID
|
||||
id_tokens: list[IdToken] = []
|
||||
|
||||
class Config:
|
||||
from_attributes = True
|
Loading…
Add table
Add a link
Reference in a new issue