25 lines
505 B
Python
25 lines
505 B
Python
from typing import Optional
|
|
from uuid import UUID
|
|
from pydantic import BaseModel
|
|
|
|
from app.schemas.user import User
|
|
|
|
class IdTokenBase(BaseModel):
|
|
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
|
|
|
|
class Config:
|
|
from_attributes = True |