Add IdToken router
This commit is contained in:
parent
e33d74308a
commit
e5ae0bd58e
6 changed files with 115 additions and 9 deletions
|
@ -1,18 +1,25 @@
|
|||
from typing import Optional
|
||||
from uuid import UUID
|
||||
from pydantic import BaseModel
|
||||
|
||||
from app.schemas.user import User
|
||||
|
||||
class IdTokenBase(BaseModel):
|
||||
title: str
|
||||
friendly_name: str
|
||||
is_active: bool
|
||||
owner_id: UUID
|
||||
token: str
|
||||
|
||||
class IdTokenCreate(IdTokenBase):
|
||||
pass
|
||||
|
||||
class IdTokenUpdate(BaseModel):
|
||||
friendly_name: Optional[str] = None
|
||||
is_active: Optional[bool] = None
|
||||
owner_id: Optional[UUID] = None
|
||||
|
||||
class IdToken(IdTokenBase):
|
||||
id: UUID
|
||||
owner: User
|
||||
|
||||
class Config:
|
||||
from_attributes = True
|
Loading…
Add table
Add a link
Reference in a new issue