-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from mr-raccoon-97/main
Add default events
- Loading branch information
Showing
4 changed files
with
49 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
from abc import ABC | ||
from dataclasses import dataclass | ||
from pybondi.aggregate import Aggregate | ||
from pybondi.messagebus import Event | ||
|
||
@dataclass | ||
class Added[T: Aggregate](Event): | ||
''' | ||
The Added[Aggregate] event is used to signal that the aggregate has been added to a session. | ||
''' | ||
aggregate: T | ||
|
||
@dataclass | ||
class RolledBack[T: Aggregate](Event): | ||
''' | ||
The RolledBack[Aggregate] event is used to signal that the aggregate has been rolled back in the session. | ||
''' | ||
aggregate: T | ||
|
||
@dataclass | ||
class Saved[T: Aggregate](Event): | ||
''' | ||
The Saved[Aggregate] event is used to signal that the aggregate has been committed in the session. | ||
''' | ||
aggregate: T |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "pybondi" | ||
version = "0.3.2" | ||
version = "1.0.0" | ||
description = "A lightweight library for creating event driven systems using domain driven design." | ||
authors = ["Eric Cardozo <[email protected]>"] | ||
license = "MIT" | ||
|