Add user router

This commit is contained in:
Oliver Traber 2024-04-14 01:42:51 +02:00
parent b22bc4e164
commit e33d74308a
Signed by: Bluemedia
GPG key ID: C0674B105057136C
5 changed files with 93 additions and 13 deletions

View file

@ -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