Skip to content

Схемы, связанные с историей HWM

HWMHistoryResponseV1

Bases: BaseModel

HWM history response.

Source code in horizon/commons/schemas/v1/hwm_history.py
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
class HWMHistoryResponseV1(BaseModel):
    """HWM history response."""

    id: int = Field(description="HWM history item id")
    hwm_id: int = Field(description="HWM id")
    namespace_id: int = Field(description="Namespace id HWM is bound to")
    name: str = Field(description="HWM name, unique in the namespace")
    description: str = Field(description="HWM description")
    type: str = Field(description="HWM type, any non-empty string")
    value: Any = Field(description="HWM value, any JSON serializable value")
    entity: Optional[str] = Field(default=None, description="Name of entity associated with the HWM. Can be any string")
    expression: Optional[str] = Field(
        default=None,
        description="Expression used to calculate HWM value. Can be any string",
    )
    action: str = Field(description="Action performed on the HWM record")
    changed_at: datetime = Field(description="Timestamp of a change of the HWM data")
    changed_by: Optional[str] = Field(default=None, description="User who changed the HWM data")

    class Config:
        if pydantic_version >= "2":
            from_attributes = True
        else:
            orm_mode = True

HWMHistoryPaginateQueryV1

Bases: PaginateQueryV1

Query params for HWM pagination request.

Source code in horizon/commons/schemas/v1/hwm_history.py
13
14
15
16
class HWMHistoryPaginateQueryV1(PaginateQueryV1):
    """Query params for HWM pagination request."""

    hwm_id: int = Field(description="HWM id")