Last active
November 23, 2016 21:33
-
-
Save SelrahcD/d56f19bd832060dedad29a6ba3b842b1 to your computer and use it in GitHub Desktop.
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
Time sheet system | |
In my opinion we have two options : | |
1) The notion of time sheet is only a view concept (I want to see all entries of week #10) : | |
* a TrackTime command that only creates a new entry in a list and takes the (time; imputation) as parameters | |
* TimeSheet is a projection of the entries, here probably a subset of the list entries | |
2) The notion of time sheet is important in domain (I don't have an example...) : | |
* a TrackTime command that adds an entry for that specific time sheet and takes (timesheetId; time; imputation) as parameters | |
* TimeSheet can possibly be used in the read model too. (Lot of ifs here) | |
For both cases if an entry had to be modified I'd go with a CorrectTimeEntry(timeEntryId, correctedTime) command. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Since I can't upvote on gists and we don't get any notifications I moved the discussion to the PHPDDD project:
See you there!?