{"action":"created","comment":{"url":"https://api.github.com/repos/shunke434343/chat-space/pulls/comments/243791111","pull_request_review_id":187650860,"id":243791111,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0Mzc5MTExMQ==","diff_hunk":"@@ -1,24 +1,56 @@\n-# README\n+# DB設計\n \n-This README would normally document whatever steps are necessary to get the\n-application up and running.\n+## ①messagesテーブル\n \n-Things you may want to cover:\n+|Column|Type|Options|\n+|------|----|-------|\n+|text|text||\n+|image|text||\n+|user_id|integer|null: false, foreign_key: true|\n+|group_id|integer|null: false, foreign_key: true|\n \n-* Ruby version\n+### Association\n+- belongs_to :user\n+- belongs_to :group\n \n-* System dependencies\n \n-* Configuration\n+## ②usersテーブル\n+\n+|Column|Type|Options|\n+|------|----|-------|\n+|nickname|string|null: false, unique: true|\n+（※ deviseで実装されない機能のみ）\n+\n+### Association\n+- has_many :messages\n+- has_many :groups, through: :members\n+\n+\n+## ③membersテーブル\n+\n+|Column|Type|Options|\n+|------|----|-------|\n+|user_id|integer|null: false, foreign_key: true|\n+|group_id|integer|null: false, foreign_key: true|\n+\n+### Association\n+- belongs_to :group\n+- belongs_to :user\n+\n+\n+## ④groupsテーブル\n+\n+|Column|Type|Options|\n+|------|----|-------|\n+|group_name|string|null: false|\n+\n+### Association\n+- has_many :messages\n+- has_many :users, through: :members\n+","path":"README.md","position":57,"original_position":57,"commit_id":"9a877baee445dc216004efe42dfef10ae3d62c16","original_commit_id":"9a877baee445dc216004efe42dfef10ae3d62c16","user":{"login":"hiroki5123","id":23256513,"node_id":"MDQ6VXNlcjIzMjU2NTEz","avatar_url":"https://avatars1.githubusercontent.com/u/23256513?v=4","gravatar_id":"","url":"https://api.github.com/users/hiroki5123","html_url":"https://github.com/hiroki5123","followers_url":"https://api.github.com/users/hiroki5123/followers","following_url":"https://api.github.com/users/hiroki5123/following{/other_user}","gists_url":"https://api.github.com/users/hiroki5123/gists{/gist_id}","starred_url":"https://api.github.com/users/hiroki5123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hiroki5123/subscriptions","organizations_url":"https://api.github.com/users/hiroki5123/orgs","repos_url":"https://api.github.com/users/hiroki5123/repos","events_url":"https://api.github.com/users/hiroki5123/events{/privacy}","received_events_url":"https://api.github.com/users/hiroki5123/received_events","type":"User","site_admin":false},"body":"アソシエーションが１つ足りません","created_at":"2018-12-24T06:36:37Z","updated_at":"2018-12-24T06:36:50Z","html_url":"https://github.com/shunke434343/chat-space/pull/1#discussion_r243791111","pull_request_url":"https://api.github.com/repos/shunke434343/chat-space/pulls/1","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/shunke434343/chat-space/pulls/comments/243791111"},"html":{"href":"https://github.com/shunke434343/chat-space/pull/1#discussion_r243791111"},"pull_request":{"href":"https://api.github.com/repos/shunke434343/chat-space/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/shunke434343/chat-space/pulls/1","id":240725993,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQwNzI1OTkz","html_url":"https://github.com/shunke434343/chat-space/pull/1","diff_url":"https://github.com/shunke434343/chat-space/pull/1.diff","patch_url":"https://github.com/shunke434343/chat-space/pull/1.patch","issue_url":"https://api.github.com/repos/shunke434343/chat-space/issues/1","number":1,"state":"open","locked":false,"title":"[WIP]DB設計図作成","user":{"login":"shunke434343","id":46064552,"node_id":"MDQ6VXNlcjQ2MDY0NTUy","avatar_url":"https://avatars0.githubusercontent.com/u/46064552?v=4","gravatar_id":"","url":"https://api.github.com/users/shunke434343","html_url":"https://github.com/shunke434343","followers_url":"https://api.github.com/users/shunke434343/followers","following_url":"https://api.github.com/users/shunke434343/following{/other_user}","gists_url":"https://api.github.com/users/shunke434343/gists{/gist_id}","starred_url":"https://api.github.com/users/shunke434343/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shunke434343/subscriptions","organizations_url":"https://api.github.com/users/shunke434343/orgs","repos_url":"https://api.github.com/users/shunke434343/repos","events_url":"https://api.github.com/users/shunke434343/events{/privacy}","received_events_url":"https://api.github.com/users/shunke434343/received_events","type":"User","site_admin":false},"body":"#WHAT\nREADME.mdにてDB設計図を作成\n①massagesテーブル概要\n②usersテーブル概要\n③membersテーブル概要\n④groupsテーブル概要\n\n#WHY\nChat Spaces作成にあたり、DBの構造を事前に確定するため。","created_at":"2018-12-24T06:17:29Z","updated_at":"2018-12-24T06:36:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b0ba1b4fbf171da916a0e0ff9b80c6205481a1a7","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/shunke434343/chat-space/pulls/1/commits","review_comments_url":"https://api.github.com/repos/shunke434343/chat-space/pulls/1/comments","review_comment_url":"https://api.github.com/repos/shunke434343/chat-space/pulls/comments{/number}","comments_url":"https://api.github.com/repos/shunke434343/chat-space/issues/1/comments","statuses_url":"https://api.github.com/repos/shunke434343/chat-space/statuses/9a877baee445dc216004efe42dfef10ae3d62c16","head":{"label":"shunke434343:readme","ref":"readme","sha":"9a877baee445dc216004efe42dfef10ae3d62c16","user":{"login":"shunke434343","id":46064552,"node_id":"MDQ6VXNlcjQ2MDY0NTUy","avatar_url":"https://avatars0.githubusercontent.com/u/46064552?v=4","gravatar_id":"","url":"https://api.github.com/users/shunke434343","html_url":"https://github.com/shunke434343","followers_url":"https://api.github.com/users/shunke434343/followers","following_url":"https://api.github.com/users/shunke434343/following{/other_user}","gists_url":"https://api.github.com/users/shunke434343/gists{/gist_id}","starred_url":"https://api.github.com/users/shunke434343/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shunke434343/subscriptions","organizations_url":"https://api.github.com/users/shunke434343/orgs","repos_url":"https://api.github.com/users/shunke434343/repos","events_url":"https://api.github.com/users/shunke434343/events{/privacy}","received_events_url":"https://api.github.com/users/shunke434343/received_events","type":"User","site_admin":false},"repo":{"id":162949622,"node_id":"MDEwOlJlcG9zaXRvcnkxNjI5NDk2MjI=","name":"chat-space","full_name":"shunke434343/chat-space","private":false,"owner":{"login":"shunke434343","id":46064552,"node_id":"MDQ6VXNlcjQ2MDY0NTUy","avatar_url":"https://avatars0.githubusercontent.com/u/46064552?v=4","gravatar_id":"","url":"https://api.github.com/users/shunke434343","html_url":"https://github.com/shunke434343","followers_url":"https://api.github.com/users/shunke434343/followers","following_url":"https://api.github.com/users/shunke434343/following{/other_user}","gists_url":"https://api.github.com/users/shunke434343/gists{/gist_id}","starred_url":"https://api.github.com/users/shunke434343/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shunke434343/subscriptions","organizations_url":"https://api.github.com/users/shunke434343/orgs","repos_url":"https://api.github.com/users/shunke434343/repos","events_url":"https://api.github.com/users/shunke434343/events{/privacy}","received_events_url":"https://api.github.com/users/shunke434343/received_events","type":"User","site_admin":false},"html_url":"https://github.com/shunke434343/chat-space","description":null,"fork":false,"url":"https://api.github.com/repos/shunke434343/chat-space","forks_url":"https://api.github.com/repos/shunke434343/chat-space/forks","keys_url":"https://api.github.com/repos/shunke434343/chat-space/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shunke434343/chat-space/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shunke434343/chat-space/teams","hooks_url":"https://api.github.com/repos/shunke434343/chat-space/hooks","issue_events_url":"https://api.github.com/repos/shunke434343/chat-space/issues/events{/number}","events_url":"https://api.github.com/repos/shunke434343/chat-space/events","assignees_url":"https://api.github.com/repos/shunke434343/chat-space/assignees{/user}","branches_url":"https://api.github.com/repos/shunke434343/chat-space/branches{/branch}","tags_url":"https://api.github.com/repos/shunke434343/chat-space/tags","blobs_url":"https://api.github.com/repos/shunke434343/chat-space/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shunke434343/chat-space/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shunke434343/chat-space/git/refs{/sha}","trees_url":"https://api.github.com/repos/shunke434343/chat-space/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shunke434343/chat-space/statuses/{sha}","languages_url":"https://api.github.com/repos/shunke434343/chat-space/languages","stargazers_url":"https://api.github.com/repos/shunke434343/chat-space/stargazers","contributors_url":"https://api.github.com/repos/shunke434343/chat-space/contributors","subscribers_url":"https://api.github.com/repos/shunke434343/chat-space/subscribers","subscription_url":"https://api.github.com/repos/shunke434343/chat-space/subscription","commits_url":"https://api.github.com/repos/shunke434343/chat-space/commits{/sha}","git_commits_url":"https://api.github.com/repos/shunke434343/chat-space/git/commits{/sha}","comments_url":"https://api.github.com/repos/shunke434343/chat-space/comments{/number}","issue_comment_url":"https://api.github.com/repos/shunke434343/chat-space/issues/comments{/number}","contents_url":"https://api.github.com/repos/shunke434343/chat-space/contents/{+path}","compare_url":"https://api.github.com/repos/shunke434343/chat-space/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shunke434343/chat-space/merges","archive_url":"https://api.github.com/repos/shunke434343/chat-space/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shunke434343/chat-space/downloads","issues_url":"https://api.github.com/repos/shunke434343/chat-space/issues{/number}","pulls_url":"https://api.github.com/repos/shunke434343/chat-space/pulls{/number}","milestones_url":"https://api.github.com/repos/shunke434343/chat-space/milestones{/number}","notifications_url":"https://api.github.com/repos/shunke434343/chat-space/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shunke434343/chat-space/labels{/name}","releases_url":"https://api.github.com/repos/shunke434343/chat-space/releases{/id}","deployments_url":"https://api.github.com/repos/shunke434343/chat-space/deployments","created_at":"2018-12-24T04:24:31Z","updated_at":"2018-12-24T04:24:45Z","pushed_at":"2018-12-24T06:17:29Z","git_url":"git://github.com/shunke434343/chat-space.git","ssh_url":"git@github.com:shunke434343/chat-space.git","clone_url":"https://github.com/shunke434343/chat-space.git","svn_url":"https://github.com/shunke434343/chat-space","homepage":null,"size":20,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"shunke434343:master","ref":"master","sha":"91362c3c310e7eba40d968513296bec23ee09ad6","user":{"login":"shunke434343","id":46064552,"node_id":"MDQ6VXNlcjQ2MDY0NTUy","avatar_url":"https://avatars0.githubusercontent.com/u/46064552?v=4","gravatar_id":"","url":"https://api.github.com/users/shunke434343","html_url":"https://github.com/shunke434343","followers_url":"https://api.github.com/users/shunke434343/followers","following_url":"https://api.github.com/users/shunke434343/following{/other_user}","gists_url":"https://api.github.com/users/shunke434343/gists{/gist_id}","starred_url":"https://api.github.com/users/shunke434343/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shunke434343/subscriptions","organizations_url":"https://api.github.com/users/shunke434343/orgs","repos_url":"https://api.github.com/users/shunke434343/repos","events_url":"https://api.github.com/users/shunke434343/events{/privacy}","received_events_url":"https://api.github.com/users/shunke434343/received_events","type":"User","site_admin":false},"repo":{"id":162949622,"node_id":"MDEwOlJlcG9zaXRvcnkxNjI5NDk2MjI=","name":"chat-space","full_name":"shunke434343/chat-space","private":false,"owner":{"login":"shunke434343","id":46064552,"node_id":"MDQ6VXNlcjQ2MDY0NTUy","avatar_url":"https://avatars0.githubusercontent.com/u/46064552?v=4","gravatar_id":"","url":"https://api.github.com/users/shunke434343","html_url":"https://github.com/shunke434343","followers_url":"https://api.github.com/users/shunke434343/followers","following_url":"https://api.github.com/users/shunke434343/following{/other_user}","gists_url":"https://api.github.com/users/shunke434343/gists{/gist_id}","starred_url":"https://api.github.com/users/shunke434343/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shunke434343/subscriptions","organizations_url":"https://api.github.com/users/shunke434343/orgs","repos_url":"https://api.github.com/users/shunke434343/repos","events_url":"https://api.github.com/users/shunke434343/events{/privacy}","received_events_url":"https://api.github.com/users/shunke434343/received_events","type":"User","site_admin":false},"html_url":"https://github.com/shunke434343/chat-space","description":null,"fork":false,"url":"https://api.github.com/repos/shunke434343/chat-space","forks_url":"https://api.github.com/repos/shunke434343/chat-space/forks","keys_url":"https://api.github.com/repos/shunke434343/chat-space/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shunke434343/chat-space/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shunke434343/chat-space/teams","hooks_url":"https://api.github.com/repos/shunke434343/chat-space/hooks","issue_events_url":"https://api.github.com/repos/shunke434343/chat-space/issues/events{/number}","events_url":"https://api.github.com/repos/shunke434343/chat-space/events","assignees_url":"https://api.github.com/repos/shunke434343/chat-space/assignees{/user}","branches_url":"https://api.github.com/repos/shunke434343/chat-space/branches{/branch}","tags_url":"https://api.github.com/repos/shunke434343/chat-space/tags","blobs_url":"https://api.github.com/repos/shunke434343/chat-space/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shunke434343/chat-space/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shunke434343/chat-space/git/refs{/sha}","trees_url":"https://api.github.com/repos/shunke434343/chat-space/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shunke434343/chat-space/statuses/{sha}","languages_url":"https://api.github.com/repos/shunke434343/chat-space/languages","stargazers_url":"https://api.github.com/repos/shunke434343/chat-space/stargazers","contributors_url":"https://api.github.com/repos/shunke434343/chat-space/contributors","subscribers_url":"https://api.github.com/repos/shunke434343/chat-space/subscribers","subscription_url":"https://api.github.com/repos/shunke434343/chat-space/subscription","commits_url":"https://api.github.com/repos/shunke434343/chat-space/commits{/sha}","git_commits_url":"https://api.github.com/repos/shunke434343/chat-space/git/commits{/sha}","comments_url":"https://api.github.com/repos/shunke434343/chat-space/comments{/number}","issue_comment_url":"https://api.github.com/repos/shunke434343/chat-space/issues/comments{/number}","contents_url":"https://api.github.com/repos/shunke434343/chat-space/contents/{+path}","compare_url":"https://api.github.com/repos/shunke434343/chat-space/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shunke434343/chat-space/merges","archive_url":"https://api.github.com/repos/shunke434343/chat-space/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shunke434343/chat-space/downloads","issues_url":"https://api.github.com/repos/shunke434343/chat-space/issues{/number}","pulls_url":"https://api.github.com/repos/shunke434343/chat-space/pulls{/number}","milestones_url":"https://api.github.com/repos/shunke434343/chat-space/milestones{/number}","notifications_url":"https://api.github.com/repos/shunke434343/chat-space/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shunke434343/chat-space/labels{/name}","releases_url":"https://api.github.com/repos/shunke434343/chat-space/releases{/id}","deployments_url":"https://api.github.com/repos/shunke434343/chat-space/deployments","created_at":"2018-12-24T04:24:31Z","updated_at":"2018-12-24T04:24:45Z","pushed_at":"2018-12-24T06:17:29Z","git_url":"git://github.com/shunke434343/chat-space.git","ssh_url":"git@github.com:shunke434343/chat-space.git","clone_url":"https://github.com/shunke434343/chat-space.git","svn_url":"https://github.com/shunke434343/chat-space","homepage":null,"size":20,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/shunke434343/chat-space/pulls/1"},"html":{"href":"https://github.com/shunke434343/chat-space/pull/1"},"issue":{"href":"https://api.github.com/repos/shunke434343/chat-space/issues/1"},"comments":{"href":"https://api.github.com/repos/shunke434343/chat-space/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/shunke434343/chat-space/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/shunke434343/chat-space/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/shunke434343/chat-space/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/shunke434343/chat-space/statuses/9a877baee445dc216004efe42dfef10ae3d62c16"}},"author_association":"OWNER"}}
{"actor":{"display_login":"hiroki5123"}}