simple-ocpp-cs/app/schemas/user.py
2024-04-14 01:42:51 +02:00

20 lines
382 B
Python

from typing import Optional
from uuid import UUID
from pydantic import BaseModel
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
class Config:
from_attributes = True