simple-ocpp-cs/app/schemas/user.py

18 lines
323 B
Python
Raw Normal View History

2024-04-13 22:43:03 +02:00
from uuid import UUID
2024-03-28 21:23:25 +01:00
from pydantic import BaseModel
2024-04-13 22:43:03 +02:00
from app.schemas.id_token import IdToken
2024-03-28 21:23:25 +01:00
class UserBase(BaseModel):
friendly_name: str
is_active: bool
class UserCreate(UserBase):
pass
class User(UserBase):
2024-04-13 22:43:03 +02:00
id: UUID
2024-03-28 21:23:25 +01:00
id_tokens: list[IdToken] = []
class Config:
from_attributes = True