{"action":"opened","number":42,"pull_request":{"url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/pulls/42","id":190159191,"html_url":"https://github.com/AT-PHPIntership/borrow-book/pull/42","diff_url":"https://github.com/AT-PHPIntership/borrow-book/pull/42.diff","patch_url":"https://github.com/AT-PHPIntership/borrow-book/pull/42.patch","issue_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/issues/42","number":42,"state":"open","locked":false,"title":"Get and show list post","user":{"login":"at-nale","id":37996732,"avatar_url":"https://avatars1.githubusercontent.com/u/37996732?v=4","gravatar_id":"","url":"https://api.github.com/users/at-nale","html_url":"https://github.com/at-nale","followers_url":"https://api.github.com/users/at-nale/followers","following_url":"https://api.github.com/users/at-nale/following{/other_user}","gists_url":"https://api.github.com/users/at-nale/gists{/gist_id}","starred_url":"https://api.github.com/users/at-nale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/at-nale/subscriptions","organizations_url":"https://api.github.com/users/at-nale/orgs","repos_url":"https://api.github.com/users/at-nale/repos","events_url":"https://api.github.com/users/at-nale/events{/privacy}","received_events_url":"https://api.github.com/users/at-nale/received_events","type":"User","site_admin":false},"body":"## Description\r\nGet and show list post\r\n## Reference Requirements\r\n- Task ID: #42\r\n\r\n## Reference Isuees\r\n#{issue_id}\r\n\r\n## Migrations\r\nNO\r\n\r\n## Impacted Areas in Application\r\nList general components of the application that this PR will affect:\r\n\r\n-\r\n\r\n## SQL query and `explain`\r\nList of all queries and attach the result of each explaining query (in text, screenshot...)\r\n```\r\n explain select count(*) as aggregate from `posts` left join `users` on `posts`.`user_id` = `users`.`id` left join `books` on `posts`.`book_id` = `books`.`id` where `posts`.`deleted_at` is null\\G;\r\n*************************** 1. row ***************************\r\n           id: 1\r\n  select_type: SIMPLE\r\n        table: posts\r\n   partitions: NULL\r\n         type: ALL\r\npossible_keys: NULL\r\n          key: NULL\r\n      key_len: NULL\r\n          ref: NULL\r\n         rows: 20\r\n     filtered: 10.00\r\n        Extra: Using where\r\n*************************** 2. row ***************************\r\n           id: 1\r\n  select_type: SIMPLE\r\n        table: users\r\n   partitions: NULL\r\n         type: eq_ref\r\npossible_keys: PRIMARY\r\n          key: PRIMARY\r\n      key_len: 4\r\n          ref: borrow_book.posts.user_id\r\n         rows: 1\r\n     filtered: 100.00\r\n        Extra: Using index\r\n*************************** 3. row ***************************\r\n           id: 1\r\n  select_type: SIMPLE\r\n        table: books\r\n   partitions: NULL\r\n         type: eq_ref\r\npossible_keys: PRIMARY\r\n          key: PRIMARY\r\n      key_len: 4\r\n          ref: borrow_book.posts.book_id\r\n         rows: 1\r\n     filtered: 100.00\r\n        Extra: Using index\r\n3 rows in set, 1 warning (0.00 sec)\r\n\r\n```\r\n```\r\n explain select `users`.`name`, `books`.`title`, `posts`.`post_type`, `posts`.`body`, `posts`.`rate_point`, `posts`.`status` from `posts` left join `users` on `posts`.`user_id` = `users`.`id` left join `books` on `posts`.`book_id` = `books`.`id` where `posts`.`deleted_at` is null limit 15 offset 0\\G;\r\n*************************** 1. row ***************************\r\n           id: 1\r\n  select_type: SIMPLE\r\n        table: posts\r\n   partitions: NULL\r\n         type: ALL\r\npossible_keys: NULL\r\n          key: NULL\r\n      key_len: NULL\r\n          ref: NULL\r\n         rows: 20\r\n     filtered: 10.00\r\n        Extra: Using where\r\n*************************** 2. row ***************************\r\n           id: 1\r\n  select_type: SIMPLE\r\n        table: users\r\n   partitions: NULL\r\n         type: eq_ref\r\npossible_keys: PRIMARY\r\n          key: PRIMARY\r\n      key_len: 4\r\n          ref: borrow_book.posts.user_id\r\n         rows: 1\r\n     filtered: 100.00\r\n        Extra: NULL\r\n*************************** 3. row ***************************\r\n           id: 1\r\n  select_type: SIMPLE\r\n        table: books\r\n   partitions: NULL\r\n         type: eq_ref\r\npossible_keys: PRIMARY\r\n          key: PRIMARY\r\n      key_len: 4\r\n          ref: borrow_book.posts.book_id\r\n         rows: 1\r\n     filtered: 100.00\r\n        Extra: NULL\r\n3 rows in set, 1 warning (0.00 sec)\r\n```\r\n- Refer to [Using Explain with MySQL](https://viblo.asia/p/su-dung-explain-de-toi-uu-cau-lenh-mysql-BYjv44gmvxpV)\r\n","created_at":"2018-05-24T03:18:13Z","updated_at":"2018-05-24T03:18:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/pulls/42/commits","review_comments_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/pulls/42/comments","review_comment_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/issues/42/comments","statuses_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/statuses/f47882d9a2580752b85f4daa52917f6acca87022","head":{"label":"AT-PHPIntership:get-and-show-list-post","ref":"get-and-show-list-post","sha":"f47882d9a2580752b85f4daa52917f6acca87022","user":{"login":"AT-PHPIntership","id":17865237,"avatar_url":"https://avatars1.githubusercontent.com/u/17865237?v=4","gravatar_id":"","url":"https://api.github.com/users/AT-PHPIntership","html_url":"https://github.com/AT-PHPIntership","followers_url":"https://api.github.com/users/AT-PHPIntership/followers","following_url":"https://api.github.com/users/AT-PHPIntership/following{/other_user}","gists_url":"https://api.github.com/users/AT-PHPIntership/gists{/gist_id}","starred_url":"https://api.github.com/users/AT-PHPIntership/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AT-PHPIntership/subscriptions","organizations_url":"https://api.github.com/users/AT-PHPIntership/orgs","repos_url":"https://api.github.com/users/AT-PHPIntership/repos","events_url":"https://api.github.com/users/AT-PHPIntership/events{/privacy}","received_events_url":"https://api.github.com/users/AT-PHPIntership/received_events","type":"Organization","site_admin":false},"repo":{"id":132847333,"name":"borrow-book","full_name":"AT-PHPIntership/borrow-book","owner":{"login":"AT-PHPIntership","id":17865237,"avatar_url":"https://avatars1.githubusercontent.com/u/17865237?v=4","gravatar_id":"","url":"https://api.github.com/users/AT-PHPIntership","html_url":"https://github.com/AT-PHPIntership","followers_url":"https://api.github.com/users/AT-PHPIntership/followers","following_url":"https://api.github.com/users/AT-PHPIntership/following{/other_user}","gists_url":"https://api.github.com/users/AT-PHPIntership/gists{/gist_id}","starred_url":"https://api.github.com/users/AT-PHPIntership/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AT-PHPIntership/subscriptions","organizations_url":"https://api.github.com/users/AT-PHPIntership/orgs","repos_url":"https://api.github.com/users/AT-PHPIntership/repos","events_url":"https://api.github.com/users/AT-PHPIntership/events{/privacy}","received_events_url":"https://api.github.com/users/AT-PHPIntership/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AT-PHPIntership/borrow-book","description":null,"fork":false,"url":"https://api.github.com/repos/AT-PHPIntership/borrow-book","forks_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/forks","keys_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/teams","hooks_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/hooks","issue_events_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/issues/events{/number}","events_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/events","assignees_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/assignees{/user}","branches_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/branches{/branch}","tags_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/tags","blobs_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/git/refs{/sha}","trees_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/statuses/{sha}","languages_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/languages","stargazers_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/stargazers","contributors_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/contributors","subscribers_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/subscribers","subscription_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/subscription","commits_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/commits{/sha}","git_commits_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/git/commits{/sha}","comments_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/comments{/number}","issue_comment_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/issues/comments{/number}","contents_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/contents/{+path}","compare_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/merges","archive_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/downloads","issues_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/issues{/number}","pulls_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/pulls{/number}","milestones_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/milestones{/number}","notifications_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/labels{/name}","releases_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/releases{/id}","deployments_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/deployments","created_at":"2018-05-10T04:11:00Z","updated_at":"2018-05-24T02:24:27Z","pushed_at":"2018-05-24T03:16:23Z","git_url":"git://github.com/AT-PHPIntership/borrow-book.git","ssh_url":"git@github.com:AT-PHPIntership/borrow-book.git","clone_url":"https://github.com/AT-PHPIntership/borrow-book.git","svn_url":"https://github.com/AT-PHPIntership/borrow-book","homepage":null,"size":611,"stargazers_count":0,"watchers_count":0,"language":"PHP","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":5,"license":null,"forks":0,"open_issues":5,"watchers":0,"default_branch":"master"}},"base":{"label":"AT-PHPIntership:master","ref":"master","sha":"f7a30aef6b4f8d295e2603d9dc714e824adeb6c1","user":{"login":"AT-PHPIntership","id":17865237,"avatar_url":"https://avatars1.githubusercontent.com/u/17865237?v=4","gravatar_id":"","url":"https://api.github.com/users/AT-PHPIntership","html_url":"https://github.com/AT-PHPIntership","followers_url":"https://api.github.com/users/AT-PHPIntership/followers","following_url":"https://api.github.com/users/AT-PHPIntership/following{/other_user}","gists_url":"https://api.github.com/users/AT-PHPIntership/gists{/gist_id}","starred_url":"https://api.github.com/users/AT-PHPIntership/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AT-PHPIntership/subscriptions","organizations_url":"https://api.github.com/users/AT-PHPIntership/orgs","repos_url":"https://api.github.com/users/AT-PHPIntership/repos","events_url":"https://api.github.com/users/AT-PHPIntership/events{/privacy}","received_events_url":"https://api.github.com/users/AT-PHPIntership/received_events","type":"Organization","site_admin":false},"repo":{"id":132847333,"name":"borrow-book","full_name":"AT-PHPIntership/borrow-book","owner":{"login":"AT-PHPIntership","id":17865237,"avatar_url":"https://avatars1.githubusercontent.com/u/17865237?v=4","gravatar_id":"","url":"https://api.github.com/users/AT-PHPIntership","html_url":"https://github.com/AT-PHPIntership","followers_url":"https://api.github.com/users/AT-PHPIntership/followers","following_url":"https://api.github.com/users/AT-PHPIntership/following{/other_user}","gists_url":"https://api.github.com/users/AT-PHPIntership/gists{/gist_id}","starred_url":"https://api.github.com/users/AT-PHPIntership/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AT-PHPIntership/subscriptions","organizations_url":"https://api.github.com/users/AT-PHPIntership/orgs","repos_url":"https://api.github.com/users/AT-PHPIntership/repos","events_url":"https://api.github.com/users/AT-PHPIntership/events{/privacy}","received_events_url":"https://api.github.com/users/AT-PHPIntership/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AT-PHPIntership/borrow-book","description":null,"fork":false,"url":"https://api.github.com/repos/AT-PHPIntership/borrow-book","forks_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/forks","keys_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/teams","hooks_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/hooks","issue_events_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/issues/events{/number}","events_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/events","assignees_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/assignees{/user}","branches_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/branches{/branch}","tags_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/tags","blobs_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/git/refs{/sha}","trees_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/statuses/{sha}","languages_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/languages","stargazers_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/stargazers","contributors_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/contributors","subscribers_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/subscribers","subscription_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/subscription","commits_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/commits{/sha}","git_commits_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/git/commits{/sha}","comments_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/comments{/number}","issue_comment_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/issues/comments{/number}","contents_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/contents/{+path}","compare_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/merges","archive_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/downloads","issues_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/issues{/number}","pulls_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/pulls{/number}","milestones_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/milestones{/number}","notifications_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/labels{/name}","releases_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/releases{/id}","deployments_url":"https://api.github.com/repos/AT-PHPIntership/borrow-book/deployments","created_at":"2018-05-10T04:11:00Z","updated_at":"2018-05-24T02:24:27Z","pushed_at":"2018-05-24T03:16:23Z","git_url":"git://github.com/AT-PHPIntership/borrow-book.git","ssh_url":"git@github.com:AT-PHPIntership/borrow-book.git","clone_url":"https://github.com/AT-PHPIntership/borrow-book.git","svn_url":"https://github.com/AT-PHPIntership/borrow-book","homepage":null,"size":611,"stargazers_count":0,"watchers_count":0,"language":"PHP","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":5,"license":null,"forks":0,"open_issues":5,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AT-PHPIntership/borrow-book/pulls/42"},"html":{"href":"https://github.com/AT-PHPIntership/borrow-book/pull/42"},"issue":{"href":"https://api.github.com/repos/AT-PHPIntership/borrow-book/issues/42"},"comments":{"href":"https://api.github.com/repos/AT-PHPIntership/borrow-book/issues/42/comments"},"review_comments":{"href":"https://api.github.com/repos/AT-PHPIntership/borrow-book/pulls/42/comments"},"review_comment":{"href":"https://api.github.com/repos/AT-PHPIntership/borrow-book/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AT-PHPIntership/borrow-book/pulls/42/commits"},"statuses":{"href":"https://api.github.com/repos/AT-PHPIntership/borrow-book/statuses/f47882d9a2580752b85f4daa52917f6acca87022"}},"author_association":"COLLABORATOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":2,"additions":41,"deletions":4,"changed_files":2}}
{"actor":{"display_login":"at-nale"}}