refactor: Add index field to DuckDbMessageModel in monitor schema

This commit adds the `index` field to the `DuckDbMessageModel` class in the `monitor/schema.py` file. The `index` field is of type `int` and is used to store the index value for the message. This modification enhances the schema of the `DuckDbMessageModel` and allows for more efficient querying and sorting of messages based on their index.
This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-06-26 17:48:44 -03:00
commit d633e64439

View file

@ -82,6 +82,7 @@ class TransactionModelResponse(DefaultModel):
class DuckDbMessageModel(DefaultModel):
index: int
flow_id: str | None = Field(default=None, alias="flow_id")
timestamp: datetime = Field(default_factory=lambda: datetime.now(timezone.utc))
sender: str