from datetime import datetime from typing import Optional from uuid import UUID from pydantic import BaseModel from app.schemas.connector import Connector from ocpp.v201.enums import ResetType, ResetStatusType class ChargePointBase(BaseModel): friendly_name: str is_active: bool class ChargePointUpdate(BaseModel): friendly_name: Optional[str] = None is_active: Optional[bool] = None class ChargePointCreate(ChargePointBase): pass class ChargePoint(ChargePointBase): id: UUID last_seen: datetime | None vendor_name: str | None model: str | None serial_number: str | None firmware_version: str | None connectors: list[Connector] = [] class Config: from_attributes = True class ChargePointPassword(BaseModel): password: str class ChargePointConnectionInfo(BaseModel): connected: bool class ChargePointResetRequest(BaseModel): type: ResetType evse_id: Optional[int] = None class ChargePointResetResponse(BaseModel): status: ResetStatusType