{"action":"created","comment":{"url":"https://api.github.com/repos/dolfelt/schedule-api/pulls/comments/34401337","id":34401337,"diff_hunk":"@@ -3,52 +3,60 @@\n \n abstract class Entity implements \\JsonSerializable\n {\n-    protected $properties = [];\n-\n     protected $id;\n+    protected $createdAt;\n+    protected $updatedAt;\n+    protected $deleted = false;\n \n-    private $data;\n-\n-    private $callMethods = ['get', 'set'];\n+    public function getId()\n+    {\n+        return $this->id;\n+    }\n \n-    public function __construct($data = [])\n+    public function setId($id)\n     {\n-        $this->data = $data;\n+        $this->id = (int)$id;\n     }\n \n-    public function getId()\n+    public function getCreatedAt()\n     {\n-        return $this->id;\n+        return $this->createdAt;\n     }\n \n-    public function mapData(array $row)\n+    public function setCreatedAt($createdAt)\n     {\n-        $this->data = $row;\n+        $this->createdAt = strtotime($createdAt);","path":"src/Data/Entity.php","position":37,"original_position":37,"commit_id":"500f4825936aebe19cab52cca7225a9857b6444e","original_commit_id":"500f4825936aebe19cab52cca7225a9857b6444e","user":{"login":"dolfelt","id":202546,"avatar_url":"https://avatars.githubusercontent.com/u/202546?v=3","gravatar_id":"","url":"https://api.github.com/users/dolfelt","html_url":"https://github.com/dolfelt","followers_url":"https://api.github.com/users/dolfelt/followers","following_url":"https://api.github.com/users/dolfelt/following{/other_user}","gists_url":"https://api.github.com/users/dolfelt/gists{/gist_id}","starred_url":"https://api.github.com/users/dolfelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dolfelt/subscriptions","organizations_url":"https://api.github.com/users/dolfelt/orgs","repos_url":"https://api.github.com/users/dolfelt/repos","events_url":"https://api.github.com/users/dolfelt/events{/privacy}","received_events_url":"https://api.github.com/users/dolfelt/received_events","type":"User","site_admin":false},"body":"This should definitely return a `DateTime` object.","created_at":"2015-07-10T22:18:47Z","updated_at":"2015-07-10T22:18:47Z","html_url":"https://github.com/dolfelt/schedule-api/pull/1#discussion_r34401337","pull_request_url":"https://api.github.com/repos/dolfelt/schedule-api/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/dolfelt/schedule-api/pulls/comments/34401337"},"html":{"href":"https://github.com/dolfelt/schedule-api/pull/1#discussion_r34401337"},"pull_request":{"href":"https://api.github.com/repos/dolfelt/schedule-api/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/dolfelt/schedule-api/pulls/1","id":39728147,"html_url":"https://github.com/dolfelt/schedule-api/pull/1","diff_url":"https://github.com/dolfelt/schedule-api/pull/1.diff","patch_url":"https://github.com/dolfelt/schedule-api/pull/1.patch","issue_url":"https://api.github.com/repos/dolfelt/schedule-api/issues/1","number":1,"state":"open","locked":false,"title":"Reworking Entity/Mapper","user":{"login":"ameech","id":831646,"avatar_url":"https://avatars.githubusercontent.com/u/831646?v=3","gravatar_id":"","url":"https://api.github.com/users/ameech","html_url":"https://github.com/ameech","followers_url":"https://api.github.com/users/ameech/followers","following_url":"https://api.github.com/users/ameech/following{/other_user}","gists_url":"https://api.github.com/users/ameech/gists{/gist_id}","starred_url":"https://api.github.com/users/ameech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ameech/subscriptions","organizations_url":"https://api.github.com/users/ameech/orgs","repos_url":"https://api.github.com/users/ameech/repos","events_url":"https://api.github.com/users/ameech/events{/privacy}","received_events_url":"https://api.github.com/users/ameech/received_events","type":"User","site_admin":false},"body":"This is a lot more verbose, but I think it makes it all a bit less magical. Also, I think it will be more obvious for new devs to come onboard and see what's going on and how to set/get/modify attributes.\r\n\r\nThis isn't totally complete, but should give a gist of what I was thinking. All of the shifts stuff is broken now.","created_at":"2015-07-10T21:54:22Z","updated_at":"2015-07-10T22:18:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"10a5c0d0dd9a18bb9cb655e786a14d47418c697b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dolfelt/schedule-api/pulls/1/commits","review_comments_url":"https://api.github.com/repos/dolfelt/schedule-api/pulls/1/comments","review_comment_url":"https://api.github.com/repos/dolfelt/schedule-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dolfelt/schedule-api/issues/1/comments","statuses_url":"https://api.github.com/repos/dolfelt/schedule-api/statuses/500f4825936aebe19cab52cca7225a9857b6444e","head":{"label":"ameech:entity-mapper-rework","ref":"entity-mapper-rework","sha":"500f4825936aebe19cab52cca7225a9857b6444e","user":{"login":"ameech","id":831646,"avatar_url":"https://avatars.githubusercontent.com/u/831646?v=3","gravatar_id":"","url":"https://api.github.com/users/ameech","html_url":"https://github.com/ameech","followers_url":"https://api.github.com/users/ameech/followers","following_url":"https://api.github.com/users/ameech/following{/other_user}","gists_url":"https://api.github.com/users/ameech/gists{/gist_id}","starred_url":"https://api.github.com/users/ameech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ameech/subscriptions","organizations_url":"https://api.github.com/users/ameech/orgs","repos_url":"https://api.github.com/users/ameech/repos","events_url":"https://api.github.com/users/ameech/events{/privacy}","received_events_url":"https://api.github.com/users/ameech/received_events","type":"User","site_admin":false},"repo":{"id":38884810,"name":"schedule-api","full_name":"ameech/schedule-api","owner":{"login":"ameech","id":831646,"avatar_url":"https://avatars.githubusercontent.com/u/831646?v=3","gravatar_id":"","url":"https://api.github.com/users/ameech","html_url":"https://github.com/ameech","followers_url":"https://api.github.com/users/ameech/followers","following_url":"https://api.github.com/users/ameech/following{/other_user}","gists_url":"https://api.github.com/users/ameech/gists{/gist_id}","starred_url":"https://api.github.com/users/ameech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ameech/subscriptions","organizations_url":"https://api.github.com/users/ameech/orgs","repos_url":"https://api.github.com/users/ameech/repos","events_url":"https://api.github.com/users/ameech/events{/privacy}","received_events_url":"https://api.github.com/users/ameech/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ameech/schedule-api","description":"Playground for scheduling things.","fork":true,"url":"https://api.github.com/repos/ameech/schedule-api","forks_url":"https://api.github.com/repos/ameech/schedule-api/forks","keys_url":"https://api.github.com/repos/ameech/schedule-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ameech/schedule-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ameech/schedule-api/teams","hooks_url":"https://api.github.com/repos/ameech/schedule-api/hooks","issue_events_url":"https://api.github.com/repos/ameech/schedule-api/issues/events{/number}","events_url":"https://api.github.com/repos/ameech/schedule-api/events","assignees_url":"https://api.github.com/repos/ameech/schedule-api/assignees{/user}","branches_url":"https://api.github.com/repos/ameech/schedule-api/branches{/branch}","tags_url":"https://api.github.com/repos/ameech/schedule-api/tags","blobs_url":"https://api.github.com/repos/ameech/schedule-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ameech/schedule-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ameech/schedule-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/ameech/schedule-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ameech/schedule-api/statuses/{sha}","languages_url":"https://api.github.com/repos/ameech/schedule-api/languages","stargazers_url":"https://api.github.com/repos/ameech/schedule-api/stargazers","contributors_url":"https://api.github.com/repos/ameech/schedule-api/contributors","subscribers_url":"https://api.github.com/repos/ameech/schedule-api/subscribers","subscription_url":"https://api.github.com/repos/ameech/schedule-api/subscription","commits_url":"https://api.github.com/repos/ameech/schedule-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/ameech/schedule-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/ameech/schedule-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/ameech/schedule-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/ameech/schedule-api/contents/{+path}","compare_url":"https://api.github.com/repos/ameech/schedule-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ameech/schedule-api/merges","archive_url":"https://api.github.com/repos/ameech/schedule-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ameech/schedule-api/downloads","issues_url":"https://api.github.com/repos/ameech/schedule-api/issues{/number}","pulls_url":"https://api.github.com/repos/ameech/schedule-api/pulls{/number}","milestones_url":"https://api.github.com/repos/ameech/schedule-api/milestones{/number}","notifications_url":"https://api.github.com/repos/ameech/schedule-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ameech/schedule-api/labels{/name}","releases_url":"https://api.github.com/repos/ameech/schedule-api/releases{/id}","created_at":"2015-07-10T14:34:22Z","updated_at":"2015-07-10T14:34:22Z","pushed_at":"2015-07-10T21:50:00Z","git_url":"git://github.com/ameech/schedule-api.git","ssh_url":"git@github.com:ameech/schedule-api.git","clone_url":"https://github.com/ameech/schedule-api.git","svn_url":"https://github.com/ameech/schedule-api","homepage":null,"size":124,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dolfelt:master","ref":"master","sha":"8f6b50926560044751b6ee2f7cd985979f28f09a","user":{"login":"dolfelt","id":202546,"avatar_url":"https://avatars.githubusercontent.com/u/202546?v=3","gravatar_id":"","url":"https://api.github.com/users/dolfelt","html_url":"https://github.com/dolfelt","followers_url":"https://api.github.com/users/dolfelt/followers","following_url":"https://api.github.com/users/dolfelt/following{/other_user}","gists_url":"https://api.github.com/users/dolfelt/gists{/gist_id}","starred_url":"https://api.github.com/users/dolfelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dolfelt/subscriptions","organizations_url":"https://api.github.com/users/dolfelt/orgs","repos_url":"https://api.github.com/users/dolfelt/repos","events_url":"https://api.github.com/users/dolfelt/events{/privacy}","received_events_url":"https://api.github.com/users/dolfelt/received_events","type":"User","site_admin":false},"repo":{"id":36773917,"name":"schedule-api","full_name":"dolfelt/schedule-api","owner":{"login":"dolfelt","id":202546,"avatar_url":"https://avatars.githubusercontent.com/u/202546?v=3","gravatar_id":"","url":"https://api.github.com/users/dolfelt","html_url":"https://github.com/dolfelt","followers_url":"https://api.github.com/users/dolfelt/followers","following_url":"https://api.github.com/users/dolfelt/following{/other_user}","gists_url":"https://api.github.com/users/dolfelt/gists{/gist_id}","starred_url":"https://api.github.com/users/dolfelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dolfelt/subscriptions","organizations_url":"https://api.github.com/users/dolfelt/orgs","repos_url":"https://api.github.com/users/dolfelt/repos","events_url":"https://api.github.com/users/dolfelt/events{/privacy}","received_events_url":"https://api.github.com/users/dolfelt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dolfelt/schedule-api","description":"Playground for scheduling things.","fork":false,"url":"https://api.github.com/repos/dolfelt/schedule-api","forks_url":"https://api.github.com/repos/dolfelt/schedule-api/forks","keys_url":"https://api.github.com/repos/dolfelt/schedule-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dolfelt/schedule-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dolfelt/schedule-api/teams","hooks_url":"https://api.github.com/repos/dolfelt/schedule-api/hooks","issue_events_url":"https://api.github.com/repos/dolfelt/schedule-api/issues/events{/number}","events_url":"https://api.github.com/repos/dolfelt/schedule-api/events","assignees_url":"https://api.github.com/repos/dolfelt/schedule-api/assignees{/user}","branches_url":"https://api.github.com/repos/dolfelt/schedule-api/branches{/branch}","tags_url":"https://api.github.com/repos/dolfelt/schedule-api/tags","blobs_url":"https://api.github.com/repos/dolfelt/schedule-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dolfelt/schedule-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dolfelt/schedule-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/dolfelt/schedule-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dolfelt/schedule-api/statuses/{sha}","languages_url":"https://api.github.com/repos/dolfelt/schedule-api/languages","stargazers_url":"https://api.github.com/repos/dolfelt/schedule-api/stargazers","contributors_url":"https://api.github.com/repos/dolfelt/schedule-api/contributors","subscribers_url":"https://api.github.com/repos/dolfelt/schedule-api/subscribers","subscription_url":"https://api.github.com/repos/dolfelt/schedule-api/subscription","commits_url":"https://api.github.com/repos/dolfelt/schedule-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/dolfelt/schedule-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/dolfelt/schedule-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/dolfelt/schedule-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/dolfelt/schedule-api/contents/{+path}","compare_url":"https://api.github.com/repos/dolfelt/schedule-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dolfelt/schedule-api/merges","archive_url":"https://api.github.com/repos/dolfelt/schedule-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dolfelt/schedule-api/downloads","issues_url":"https://api.github.com/repos/dolfelt/schedule-api/issues{/number}","pulls_url":"https://api.github.com/repos/dolfelt/schedule-api/pulls{/number}","milestones_url":"https://api.github.com/repos/dolfelt/schedule-api/milestones{/number}","notifications_url":"https://api.github.com/repos/dolfelt/schedule-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dolfelt/schedule-api/labels{/name}","releases_url":"https://api.github.com/repos/dolfelt/schedule-api/releases{/id}","created_at":"2015-06-03T02:06:12Z","updated_at":"2015-06-14T21:01:07Z","pushed_at":"2015-07-10T21:54:22Z","git_url":"git://github.com/dolfelt/schedule-api.git","ssh_url":"git@github.com:dolfelt/schedule-api.git","clone_url":"https://github.com/dolfelt/schedule-api.git","svn_url":"https://github.com/dolfelt/schedule-api","homepage":null,"size":124,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dolfelt/schedule-api/pulls/1"},"html":{"href":"https://github.com/dolfelt/schedule-api/pull/1"},"issue":{"href":"https://api.github.com/repos/dolfelt/schedule-api/issues/1"},"comments":{"href":"https://api.github.com/repos/dolfelt/schedule-api/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/dolfelt/schedule-api/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/dolfelt/schedule-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dolfelt/schedule-api/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/dolfelt/schedule-api/statuses/500f4825936aebe19cab52cca7225a9857b6444e"}}}}