{"action":"created","comment":{"url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/pulls/comments/43961708","id":43961708,"diff_hunk":"@@ -0,0 +1,771 @@\n+\"use strict\";\n+\n+import mysql from \"mysql\";\n+import config from \"../config/config.json\";\n+\n+function getMysqlConnection() {\n+  var connection = mysql.createConnection({\n+    host: config.db.host,\n+    user: config.db.user,\n+    password: config.db.password,\n+    database: config.db.databaseName\n+  });\n+  connection.connect();\n+  return connection;\n+}\n+\n+class Api {\n+  static get() {\n+    var api = new Api();\n+    api.id = 1;\n+    return api;\n+  }\n+}\n+\n+/* User System\n+    1. Users have a 1-1 relationship with Persons. A user is how accounts \n+       and activity are managed, whereas a Person is a conceptual human being\n+       that may be referred to even if that particular real life person does\n+       not have a user account established in the system. \n+    2. The system will try to create linkages where possible with existing \n+       Persons when a person is attempting to establish an account and where\n+       they have already been referred to in other data (being cast in a role\n+       in a production that is known to the system, for example). In order to\n+       claim an account, the user must provide some form of contact information\n+       so that an admin is able to reach out to them in the case of invalid\n+       claiming of an account. All claimed Persons will be marked as such in\n+       order to aid in tracking down issues related to improper claiming of\n+       Persons.\n+    3. Users have three levels: Global Admin, Org Admin, and Participant.\n+       Technically, there is some conceptual muddiness with Participants.\n+       Participant includes users who participate in *creating* theatre events\n+       as well as audience members who merely are engaged in *attending* theatre\n+       events. Anyone can attend events, obviously. But the way the permissions\n+       are modelled, anyone could also begin to participate in creating events.\n+       All that would change is that the user would assign or be assigned to\n+       one or more collaborator roles.\n+ */\n+\n+class User {","path":"app-server/database.js","position":49,"original_position":49,"commit_id":"9f6dbc2f6b58937de213155b9716931387b2e95a","original_commit_id":"9f6dbc2f6b58937de213155b9716931387b2e95a","user":{"login":"theazureshadow","id":727514,"avatar_url":"https://avatars.githubusercontent.com/u/727514?v=3","gravatar_id":"","url":"https://api.github.com/users/theazureshadow","html_url":"https://github.com/theazureshadow","followers_url":"https://api.github.com/users/theazureshadow/followers","following_url":"https://api.github.com/users/theazureshadow/following{/other_user}","gists_url":"https://api.github.com/users/theazureshadow/gists{/gist_id}","starred_url":"https://api.github.com/users/theazureshadow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theazureshadow/subscriptions","organizations_url":"https://api.github.com/users/theazureshadow/orgs","repos_url":"https://api.github.com/users/theazureshadow/repos","events_url":"https://api.github.com/users/theazureshadow/events{/privacy}","received_events_url":"https://api.github.com/users/theazureshadow/received_events","type":"User","site_admin":false},"body":"Why not separate files for the different classes?","created_at":"2015-11-05T00:23:43Z","updated_at":"2015-11-05T00:23:43Z","html_url":"https://github.com/blendersfun/seattle-theatre-site2/pull/1#discussion_r43961708","pull_request_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/pulls/comments/43961708"},"html":{"href":"https://github.com/blendersfun/seattle-theatre-site2/pull/1#discussion_r43961708"},"pull_request":{"href":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/pulls/1","id":49762653,"html_url":"https://github.com/blendersfun/seattle-theatre-site2/pull/1","diff_url":"https://github.com/blendersfun/seattle-theatre-site2/pull/1.diff","patch_url":"https://github.com/blendersfun/seattle-theatre-site2/pull/1.patch","issue_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/issues/1","number":1,"state":"open","locked":false,"title":"Milestone1","user":{"login":"blendersfun","id":859223,"avatar_url":"https://avatars.githubusercontent.com/u/859223?v=3","gravatar_id":"","url":"https://api.github.com/users/blendersfun","html_url":"https://github.com/blendersfun","followers_url":"https://api.github.com/users/blendersfun/followers","following_url":"https://api.github.com/users/blendersfun/following{/other_user}","gists_url":"https://api.github.com/users/blendersfun/gists{/gist_id}","starred_url":"https://api.github.com/users/blendersfun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blendersfun/subscriptions","organizations_url":"https://api.github.com/users/blendersfun/orgs","repos_url":"https://api.github.com/users/blendersfun/repos","events_url":"https://api.github.com/users/blendersfun/events{/privacy}","received_events_url":"https://api.github.com/users/blendersfun/received_events","type":"User","site_admin":false},"body":"Happy path for:\r\n  1. Create user\r\n  2. Login\r\n  3. Create producing org\r\n  4. Create production\r\n       a. Select venue for production\r\n","created_at":"2015-11-04T23:36:30Z","updated_at":"2015-11-05T00:23:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e2924bd85b1baef9c4a9c402fbe6c15f4b3a4359","assignee":{"login":"theazureshadow","id":727514,"avatar_url":"https://avatars.githubusercontent.com/u/727514?v=3","gravatar_id":"","url":"https://api.github.com/users/theazureshadow","html_url":"https://github.com/theazureshadow","followers_url":"https://api.github.com/users/theazureshadow/followers","following_url":"https://api.github.com/users/theazureshadow/following{/other_user}","gists_url":"https://api.github.com/users/theazureshadow/gists{/gist_id}","starred_url":"https://api.github.com/users/theazureshadow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theazureshadow/subscriptions","organizations_url":"https://api.github.com/users/theazureshadow/orgs","repos_url":"https://api.github.com/users/theazureshadow/repos","events_url":"https://api.github.com/users/theazureshadow/events{/privacy}","received_events_url":"https://api.github.com/users/theazureshadow/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/pulls/1/commits","review_comments_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/pulls/1/comments","review_comment_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/issues/1/comments","statuses_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/statuses/9f6dbc2f6b58937de213155b9716931387b2e95a","head":{"label":"blendersfun:milestone1","ref":"milestone1","sha":"9f6dbc2f6b58937de213155b9716931387b2e95a","user":{"login":"blendersfun","id":859223,"avatar_url":"https://avatars.githubusercontent.com/u/859223?v=3","gravatar_id":"","url":"https://api.github.com/users/blendersfun","html_url":"https://github.com/blendersfun","followers_url":"https://api.github.com/users/blendersfun/followers","following_url":"https://api.github.com/users/blendersfun/following{/other_user}","gists_url":"https://api.github.com/users/blendersfun/gists{/gist_id}","starred_url":"https://api.github.com/users/blendersfun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blendersfun/subscriptions","organizations_url":"https://api.github.com/users/blendersfun/orgs","repos_url":"https://api.github.com/users/blendersfun/repos","events_url":"https://api.github.com/users/blendersfun/events{/privacy}","received_events_url":"https://api.github.com/users/blendersfun/received_events","type":"User","site_admin":false},"repo":{"id":44516329,"name":"seattle-theatre-site2","full_name":"blendersfun/seattle-theatre-site2","owner":{"login":"blendersfun","id":859223,"avatar_url":"https://avatars.githubusercontent.com/u/859223?v=3","gravatar_id":"","url":"https://api.github.com/users/blendersfun","html_url":"https://github.com/blendersfun","followers_url":"https://api.github.com/users/blendersfun/followers","following_url":"https://api.github.com/users/blendersfun/following{/other_user}","gists_url":"https://api.github.com/users/blendersfun/gists{/gist_id}","starred_url":"https://api.github.com/users/blendersfun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blendersfun/subscriptions","organizations_url":"https://api.github.com/users/blendersfun/orgs","repos_url":"https://api.github.com/users/blendersfun/repos","events_url":"https://api.github.com/users/blendersfun/events{/privacy}","received_events_url":"https://api.github.com/users/blendersfun/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/blendersfun/seattle-theatre-site2","description":"A site for finding theatre and dance events in the Seattle area.","fork":false,"url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2","forks_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/forks","keys_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/teams","hooks_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/hooks","issue_events_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/issues/events{/number}","events_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/events","assignees_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/assignees{/user}","branches_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/branches{/branch}","tags_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/tags","blobs_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/git/refs{/sha}","trees_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/statuses/{sha}","languages_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/languages","stargazers_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/stargazers","contributors_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/contributors","subscribers_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/subscribers","subscription_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/subscription","commits_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/commits{/sha}","git_commits_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/git/commits{/sha}","comments_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/comments{/number}","issue_comment_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/issues/comments{/number}","contents_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/contents/{+path}","compare_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/merges","archive_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/downloads","issues_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/issues{/number}","pulls_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/pulls{/number}","milestones_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/milestones{/number}","notifications_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/labels{/name}","releases_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/releases{/id}","created_at":"2015-10-19T06:52:24Z","updated_at":"2015-10-19T06:59:05Z","pushed_at":"2015-11-04T23:36:32Z","git_url":"git://github.com/blendersfun/seattle-theatre-site2.git","ssh_url":"git@github.com:blendersfun/seattle-theatre-site2.git","clone_url":"https://github.com/blendersfun/seattle-theatre-site2.git","svn_url":"https://github.com/blendersfun/seattle-theatre-site2","homepage":null,"size":228,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"blendersfun:master","ref":"master","sha":"6543808e11bf86e5003d435aec6000dbc772ddd9","user":{"login":"blendersfun","id":859223,"avatar_url":"https://avatars.githubusercontent.com/u/859223?v=3","gravatar_id":"","url":"https://api.github.com/users/blendersfun","html_url":"https://github.com/blendersfun","followers_url":"https://api.github.com/users/blendersfun/followers","following_url":"https://api.github.com/users/blendersfun/following{/other_user}","gists_url":"https://api.github.com/users/blendersfun/gists{/gist_id}","starred_url":"https://api.github.com/users/blendersfun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blendersfun/subscriptions","organizations_url":"https://api.github.com/users/blendersfun/orgs","repos_url":"https://api.github.com/users/blendersfun/repos","events_url":"https://api.github.com/users/blendersfun/events{/privacy}","received_events_url":"https://api.github.com/users/blendersfun/received_events","type":"User","site_admin":false},"repo":{"id":44516329,"name":"seattle-theatre-site2","full_name":"blendersfun/seattle-theatre-site2","owner":{"login":"blendersfun","id":859223,"avatar_url":"https://avatars.githubusercontent.com/u/859223?v=3","gravatar_id":"","url":"https://api.github.com/users/blendersfun","html_url":"https://github.com/blendersfun","followers_url":"https://api.github.com/users/blendersfun/followers","following_url":"https://api.github.com/users/blendersfun/following{/other_user}","gists_url":"https://api.github.com/users/blendersfun/gists{/gist_id}","starred_url":"https://api.github.com/users/blendersfun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blendersfun/subscriptions","organizations_url":"https://api.github.com/users/blendersfun/orgs","repos_url":"https://api.github.com/users/blendersfun/repos","events_url":"https://api.github.com/users/blendersfun/events{/privacy}","received_events_url":"https://api.github.com/users/blendersfun/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/blendersfun/seattle-theatre-site2","description":"A site for finding theatre and dance events in the Seattle area.","fork":false,"url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2","forks_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/forks","keys_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/teams","hooks_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/hooks","issue_events_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/issues/events{/number}","events_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/events","assignees_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/assignees{/user}","branches_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/branches{/branch}","tags_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/tags","blobs_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/git/refs{/sha}","trees_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/statuses/{sha}","languages_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/languages","stargazers_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/stargazers","contributors_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/contributors","subscribers_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/subscribers","subscription_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/subscription","commits_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/commits{/sha}","git_commits_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/git/commits{/sha}","comments_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/comments{/number}","issue_comment_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/issues/comments{/number}","contents_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/contents/{+path}","compare_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/merges","archive_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/downloads","issues_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/issues{/number}","pulls_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/pulls{/number}","milestones_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/milestones{/number}","notifications_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/labels{/name}","releases_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/releases{/id}","created_at":"2015-10-19T06:52:24Z","updated_at":"2015-10-19T06:59:05Z","pushed_at":"2015-11-04T23:36:32Z","git_url":"git://github.com/blendersfun/seattle-theatre-site2.git","ssh_url":"git@github.com:blendersfun/seattle-theatre-site2.git","clone_url":"https://github.com/blendersfun/seattle-theatre-site2.git","svn_url":"https://github.com/blendersfun/seattle-theatre-site2","homepage":null,"size":228,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/pulls/1"},"html":{"href":"https://github.com/blendersfun/seattle-theatre-site2/pull/1"},"issue":{"href":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/issues/1"},"comments":{"href":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/blendersfun/seattle-theatre-site2/statuses/9f6dbc2f6b58937de213155b9716931387b2e95a"}}}}