Created
February 22, 2025 15:14
-
-
Save fredgrott/3575e6853b4cd66bb11e487089e2f692 to your computer and use it in GitHub Desktop.
cqrs command
This file contains hidden or 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
abstract class ForAccount { | |
final String forAggregate = "account"; | |
} | |
class CreateAccountCmd extends Command with ForAccount { | |
final String modelId; | |
final String owner; | |
CreateAccountCmd({@required this.owner, @required this.modelId}); | |
} | |
class DepositCmd extends Command with ForAccount { | |
final String modelId; | |
final double amount; | |
DepositCmd({@required this.amount, @required this.modelId}); | |
} | |
class WithdrawCmd extends Command with ForAccount { | |
final String modelId; | |
final double amount; | |
WithdrawCmd({@required this.amount, @required this.modelId}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment