{"action":"created","comment":{"url":"https://api.github.com/repos/caciviclab/disclosure-backend/pulls/comments/49261601","id":49261601,"diff_hunk":"@@ -0,0 +1,145 @@\n+from __future__ import unicode_literals\n+from django.db import models\n+from django.utils.encoding import python_2_unicode_compatible\n+\n+from candidate.models import SocialMediaModel, Person\n+\n+\n+@python_2_unicode_compatible\n+class Committee(SocialMediaModel):\n+    COMMITTEE_TYPES = (\n+        ('OF', 'Primarily-formed Official Committee'),\n+        ('PF', 'Primariliy-formed Committee'),\n+        ('IC', 'Independent Committee')\n+    )\n+    name = models.CharField(max_length=255)\n+    address = models.ForeignKey('locality.Address', null=True)\n+    locality = models.ForeignKey('locality.Locality', null=True)\n+    committee_id = models.CharField(max_length=16, unique=True)","path":"finance/models.py","position":18,"original_position":18,"commit_id":"aa73e375a2f31178488d87cc9535b76ed1407eac","original_commit_id":"aa73e375a2f31178488d87cc9535b76ed1407eac","user":{"login":"adborden","id":509703,"avatar_url":"https://avatars.githubusercontent.com/u/509703?v=3","gravatar_id":"","url":"https://api.github.com/users/adborden","html_url":"https://github.com/adborden","followers_url":"https://api.github.com/users/adborden/followers","following_url":"https://api.github.com/users/adborden/following{/other_user}","gists_url":"https://api.github.com/users/adborden/gists{/gist_id}","starred_url":"https://api.github.com/users/adborden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adborden/subscriptions","organizations_url":"https://api.github.com/users/adborden/orgs","repos_url":"https://api.github.com/users/adborden/repos","events_url":"https://api.github.com/users/adborden/events{/privacy}","received_events_url":"https://api.github.com/users/adborden/received_events","type":"User","site_admin":false},"body":"I might name this something different than committee_id. I'm assuming this Id is coming from a third-party (netfile or something). But I also see us using the name `committee_id` on other models to refer to Committee.id, which might be confusing.\r\n\r\nIs there another name the source has given it? Filer id?","created_at":"2016-01-09T07:34:16Z","updated_at":"2016-01-09T07:34:16Z","html_url":"https://github.com/caciviclab/disclosure-backend/pull/103#discussion_r49261601","pull_request_url":"https://api.github.com/repos/caciviclab/disclosure-backend/pulls/103","_links":{"self":{"href":"https://api.github.com/repos/caciviclab/disclosure-backend/pulls/comments/49261601"},"html":{"href":"https://github.com/caciviclab/disclosure-backend/pull/103#discussion_r49261601"},"pull_request":{"href":"https://api.github.com/repos/caciviclab/disclosure-backend/pulls/103"}}},"pull_request":{"url":"https://api.github.com/repos/caciviclab/disclosure-backend/pulls/103","id":54701609,"html_url":"https://github.com/caciviclab/disclosure-backend/pull/103","diff_url":"https://github.com/caciviclab/disclosure-backend/pull/103.diff","patch_url":"https://github.com/caciviclab/disclosure-backend/pull/103.patch","issue_url":"https://api.github.com/repos/caciviclab/disclosure-backend/issues/103","number":103,"state":"open","locked":false,"title":"Implement proposed database schema","user":{"login":"bcipolli","id":4072455,"avatar_url":"https://avatars.githubusercontent.com/u/4072455?v=3","gravatar_id":"","url":"https://api.github.com/users/bcipolli","html_url":"https://github.com/bcipolli","followers_url":"https://api.github.com/users/bcipolli/followers","following_url":"https://api.github.com/users/bcipolli/following{/other_user}","gists_url":"https://api.github.com/users/bcipolli/gists{/gist_id}","starred_url":"https://api.github.com/users/bcipolli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcipolli/subscriptions","organizations_url":"https://api.github.com/users/bcipolli/orgs","repos_url":"https://api.github.com/users/bcipolli/repos","events_url":"https://api.github.com/users/bcipolli/events{/privacy}","received_events_url":"https://api.github.com/users/bcipolli/received_events","type":"User","site_admin":false},"body":"This also works off of #101. This implements the database schema proposed here:\r\nhttps://github.com/caciviclab/caciviclab.github.io/wiki/Data-relationships---Database-schema\r\n\r\nWith a full schema such as this, we can begin to build the APIs required for the front-end apps, and start to fill the database with relevant data from `NetFile` and `CalAccess`.\r\n\r\nBesides implementing the schema above, this PR:\r\n* Renames `netfile` to `netfile_raw`. The idea is to have a stand-alone app that simply loads raw netfile data into a database table, so that data munging can happen in Python/Django rather than through csv/pandas.\r\n* Moves all of `zipcode_metro` into `locality`. Note that the management command for loading zip codes is temporarily broken.\r\n\r\nTo deal with lacking a globally unique ID, I've pushed the `Locality` model to contain such an ID. It'll be an arbitrary ID that can be used, app-wide, to refer to things. I don't know if it'll ever be needed, but it's in the doc :)\r\n\r\n@jnmarcus Really gotta run, but wanted to push this up for you & others to consider! May be hard to read without #101 merged, however...","created_at":"2015-12-29T04:28:11Z","updated_at":"2016-01-09T07:34:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bd5a453d9c42096f37a40414a2fe0c9c59804a69","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/caciviclab/disclosure-backend/pulls/103/commits","review_comments_url":"https://api.github.com/repos/caciviclab/disclosure-backend/pulls/103/comments","review_comment_url":"https://api.github.com/repos/caciviclab/disclosure-backend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/caciviclab/disclosure-backend/issues/103/comments","statuses_url":"https://api.github.com/repos/caciviclab/disclosure-backend/statuses/aa73e375a2f31178488d87cc9535b76ed1407eac","head":{"label":"bcipolli:refactor","ref":"refactor","sha":"aa73e375a2f31178488d87cc9535b76ed1407eac","user":{"login":"bcipolli","id":4072455,"avatar_url":"https://avatars.githubusercontent.com/u/4072455?v=3","gravatar_id":"","url":"https://api.github.com/users/bcipolli","html_url":"https://github.com/bcipolli","followers_url":"https://api.github.com/users/bcipolli/followers","following_url":"https://api.github.com/users/bcipolli/following{/other_user}","gists_url":"https://api.github.com/users/bcipolli/gists{/gist_id}","starred_url":"https://api.github.com/users/bcipolli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcipolli/subscriptions","organizations_url":"https://api.github.com/users/bcipolli/orgs","repos_url":"https://api.github.com/users/bcipolli/repos","events_url":"https://api.github.com/users/bcipolli/events{/privacy}","received_events_url":"https://api.github.com/users/bcipolli/received_events","type":"User","site_admin":false},"repo":{"id":48266125,"name":"opendisclosure-backend","full_name":"bcipolli/opendisclosure-backend","owner":{"login":"bcipolli","id":4072455,"avatar_url":"https://avatars.githubusercontent.com/u/4072455?v=3","gravatar_id":"","url":"https://api.github.com/users/bcipolli","html_url":"https://github.com/bcipolli","followers_url":"https://api.github.com/users/bcipolli/followers","following_url":"https://api.github.com/users/bcipolli/following{/other_user}","gists_url":"https://api.github.com/users/bcipolli/gists{/gist_id}","starred_url":"https://api.github.com/users/bcipolli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcipolli/subscriptions","organizations_url":"https://api.github.com/users/bcipolli/orgs","repos_url":"https://api.github.com/users/bcipolli/repos","events_url":"https://api.github.com/users/bcipolli/events{/privacy}","received_events_url":"https://api.github.com/users/bcipolli/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bcipolli/opendisclosure-backend","description":"A Django app to download, extract and load campaign finance and lobbying activity data from the California Secretary of State's CAL-ACCESS database as well as local Netfile jurisdictions","fork":true,"url":"https://api.github.com/repos/bcipolli/opendisclosure-backend","forks_url":"https://api.github.com/repos/bcipolli/opendisclosure-backend/forks","keys_url":"https://api.github.com/repos/bcipolli/opendisclosure-backend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bcipolli/opendisclosure-backend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bcipolli/opendisclosure-backend/teams","hooks_url":"https://api.github.com/repos/bcipolli/opendisclosure-backend/hooks","issue_events_url":"https://api.github.com/repos/bcipolli/opendisclosure-backend/issues/events{/number}","events_url":"https://api.github.com/repos/bcipolli/opendisclosure-backend/events","assignees_url":"https://api.github.com/repos/bcipolli/opendisclosure-backend/assignees{/user}","branches_url":"https://api.github.com/repos/bcipolli/opendisclosure-backend/branches{/branch}","tags_url":"https://api.github.com/repos/bcipolli/opendisclosure-backend/tags","blobs_url":"https://api.github.com/repos/bcipolli/opendisclosure-backend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bcipolli/opendisclosure-backend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bcipolli/opendisclosure-backend/git/refs{/sha}","trees_url":"https://api.github.com/repos/bcipolli/opendisclosure-backend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bcipolli/opendisclosure-backend/statuses/{sha}","languages_url":"https://api.github.com/repos/bcipolli/opendisclosure-backend/languages","stargazers_url":"https://api.github.com/repos/bcipolli/opendisclosure-backend/stargazers","contributors_url":"https://api.github.com/repos/bcipolli/opendisclosure-backend/contributors","subscribers_url":"https://api.github.com/repos/bcipolli/opendisclosure-backend/subscribers","subscription_url":"https://api.github.com/repos/bcipolli/opendisclosure-backend/subscription","commits_url":"https://api.github.com/repos/bcipolli/opendisclosure-backend/commits{/sha}","git_commits_url":"https://api.github.com/repos/bcipolli/opendisclosure-backend/git/commits{/sha}","comments_url":"https://api.github.com/repos/bcipolli/opendisclosure-backend/comments{/number}","issue_comment_url":"https://api.github.com/repos/bcipolli/opendisclosure-backend/issues/comments{/number}","contents_url":"https://api.github.com/repos/bcipolli/opendisclosure-backend/contents/{+path}","compare_url":"https://api.github.com/repos/bcipolli/opendisclosure-backend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bcipolli/opendisclosure-backend/merges","archive_url":"https://api.github.com/repos/bcipolli/opendisclosure-backend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bcipolli/opendisclosure-backend/downloads","issues_url":"https://api.github.com/repos/bcipolli/opendisclosure-backend/issues{/number}","pulls_url":"https://api.github.com/repos/bcipolli/opendisclosure-backend/pulls{/number}","milestones_url":"https://api.github.com/repos/bcipolli/opendisclosure-backend/milestones{/number}","notifications_url":"https://api.github.com/repos/bcipolli/opendisclosure-backend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bcipolli/opendisclosure-backend/labels{/name}","releases_url":"https://api.github.com/repos/bcipolli/opendisclosure-backend/releases{/id}","created_at":"2015-12-19T02:53:28Z","updated_at":"2015-12-19T02:53:33Z","pushed_at":"2016-01-09T00:55:33Z","git_url":"git://github.com/bcipolli/opendisclosure-backend.git","ssh_url":"git@github.com:bcipolli/opendisclosure-backend.git","clone_url":"https://github.com/bcipolli/opendisclosure-backend.git","svn_url":"https://github.com/bcipolli/opendisclosure-backend","homepage":"http://admin.caciviclab.org","size":8596,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"caciviclab:master","ref":"master","sha":"6d97305b4656bd630b9e12aef953daed51c84ed7","user":{"login":"caciviclab","id":9602455,"avatar_url":"https://avatars.githubusercontent.com/u/9602455?v=3","gravatar_id":"","url":"https://api.github.com/users/caciviclab","html_url":"https://github.com/caciviclab","followers_url":"https://api.github.com/users/caciviclab/followers","following_url":"https://api.github.com/users/caciviclab/following{/other_user}","gists_url":"https://api.github.com/users/caciviclab/gists{/gist_id}","starred_url":"https://api.github.com/users/caciviclab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caciviclab/subscriptions","organizations_url":"https://api.github.com/users/caciviclab/orgs","repos_url":"https://api.github.com/users/caciviclab/repos","events_url":"https://api.github.com/users/caciviclab/events{/privacy}","received_events_url":"https://api.github.com/users/caciviclab/received_events","type":"Organization","site_admin":false},"repo":{"id":35735318,"name":"disclosure-backend","full_name":"caciviclab/disclosure-backend","owner":{"login":"caciviclab","id":9602455,"avatar_url":"https://avatars.githubusercontent.com/u/9602455?v=3","gravatar_id":"","url":"https://api.github.com/users/caciviclab","html_url":"https://github.com/caciviclab","followers_url":"https://api.github.com/users/caciviclab/followers","following_url":"https://api.github.com/users/caciviclab/following{/other_user}","gists_url":"https://api.github.com/users/caciviclab/gists{/gist_id}","starred_url":"https://api.github.com/users/caciviclab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caciviclab/subscriptions","organizations_url":"https://api.github.com/users/caciviclab/orgs","repos_url":"https://api.github.com/users/caciviclab/repos","events_url":"https://api.github.com/users/caciviclab/events{/privacy}","received_events_url":"https://api.github.com/users/caciviclab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/caciviclab/disclosure-backend","description":"A Django app to download, extract and load campaign finance and lobbying activity data from the California Secretary of State's CAL-ACCESS database as well as local Netfile jurisdictions","fork":false,"url":"https://api.github.com/repos/caciviclab/disclosure-backend","forks_url":"https://api.github.com/repos/caciviclab/disclosure-backend/forks","keys_url":"https://api.github.com/repos/caciviclab/disclosure-backend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/caciviclab/disclosure-backend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/caciviclab/disclosure-backend/teams","hooks_url":"https://api.github.com/repos/caciviclab/disclosure-backend/hooks","issue_events_url":"https://api.github.com/repos/caciviclab/disclosure-backend/issues/events{/number}","events_url":"https://api.github.com/repos/caciviclab/disclosure-backend/events","assignees_url":"https://api.github.com/repos/caciviclab/disclosure-backend/assignees{/user}","branches_url":"https://api.github.com/repos/caciviclab/disclosure-backend/branches{/branch}","tags_url":"https://api.github.com/repos/caciviclab/disclosure-backend/tags","blobs_url":"https://api.github.com/repos/caciviclab/disclosure-backend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/caciviclab/disclosure-backend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/caciviclab/disclosure-backend/git/refs{/sha}","trees_url":"https://api.github.com/repos/caciviclab/disclosure-backend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/caciviclab/disclosure-backend/statuses/{sha}","languages_url":"https://api.github.com/repos/caciviclab/disclosure-backend/languages","stargazers_url":"https://api.github.com/repos/caciviclab/disclosure-backend/stargazers","contributors_url":"https://api.github.com/repos/caciviclab/disclosure-backend/contributors","subscribers_url":"https://api.github.com/repos/caciviclab/disclosure-backend/subscribers","subscription_url":"https://api.github.com/repos/caciviclab/disclosure-backend/subscription","commits_url":"https://api.github.com/repos/caciviclab/disclosure-backend/commits{/sha}","git_commits_url":"https://api.github.com/repos/caciviclab/disclosure-backend/git/commits{/sha}","comments_url":"https://api.github.com/repos/caciviclab/disclosure-backend/comments{/number}","issue_comment_url":"https://api.github.com/repos/caciviclab/disclosure-backend/issues/comments{/number}","contents_url":"https://api.github.com/repos/caciviclab/disclosure-backend/contents/{+path}","compare_url":"https://api.github.com/repos/caciviclab/disclosure-backend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/caciviclab/disclosure-backend/merges","archive_url":"https://api.github.com/repos/caciviclab/disclosure-backend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/caciviclab/disclosure-backend/downloads","issues_url":"https://api.github.com/repos/caciviclab/disclosure-backend/issues{/number}","pulls_url":"https://api.github.com/repos/caciviclab/disclosure-backend/pulls{/number}","milestones_url":"https://api.github.com/repos/caciviclab/disclosure-backend/milestones{/number}","notifications_url":"https://api.github.com/repos/caciviclab/disclosure-backend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/caciviclab/disclosure-backend/labels{/name}","releases_url":"https://api.github.com/repos/caciviclab/disclosure-backend/releases{/id}","created_at":"2015-05-16T18:30:44Z","updated_at":"2015-12-16T02:54:18Z","pushed_at":"2016-01-09T00:55:33Z","git_url":"git://github.com/caciviclab/disclosure-backend.git","ssh_url":"git@github.com:caciviclab/disclosure-backend.git","clone_url":"https://github.com/caciviclab/disclosure-backend.git","svn_url":"https://github.com/caciviclab/disclosure-backend","homepage":"http://admin.caciviclab.org","size":8565,"stargazers_count":5,"watchers_count":5,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":41,"forks":12,"open_issues":41,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/caciviclab/disclosure-backend/pulls/103"},"html":{"href":"https://github.com/caciviclab/disclosure-backend/pull/103"},"issue":{"href":"https://api.github.com/repos/caciviclab/disclosure-backend/issues/103"},"comments":{"href":"https://api.github.com/repos/caciviclab/disclosure-backend/issues/103/comments"},"review_comments":{"href":"https://api.github.com/repos/caciviclab/disclosure-backend/pulls/103/comments"},"review_comment":{"href":"https://api.github.com/repos/caciviclab/disclosure-backend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/caciviclab/disclosure-backend/pulls/103/commits"},"statuses":{"href":"https://api.github.com/repos/caciviclab/disclosure-backend/statuses/aa73e375a2f31178488d87cc9535b76ed1407eac"}}}}