minos.aggregate.events.entries module¶
- class minos.aggregate.events.entries.EventEntry(aggregate_uuid, aggregate_name, version=None, data=b'', id=None, action=None, created_at=None, transaction_uuid=UUID('00000000-0000-0000-0000-000000000000'))[source]¶
Bases:
object
Class that represents an entry (or row) on the events repository database which stores the aggregate changes.
- __init__(aggregate_uuid, aggregate_name, version=None, data=b'', id=None, action=None, created_at=None, transaction_uuid=UUID('00000000-0000-0000-0000-000000000000'))[source]¶
- action¶
- property aggregate_cls: Type[minos.aggregate.models.aggregates.Aggregate]¶
Load the concrete
Aggregate
class.- Return type
typing.Type
[minos.aggregate.models.aggregates.Aggregate
]- Returns
A
Type
object.
- property aggregate_diff: minos.aggregate.models.diffs.aggregates.AggregateDiff¶
Get the stored
AggregateDiff
instance.- Return type
- Returns
An
AggregateDiff
instance.
- aggregate_name¶
- aggregate_uuid¶
- as_raw()[source]¶
Get a raw representation of the instance.
- Return type
dict
[str
,typing.Any
]- Returns
A dictionary in which the keys are attribute names and values the attribute contents.
- created_at¶
- data¶
- property field_diff_container: minos.aggregate.models.diffs.fields.FieldDiffContainer¶
Get the stored field diff container.
- Return type
- Returns
A
FieldDiffContainer
instance.
- classmethod from_aggregate_diff(aggregate_diff, *, transaction=None, **kwargs)[source]¶
Build a new instance from an
Aggregate
.- Parameters
aggregate_diff (
minos.aggregate.models.diffs.aggregates.AggregateDiff
) – The aggregate difference.transaction (
typing.Optional
[minos.aggregate.transactions.entries.TransactionEntry
]) – Optional transaction.kwargs – Additional named arguments.
- Return type
- Returns
A new
EventEntry
instance.
- classmethod from_another(another, **kwargs)[source]¶
Build a new instance from another
EventEntry
.- Parameters
another (
minos.aggregate.events.entries.EventEntry
) – TheEventEntry
.kwargs – Additional named arguments.
- Return type
- Returns
A new
EventEntry
instance.
- id¶
- transaction_uuid¶
- version¶