modular-monolith-with-ddd
modular-monolith-with-ddd copied to clipboard
Check for MeetingGroupProposal status to be accepted before creating MeetingGroup
First of all, thank you for this masterpiece, I gained a lot of insights and knowledge from this repo!
Don't you think we should add a rule check to make sure that proposal has been accepted by the Administration module?
https://github.com/kgrzybek/modular-monolith-with-ddd/blob/37de06228f3f6f49de20a510d5349c784903b01f/src/Modules/Meetings/Domain/MeetingGroupProposals/MeetingGroupProposal.cs#L27-L30
I mean something like this
public MeetingGroup CreateMeetingGroup()
{
CheckRule(new MeetingGroupProposalMustBeAcceptedRule(_status));
return MeetingGroup.CreateBasedOnProposal(Id, _name, _description, _location, _proposalUserId);
}
PS: I may create a PR. But just wanted to be sure that I understand business logic correctly 😅
@shamil-sadigov yes, you are right.
Even from the current implementation of the Application layer this kind of situation is not possible, it might be possible in the future so this rule should be checked.