{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/hotel-management/pulls/comments/211914950","pull_request_review_id":148433865,"id":211914950,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMTkxNDk1MA==","diff_hunk":"@@ -7,6 +7,10 @@ class User < ApplicationRecord\n   has_many :ratings, dependent: :destroy\n   has_secure_password\n   scope :by_role, ->(role){where role: role}\n+  scope :get_notifications, ->(user_id){select(\"notifications.content, notifications.created_at\")","path":"app/models/user.rb","position":4,"original_position":4,"commit_id":"ea720480bbd34f00ebb3189a0e63165a7fd71331","original_commit_id":"ea720480bbd34f00ebb3189a0e63165a7fd71331","user":{"login":"devtuananh","id":34335356,"node_id":"MDQ6VXNlcjM0MzM1MzU2","avatar_url":"https://avatars2.githubusercontent.com/u/34335356?v=4","gravatar_id":"","url":"https://api.github.com/users/devtuananh","html_url":"https://github.com/devtuananh","followers_url":"https://api.github.com/users/devtuananh/followers","following_url":"https://api.github.com/users/devtuananh/following{/other_user}","gists_url":"https://api.github.com/users/devtuananh/gists{/gist_id}","starred_url":"https://api.github.com/users/devtuananh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devtuananh/subscriptions","organizations_url":"https://api.github.com/users/devtuananh/orgs","repos_url":"https://api.github.com/users/devtuananh/repos","events_url":"https://api.github.com/users/devtuananh/events{/privacy}","received_events_url":"https://api.github.com/users/devtuananh/received_events","type":"User","site_admin":false},"body":"Giờ em đang để nó k có quan hệ nào ạ. Khi gửi thông báo sẽ lưu id staff (người gửi) và customer_id (người nhận), dòng nè e lấy thông báo của customer theo customer_id ạ.","created_at":"2018-08-22T11:08:36Z","updated_at":"2018-08-22T11:08:36Z","html_url":"https://github.com/framgia/hotel-management/pull/26#discussion_r211914950","pull_request_url":"https://api.github.com/repos/framgia/hotel-management/pulls/26","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/framgia/hotel-management/pulls/comments/211914950"},"html":{"href":"https://github.com/framgia/hotel-management/pull/26#discussion_r211914950"},"pull_request":{"href":"https://api.github.com/repos/framgia/hotel-management/pulls/26"}},"in_reply_to_id":211906573},"pull_request":{"url":"https://api.github.com/repos/framgia/hotel-management/pulls/26","id":209106902,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA5MTA2OTAy","html_url":"https://github.com/framgia/hotel-management/pull/26","diff_url":"https://github.com/framgia/hotel-management/pull/26.diff","patch_url":"https://github.com/framgia/hotel-management/pull/26.patch","issue_url":"https://api.github.com/repos/framgia/hotel-management/issues/26","number":26,"state":"open","locked":false,"title":"Staff manage request service","user":{"login":"devtuananh","id":34335356,"node_id":"MDQ6VXNlcjM0MzM1MzU2","avatar_url":"https://avatars2.githubusercontent.com/u/34335356?v=4","gravatar_id":"","url":"https://api.github.com/users/devtuananh","html_url":"https://github.com/devtuananh","followers_url":"https://api.github.com/users/devtuananh/followers","following_url":"https://api.github.com/users/devtuananh/following{/other_user}","gists_url":"https://api.github.com/users/devtuananh/gists{/gist_id}","starred_url":"https://api.github.com/users/devtuananh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devtuananh/subscriptions","organizations_url":"https://api.github.com/users/devtuananh/orgs","repos_url":"https://api.github.com/users/devtuananh/repos","events_url":"https://api.github.com/users/devtuananh/events{/privacy}","received_events_url":"https://api.github.com/users/devtuananh/received_events","type":"User","site_admin":false},"body":"https://dev.framgia.com/issues/184393","created_at":"2018-08-17T10:25:14Z","updated_at":"2018-08-22T11:08:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"306da2d8679591166beb5c551e20122105a9aa44","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/framgia/hotel-management/pulls/26/commits","review_comments_url":"https://api.github.com/repos/framgia/hotel-management/pulls/26/comments","review_comment_url":"https://api.github.com/repos/framgia/hotel-management/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/hotel-management/issues/26/comments","statuses_url":"https://api.github.com/repos/framgia/hotel-management/statuses/ea720480bbd34f00ebb3189a0e63165a7fd71331","head":{"label":"devtuananh:staff-manage-request","ref":"staff-manage-request","sha":"ea720480bbd34f00ebb3189a0e63165a7fd71331","user":{"login":"devtuananh","id":34335356,"node_id":"MDQ6VXNlcjM0MzM1MzU2","avatar_url":"https://avatars2.githubusercontent.com/u/34335356?v=4","gravatar_id":"","url":"https://api.github.com/users/devtuananh","html_url":"https://github.com/devtuananh","followers_url":"https://api.github.com/users/devtuananh/followers","following_url":"https://api.github.com/users/devtuananh/following{/other_user}","gists_url":"https://api.github.com/users/devtuananh/gists{/gist_id}","starred_url":"https://api.github.com/users/devtuananh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devtuananh/subscriptions","organizations_url":"https://api.github.com/users/devtuananh/orgs","repos_url":"https://api.github.com/users/devtuananh/repos","events_url":"https://api.github.com/users/devtuananh/events{/privacy}","received_events_url":"https://api.github.com/users/devtuananh/received_events","type":"User","site_admin":false},"repo":{"id":142135877,"node_id":"MDEwOlJlcG9zaXRvcnkxNDIxMzU4Nzc=","name":"hotel-management","full_name":"devtuananh/hotel-management","owner":{"login":"devtuananh","id":34335356,"node_id":"MDQ6VXNlcjM0MzM1MzU2","avatar_url":"https://avatars2.githubusercontent.com/u/34335356?v=4","gravatar_id":"","url":"https://api.github.com/users/devtuananh","html_url":"https://github.com/devtuananh","followers_url":"https://api.github.com/users/devtuananh/followers","following_url":"https://api.github.com/users/devtuananh/following{/other_user}","gists_url":"https://api.github.com/users/devtuananh/gists{/gist_id}","starred_url":"https://api.github.com/users/devtuananh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devtuananh/subscriptions","organizations_url":"https://api.github.com/users/devtuananh/orgs","repos_url":"https://api.github.com/users/devtuananh/repos","events_url":"https://api.github.com/users/devtuananh/events{/privacy}","received_events_url":"https://api.github.com/users/devtuananh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/devtuananh/hotel-management","description":null,"fork":true,"url":"https://api.github.com/repos/devtuananh/hotel-management","forks_url":"https://api.github.com/repos/devtuananh/hotel-management/forks","keys_url":"https://api.github.com/repos/devtuananh/hotel-management/keys{/key_id}","collaborators_url":"https://api.github.com/repos/devtuananh/hotel-management/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/devtuananh/hotel-management/teams","hooks_url":"https://api.github.com/repos/devtuananh/hotel-management/hooks","issue_events_url":"https://api.github.com/repos/devtuananh/hotel-management/issues/events{/number}","events_url":"https://api.github.com/repos/devtuananh/hotel-management/events","assignees_url":"https://api.github.com/repos/devtuananh/hotel-management/assignees{/user}","branches_url":"https://api.github.com/repos/devtuananh/hotel-management/branches{/branch}","tags_url":"https://api.github.com/repos/devtuananh/hotel-management/tags","blobs_url":"https://api.github.com/repos/devtuananh/hotel-management/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/devtuananh/hotel-management/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/devtuananh/hotel-management/git/refs{/sha}","trees_url":"https://api.github.com/repos/devtuananh/hotel-management/git/trees{/sha}","statuses_url":"https://api.github.com/repos/devtuananh/hotel-management/statuses/{sha}","languages_url":"https://api.github.com/repos/devtuananh/hotel-management/languages","stargazers_url":"https://api.github.com/repos/devtuananh/hotel-management/stargazers","contributors_url":"https://api.github.com/repos/devtuananh/hotel-management/contributors","subscribers_url":"https://api.github.com/repos/devtuananh/hotel-management/subscribers","subscription_url":"https://api.github.com/repos/devtuananh/hotel-management/subscription","commits_url":"https://api.github.com/repos/devtuananh/hotel-management/commits{/sha}","git_commits_url":"https://api.github.com/repos/devtuananh/hotel-management/git/commits{/sha}","comments_url":"https://api.github.com/repos/devtuananh/hotel-management/comments{/number}","issue_comment_url":"https://api.github.com/repos/devtuananh/hotel-management/issues/comments{/number}","contents_url":"https://api.github.com/repos/devtuananh/hotel-management/contents/{+path}","compare_url":"https://api.github.com/repos/devtuananh/hotel-management/compare/{base}...{head}","merges_url":"https://api.github.com/repos/devtuananh/hotel-management/merges","archive_url":"https://api.github.com/repos/devtuananh/hotel-management/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/devtuananh/hotel-management/downloads","issues_url":"https://api.github.com/repos/devtuananh/hotel-management/issues{/number}","pulls_url":"https://api.github.com/repos/devtuananh/hotel-management/pulls{/number}","milestones_url":"https://api.github.com/repos/devtuananh/hotel-management/milestones{/number}","notifications_url":"https://api.github.com/repos/devtuananh/hotel-management/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/devtuananh/hotel-management/labels{/name}","releases_url":"https://api.github.com/repos/devtuananh/hotel-management/releases{/id}","deployments_url":"https://api.github.com/repos/devtuananh/hotel-management/deployments","created_at":"2018-07-24T09:25:52Z","updated_at":"2018-07-24T09:25:54Z","pushed_at":"2018-08-20T05:43:20Z","git_url":"git://github.com/devtuananh/hotel-management.git","ssh_url":"git@github.com:devtuananh/hotel-management.git","clone_url":"https://github.com/devtuananh/hotel-management.git","svn_url":"https://github.com/devtuananh/hotel-management","homepage":null,"size":667,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"framgia:master","ref":"master","sha":"0864ab737012380ede2530873df057f3dca9e685","user":{"login":"framgia","id":2322183,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMjIxODM=","avatar_url":"https://avatars3.githubusercontent.com/u/2322183?v=4","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"repo":{"id":142127111,"node_id":"MDEwOlJlcG9zaXRvcnkxNDIxMjcxMTE=","name":"hotel-management","full_name":"framgia/hotel-management","owner":{"login":"framgia","id":2322183,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMjIxODM=","avatar_url":"https://avatars3.githubusercontent.com/u/2322183?v=4","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/framgia/hotel-management","description":null,"fork":false,"url":"https://api.github.com/repos/framgia/hotel-management","forks_url":"https://api.github.com/repos/framgia/hotel-management/forks","keys_url":"https://api.github.com/repos/framgia/hotel-management/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/hotel-management/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/hotel-management/teams","hooks_url":"https://api.github.com/repos/framgia/hotel-management/hooks","issue_events_url":"https://api.github.com/repos/framgia/hotel-management/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/hotel-management/events","assignees_url":"https://api.github.com/repos/framgia/hotel-management/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/hotel-management/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/hotel-management/tags","blobs_url":"https://api.github.com/repos/framgia/hotel-management/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/hotel-management/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/hotel-management/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/hotel-management/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/hotel-management/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/hotel-management/languages","stargazers_url":"https://api.github.com/repos/framgia/hotel-management/stargazers","contributors_url":"https://api.github.com/repos/framgia/hotel-management/contributors","subscribers_url":"https://api.github.com/repos/framgia/hotel-management/subscribers","subscription_url":"https://api.github.com/repos/framgia/hotel-management/subscription","commits_url":"https://api.github.com/repos/framgia/hotel-management/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/hotel-management/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/hotel-management/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/hotel-management/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/hotel-management/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/hotel-management/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/hotel-management/merges","archive_url":"https://api.github.com/repos/framgia/hotel-management/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/hotel-management/downloads","issues_url":"https://api.github.com/repos/framgia/hotel-management/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/hotel-management/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/hotel-management/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/hotel-management/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/hotel-management/labels{/name}","releases_url":"https://api.github.com/repos/framgia/hotel-management/releases{/id}","deployments_url":"https://api.github.com/repos/framgia/hotel-management/deployments","created_at":"2018-07-24T08:15:28Z","updated_at":"2018-08-20T02:25:51Z","pushed_at":"2018-08-20T07:03:13Z","git_url":"git://github.com/framgia/hotel-management.git","ssh_url":"git@github.com:framgia/hotel-management.git","clone_url":"https://github.com/framgia/hotel-management.git","svn_url":"https://github.com/framgia/hotel-management","homepage":null,"size":657,"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":3,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":3,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/hotel-management/pulls/26"},"html":{"href":"https://github.com/framgia/hotel-management/pull/26"},"issue":{"href":"https://api.github.com/repos/framgia/hotel-management/issues/26"},"comments":{"href":"https://api.github.com/repos/framgia/hotel-management/issues/26/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/hotel-management/pulls/26/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/hotel-management/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/hotel-management/pulls/26/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/hotel-management/statuses/ea720480bbd34f00ebb3189a0e63165a7fd71331"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"devtuananh"}}