Skip to content

Instantly share code, notes, and snippets.

@SelrahcD
Last active November 23, 2016 21:33
Show Gist options
  • Save SelrahcD/d56f19bd832060dedad29a6ba3b842b1 to your computer and use it in GitHub Desktop.
Save SelrahcD/d56f19bd832060dedad29a6ba3b842b1 to your computer and use it in GitHub Desktop.
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.
@webdevilopers
Copy link

webdevilopers commented Nov 23, 2016

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!?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment