Skip to content
This repository has been archived by the owner on Jan 28, 2022. It is now read-only.

Commit

Permalink
ISSUE #211
Browse files Browse the repository at this point in the history
* Replace `Aggregate` by `MinosModel`.
* Minor changes.
  • Loading branch information
Sergio García Prado committed May 12, 2021
1 parent 811df7c commit 4ff715d
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions minos/common/model/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,16 @@
Type,
)

from minos.common.exceptions import (
from ..exceptions import (
MultiTypeMinosModelSequenceException,
)
from minos.common.importlib import (
from ..importlib import (
import_module,
)
from minos.common.meta import (
from ..meta import (
self_or_classmethod,
)
from minos.common.model import (
Aggregate,
from .abc import (
MinosModel,
)

Expand All @@ -35,9 +34,9 @@ class Event(MinosModel):

topic: str
model: str
items: list[Aggregate]
items: list[MinosModel]

def __init__(self, topic: str, items: list[Aggregate], model: str = None, *args, **kwargs):
def __init__(self, topic: str, items: list[MinosModel], model: str = None, *args, **kwargs):
if model is None:
model_cls = type(items[0])
model = model_cls.classname
Expand Down Expand Up @@ -74,7 +73,7 @@ def _type_hints(self_or_cls) -> dict[str, Type]:
return

@property
def model_cls(self) -> Type[Aggregate]:
def model_cls(self) -> Type[MinosModel]:
"""Get the model class.
:return: A type object.
Expand Down

0 comments on commit 4ff715d

Please sign in to comment.