{"action":"created","comment":{"url":"https://api.github.com/repos/andersinno/foosball/pulls/comments/55350574","id":55350574,"diff_hunk":"@@ -0,0 +1,56 @@\n+import datetime\n+\n+from django.core.validators import MaxValueValidator\n+from django.db import models\n+from django.utils.translation import ugettext as _\n+from model_utils.models import TimeStampedModel\n+\n+from foosball.users.models import User\n+\n+\n+class Game(TimeStampedModel):\n+    created_by = models.ForeignKey(\n+        User, related_name=\"games_created\", editable=False, null=True, verbose_name=_(\"created by\")\n+    )\n+    modified_by = models.ForeignKey(\n+        User, related_name=\"games_modified\", editable=False, null=True, verbose_name=_(\"modified by\")\n+    )\n+\n+    played_at = models.DateTimeField(\n+        default=datetime.datetime.now,\n+        verbose_name=_(\"played at\"),\n+        help_text=_(\"Time when the game was played\")\n+    )\n+\n+    class Meta:\n+        ordering = ['-played_at']\n+\n+    def __str__(self):\n+        return \" - \".join(map(str, self.teams.all()))\n+\n+\n+class GameTeam(models.Model):\n+\n+    UNKNOWN = 0\n+    RED = 1\n+    BLUE = 2\n+    SIDE_CHOICES = (\n+        (UNKNOWN, _(\"Unknown\")),","path":"foosball/games/models.py","position":38,"original_position":38,"commit_id":"85fedb3691b9229d35c8d55d0ee7be46da2096fb","original_commit_id":"7b5feada96f64776e48846821a37dd9941590ff4","user":{"login":"JsseL","id":3500484,"avatar_url":"https://avatars.githubusercontent.com/u/3500484?v=3","gravatar_id":"","url":"https://api.github.com/users/JsseL","html_url":"https://github.com/JsseL","followers_url":"https://api.github.com/users/JsseL/followers","following_url":"https://api.github.com/users/JsseL/following{/other_user}","gists_url":"https://api.github.com/users/JsseL/gists{/gist_id}","starred_url":"https://api.github.com/users/JsseL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JsseL/subscriptions","organizations_url":"https://api.github.com/users/JsseL/orgs","repos_url":"https://api.github.com/users/JsseL/repos","events_url":"https://api.github.com/users/JsseL/events{/privacy}","received_events_url":"https://api.github.com/users/JsseL/received_events","type":"User","site_admin":false},"body":"Indeed.. Though our *scientific feeling* is that :red_circle: team is superior on odd days. Though we have some non existent data that gives hints of blue team's superiority. Games must go on to  make the results clearer. :tophat: :page_facing_up: ","created_at":"2016-03-08T12:08:27Z","updated_at":"2016-03-08T12:08:27Z","html_url":"https://github.com/andersinno/foosball/pull/3#discussion_r55350574","pull_request_url":"https://api.github.com/repos/andersinno/foosball/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/andersinno/foosball/pulls/comments/55350574"},"html":{"href":"https://github.com/andersinno/foosball/pull/3#discussion_r55350574"},"pull_request":{"href":"https://api.github.com/repos/andersinno/foosball/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/andersinno/foosball/pulls/3","id":61841138,"html_url":"https://github.com/andersinno/foosball/pull/3","diff_url":"https://github.com/andersinno/foosball/pull/3.diff","patch_url":"https://github.com/andersinno/foosball/pull/3.patch","issue_url":"https://api.github.com/repos/andersinno/foosball/issues/3","number":3,"state":"closed","locked":false,"title":"Initial models","user":{"login":"charn","id":225211,"avatar_url":"https://avatars.githubusercontent.com/u/225211?v=3","gravatar_id":"","url":"https://api.github.com/users/charn","html_url":"https://github.com/charn","followers_url":"https://api.github.com/users/charn/followers","following_url":"https://api.github.com/users/charn/following{/other_user}","gists_url":"https://api.github.com/users/charn/gists{/gist_id}","starred_url":"https://api.github.com/users/charn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charn/subscriptions","organizations_url":"https://api.github.com/users/charn/orgs","repos_url":"https://api.github.com/users/charn/repos","events_url":"https://api.github.com/users/charn/events{/privacy}","received_events_url":"https://api.github.com/users/charn/received_events","type":"User","site_admin":false},"body":"This PR includes initial models and views for inputting data.\r\n\r\n**Screenshot**\r\n![data_input](https://cloud.githubusercontent.com/assets/225211/13554006/d35217c6-e3a4-11e5-9f5c-b0896608e282.png)\r\n","created_at":"2016-03-06T12:08:59Z","updated_at":"2016-03-08T12:08:27Z","closed_at":"2016-03-08T08:26:23Z","merged_at":"2016-03-08T08:26:23Z","merge_commit_sha":"f95a77dedcb633fb7bab89c05487cd9247059dfb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/andersinno/foosball/pulls/3/commits","review_comments_url":"https://api.github.com/repos/andersinno/foosball/pulls/3/comments","review_comment_url":"https://api.github.com/repos/andersinno/foosball/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andersinno/foosball/issues/3/comments","statuses_url":"https://api.github.com/repos/andersinno/foosball/statuses/85fedb3691b9229d35c8d55d0ee7be46da2096fb","head":{"label":"andersinno:initial-models","ref":"initial-models","sha":"85fedb3691b9229d35c8d55d0ee7be46da2096fb","user":{"login":"andersinno","id":1138034,"avatar_url":"https://avatars.githubusercontent.com/u/1138034?v=3","gravatar_id":"","url":"https://api.github.com/users/andersinno","html_url":"https://github.com/andersinno","followers_url":"https://api.github.com/users/andersinno/followers","following_url":"https://api.github.com/users/andersinno/following{/other_user}","gists_url":"https://api.github.com/users/andersinno/gists{/gist_id}","starred_url":"https://api.github.com/users/andersinno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andersinno/subscriptions","organizations_url":"https://api.github.com/users/andersinno/orgs","repos_url":"https://api.github.com/users/andersinno/repos","events_url":"https://api.github.com/users/andersinno/events{/privacy}","received_events_url":"https://api.github.com/users/andersinno/received_events","type":"Organization","site_admin":false},"repo":{"id":52783102,"name":"foosball","full_name":"andersinno/foosball","owner":{"login":"andersinno","id":1138034,"avatar_url":"https://avatars.githubusercontent.com/u/1138034?v=3","gravatar_id":"","url":"https://api.github.com/users/andersinno","html_url":"https://github.com/andersinno","followers_url":"https://api.github.com/users/andersinno/followers","following_url":"https://api.github.com/users/andersinno/following{/other_user}","gists_url":"https://api.github.com/users/andersinno/gists{/gist_id}","starred_url":"https://api.github.com/users/andersinno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andersinno/subscriptions","organizations_url":"https://api.github.com/users/andersinno/orgs","repos_url":"https://api.github.com/users/andersinno/repos","events_url":"https://api.github.com/users/andersinno/events{/privacy}","received_events_url":"https://api.github.com/users/andersinno/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/andersinno/foosball","description":"Office foosball results!","fork":false,"url":"https://api.github.com/repos/andersinno/foosball","forks_url":"https://api.github.com/repos/andersinno/foosball/forks","keys_url":"https://api.github.com/repos/andersinno/foosball/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andersinno/foosball/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andersinno/foosball/teams","hooks_url":"https://api.github.com/repos/andersinno/foosball/hooks","issue_events_url":"https://api.github.com/repos/andersinno/foosball/issues/events{/number}","events_url":"https://api.github.com/repos/andersinno/foosball/events","assignees_url":"https://api.github.com/repos/andersinno/foosball/assignees{/user}","branches_url":"https://api.github.com/repos/andersinno/foosball/branches{/branch}","tags_url":"https://api.github.com/repos/andersinno/foosball/tags","blobs_url":"https://api.github.com/repos/andersinno/foosball/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andersinno/foosball/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andersinno/foosball/git/refs{/sha}","trees_url":"https://api.github.com/repos/andersinno/foosball/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andersinno/foosball/statuses/{sha}","languages_url":"https://api.github.com/repos/andersinno/foosball/languages","stargazers_url":"https://api.github.com/repos/andersinno/foosball/stargazers","contributors_url":"https://api.github.com/repos/andersinno/foosball/contributors","subscribers_url":"https://api.github.com/repos/andersinno/foosball/subscribers","subscription_url":"https://api.github.com/repos/andersinno/foosball/subscription","commits_url":"https://api.github.com/repos/andersinno/foosball/commits{/sha}","git_commits_url":"https://api.github.com/repos/andersinno/foosball/git/commits{/sha}","comments_url":"https://api.github.com/repos/andersinno/foosball/comments{/number}","issue_comment_url":"https://api.github.com/repos/andersinno/foosball/issues/comments{/number}","contents_url":"https://api.github.com/repos/andersinno/foosball/contents/{+path}","compare_url":"https://api.github.com/repos/andersinno/foosball/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andersinno/foosball/merges","archive_url":"https://api.github.com/repos/andersinno/foosball/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andersinno/foosball/downloads","issues_url":"https://api.github.com/repos/andersinno/foosball/issues{/number}","pulls_url":"https://api.github.com/repos/andersinno/foosball/pulls{/number}","milestones_url":"https://api.github.com/repos/andersinno/foosball/milestones{/number}","notifications_url":"https://api.github.com/repos/andersinno/foosball/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andersinno/foosball/labels{/name}","releases_url":"https://api.github.com/repos/andersinno/foosball/releases{/id}","deployments_url":"https://api.github.com/repos/andersinno/foosball/deployments","created_at":"2016-02-29T10:27:51Z","updated_at":"2016-03-03T08:51:52Z","pushed_at":"2016-03-08T08:30:40Z","git_url":"git://github.com/andersinno/foosball.git","ssh_url":"git@github.com:andersinno/foosball.git","clone_url":"https://github.com/andersinno/foosball.git","svn_url":"https://github.com/andersinno/foosball","homepage":null,"size":132,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"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":2,"default_branch":"master"}},"base":{"label":"andersinno:master","ref":"master","sha":"b927210a458b15f7d455ec7c5a504fd7a1bef356","user":{"login":"andersinno","id":1138034,"avatar_url":"https://avatars.githubusercontent.com/u/1138034?v=3","gravatar_id":"","url":"https://api.github.com/users/andersinno","html_url":"https://github.com/andersinno","followers_url":"https://api.github.com/users/andersinno/followers","following_url":"https://api.github.com/users/andersinno/following{/other_user}","gists_url":"https://api.github.com/users/andersinno/gists{/gist_id}","starred_url":"https://api.github.com/users/andersinno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andersinno/subscriptions","organizations_url":"https://api.github.com/users/andersinno/orgs","repos_url":"https://api.github.com/users/andersinno/repos","events_url":"https://api.github.com/users/andersinno/events{/privacy}","received_events_url":"https://api.github.com/users/andersinno/received_events","type":"Organization","site_admin":false},"repo":{"id":52783102,"name":"foosball","full_name":"andersinno/foosball","owner":{"login":"andersinno","id":1138034,"avatar_url":"https://avatars.githubusercontent.com/u/1138034?v=3","gravatar_id":"","url":"https://api.github.com/users/andersinno","html_url":"https://github.com/andersinno","followers_url":"https://api.github.com/users/andersinno/followers","following_url":"https://api.github.com/users/andersinno/following{/other_user}","gists_url":"https://api.github.com/users/andersinno/gists{/gist_id}","starred_url":"https://api.github.com/users/andersinno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andersinno/subscriptions","organizations_url":"https://api.github.com/users/andersinno/orgs","repos_url":"https://api.github.com/users/andersinno/repos","events_url":"https://api.github.com/users/andersinno/events{/privacy}","received_events_url":"https://api.github.com/users/andersinno/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/andersinno/foosball","description":"Office foosball results!","fork":false,"url":"https://api.github.com/repos/andersinno/foosball","forks_url":"https://api.github.com/repos/andersinno/foosball/forks","keys_url":"https://api.github.com/repos/andersinno/foosball/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andersinno/foosball/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andersinno/foosball/teams","hooks_url":"https://api.github.com/repos/andersinno/foosball/hooks","issue_events_url":"https://api.github.com/repos/andersinno/foosball/issues/events{/number}","events_url":"https://api.github.com/repos/andersinno/foosball/events","assignees_url":"https://api.github.com/repos/andersinno/foosball/assignees{/user}","branches_url":"https://api.github.com/repos/andersinno/foosball/branches{/branch}","tags_url":"https://api.github.com/repos/andersinno/foosball/tags","blobs_url":"https://api.github.com/repos/andersinno/foosball/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andersinno/foosball/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andersinno/foosball/git/refs{/sha}","trees_url":"https://api.github.com/repos/andersinno/foosball/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andersinno/foosball/statuses/{sha}","languages_url":"https://api.github.com/repos/andersinno/foosball/languages","stargazers_url":"https://api.github.com/repos/andersinno/foosball/stargazers","contributors_url":"https://api.github.com/repos/andersinno/foosball/contributors","subscribers_url":"https://api.github.com/repos/andersinno/foosball/subscribers","subscription_url":"https://api.github.com/repos/andersinno/foosball/subscription","commits_url":"https://api.github.com/repos/andersinno/foosball/commits{/sha}","git_commits_url":"https://api.github.com/repos/andersinno/foosball/git/commits{/sha}","comments_url":"https://api.github.com/repos/andersinno/foosball/comments{/number}","issue_comment_url":"https://api.github.com/repos/andersinno/foosball/issues/comments{/number}","contents_url":"https://api.github.com/repos/andersinno/foosball/contents/{+path}","compare_url":"https://api.github.com/repos/andersinno/foosball/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andersinno/foosball/merges","archive_url":"https://api.github.com/repos/andersinno/foosball/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andersinno/foosball/downloads","issues_url":"https://api.github.com/repos/andersinno/foosball/issues{/number}","pulls_url":"https://api.github.com/repos/andersinno/foosball/pulls{/number}","milestones_url":"https://api.github.com/repos/andersinno/foosball/milestones{/number}","notifications_url":"https://api.github.com/repos/andersinno/foosball/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andersinno/foosball/labels{/name}","releases_url":"https://api.github.com/repos/andersinno/foosball/releases{/id}","deployments_url":"https://api.github.com/repos/andersinno/foosball/deployments","created_at":"2016-02-29T10:27:51Z","updated_at":"2016-03-03T08:51:52Z","pushed_at":"2016-03-08T08:30:40Z","git_url":"git://github.com/andersinno/foosball.git","ssh_url":"git@github.com:andersinno/foosball.git","clone_url":"https://github.com/andersinno/foosball.git","svn_url":"https://github.com/andersinno/foosball","homepage":null,"size":132,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"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":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/andersinno/foosball/pulls/3"},"html":{"href":"https://github.com/andersinno/foosball/pull/3"},"issue":{"href":"https://api.github.com/repos/andersinno/foosball/issues/3"},"comments":{"href":"https://api.github.com/repos/andersinno/foosball/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/andersinno/foosball/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/andersinno/foosball/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andersinno/foosball/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/andersinno/foosball/statuses/85fedb3691b9229d35c8d55d0ee7be46da2096fb"}}}}