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

17 lines
296 B
Python
Raw Normal View History

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