Prepare monorepo
This commit is contained in:
parent
a1ddb43ed0
commit
938582155d
61 changed files with 5 additions and 5 deletions
60
backend/app/schemas/chargepoint_variable.py
Normal file
60
backend/app/schemas/chargepoint_variable.py
Normal file
|
@ -0,0 +1,60 @@
|
|||
from decimal import Decimal
|
||||
from typing import Optional
|
||||
from uuid import UUID
|
||||
from pydantic import BaseModel
|
||||
import enum
|
||||
|
||||
class AttributeType(enum.Enum):
|
||||
ACTUAL = "Actual"
|
||||
TARGET = "Target"
|
||||
MIN_SET = "MinSet"
|
||||
MAX_SET = "MaxSet"
|
||||
|
||||
class MutabilityType(enum.Enum):
|
||||
READ_ONLY = "ReadOnly"
|
||||
WRITE_ONLY = "WriteOnly"
|
||||
READ_WRITE = "ReadWrite"
|
||||
|
||||
class DataType(enum.Enum):
|
||||
STRING = "string"
|
||||
DECIMAL = "decimal"
|
||||
INTEGER = "integer"
|
||||
DATETIME = "dateTime"
|
||||
BOOLEAN = "boolean"
|
||||
OPTION_LIST = "OptionList"
|
||||
SEQUENCE_LIST = "SequenceList"
|
||||
MEMBER_LIST = "MemberList"
|
||||
|
||||
class SetVariableStatusType(enum.Enum):
|
||||
ACCEPTED = "Accepted"
|
||||
REJECTED = "Rejected"
|
||||
UNKNOWN_COMPONENT = "UnknownComponent"
|
||||
NOT_SUPPORTED_ATTRIBUTE_TYPE = "NotSupportedAttributeType"
|
||||
REBOOT_REQUIRED = "RebootRequired"
|
||||
|
||||
class ChargepointVariable(BaseModel):
|
||||
id: UUID
|
||||
name: str
|
||||
type: AttributeType
|
||||
value: Optional[str] = None
|
||||
mutability: MutabilityType
|
||||
persistent: bool
|
||||
constant: bool
|
||||
unit: Optional[str] = None
|
||||
data_type: Optional[DataType] = None
|
||||
min_limit: Optional[Decimal] = None
|
||||
max_limit: Optional[Decimal] = None
|
||||
values_list: Optional[str] = None
|
||||
component_name: str
|
||||
component_instance: Optional[str] = None
|
||||
evse: Optional[int] = None
|
||||
connector_id: Optional[int] = None
|
||||
|
||||
class Config:
|
||||
from_attributes = True
|
||||
|
||||
class ChargepointVariableUpdate(BaseModel):
|
||||
value: str
|
||||
|
||||
class ChargepointVariableResponse(BaseModel):
|
||||
status: SetVariableStatusType
|
Loading…
Add table
Add a link
Reference in a new issue