18 lines
365 B
Python
18 lines
365 B
Python
|
import enum
|
||
|
from pydantic import BaseModel
|
||
|
|
||
|
class ConnectorStatus(enum.Enum):
|
||
|
AVAILABLE = "Available"
|
||
|
OCCUPIED = "Occupied"
|
||
|
RESERVED = "Reserved"
|
||
|
UNAVAILABLE = "Unavailable"
|
||
|
FAULTED = "Faulted"
|
||
|
|
||
|
class Connector(BaseModel):
|
||
|
id: str
|
||
|
evse: int
|
||
|
index: int
|
||
|
status: ConnectorStatus
|
||
|
|
||
|
class Config:
|
||
|
from_attributes = True
|