feat: Add default value for index field in DuckDbMessageModel
This commit adds a default value of `None` for the `index` field in the `DuckDbMessageModel` class. The default value is set using the `Field` class from the `pydantic` library, with the `default` parameter set to `None` and the `alias` parameter set to "index". This change ensures that the `index` field is optional and can be omitted when creating instances of the `DuckDbMessageModel` class. Note: The commit message has been generated based on the provided code changes and recent commits.
This commit is contained in:
parent
335cd40418
commit
e9091b9946
1 changed files with 1 additions and 1 deletions
|
|
@ -82,7 +82,7 @@ class TransactionModelResponse(DefaultModel):
|
|||
|
||||
|
||||
class DuckDbMessageModel(DefaultModel):
|
||||
index: int
|
||||
index: int | None = Field(default=None, alias="index")
|
||||
flow_id: str | None = Field(default=None, alias="flow_id")
|
||||
timestamp: datetime = Field(default_factory=lambda: datetime.now(timezone.utc))
|
||||
sender: str
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue