{"action":"created","comment":{"url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/pulls/comments/233762909","pull_request_review_id":175247522,"id":233762909,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMzc2MjkwOQ==","diff_hunk":"@@ -0,0 +1,28 @@\n+class Deal < ApplicationRecord\n+\n+  # Validations\n+  validates :title, presence: true, uniqueness: { case_sensitive: false }\n+  validates :minimum_purchases_required, numericality: { greater_than_or_equal_to: 0 }\n+  validates :maximum_purchases_allowed, numericality: { greater_than: :minimum_purchases_required }\n+  validates :start_time, :expire_time, :price, presence: true\n+  validates :price, numericality: { greater_than_or_equal_to: 0.01 }, allow_nil: true\n+  validates :maximum_purchases_per_customer, numericality: { greater_than_or_equal_to: 0 }\n+  validates :maximum_purchases_per_customer, numericality: { less_than_or_equal_to: :maximum_purchases_allowed }","path":"app/models/deal.rb","position":10,"original_position":10,"commit_id":"b2ebc1536f0e50aef8e17a8889f9d79bc023a178","original_commit_id":"b2ebc1536f0e50aef8e17a8889f9d79bc023a178","user":{"login":"sawangupta92","id":4730794,"node_id":"MDQ6VXNlcjQ3MzA3OTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/4730794?v=4","gravatar_id":"","url":"https://api.github.com/users/sawangupta92","html_url":"https://github.com/sawangupta92","followers_url":"https://api.github.com/users/sawangupta92/followers","following_url":"https://api.github.com/users/sawangupta92/following{/other_user}","gists_url":"https://api.github.com/users/sawangupta92/gists{/gist_id}","starred_url":"https://api.github.com/users/sawangupta92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sawangupta92/subscriptions","organizations_url":"https://api.github.com/users/sawangupta92/orgs","repos_url":"https://api.github.com/users/sawangupta92/repos","events_url":"https://api.github.com/users/sawangupta92/events{/privacy}","received_events_url":"https://api.github.com/users/sawangupta92/received_events","type":"User","site_admin":false},"body":"why is it needed?\r\n","created_at":"2018-11-15T09:16:08Z","updated_at":"2018-11-15T09:18:44Z","html_url":"https://github.com/rajneesh-vinsol/groupon-projects/pull/8#discussion_r233762909","pull_request_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/pulls/8","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/pulls/comments/233762909"},"html":{"href":"https://github.com/rajneesh-vinsol/groupon-projects/pull/8#discussion_r233762909"},"pull_request":{"href":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/pulls/8","id":231103417,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMxMTAzNDE3","html_url":"https://github.com/rajneesh-vinsol/groupon-projects/pull/8","diff_url":"https://github.com/rajneesh-vinsol/groupon-projects/pull/8.diff","patch_url":"https://github.com/rajneesh-vinsol/groupon-projects/pull/8.patch","issue_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/issues/8","number":8,"state":"open","locked":false,"title":"add deals model and crud","user":{"login":"rajneesh-vinsol","id":41813980,"node_id":"MDQ6VXNlcjQxODEzOTgw","avatar_url":"https://avatars1.githubusercontent.com/u/41813980?v=4","gravatar_id":"","url":"https://api.github.com/users/rajneesh-vinsol","html_url":"https://github.com/rajneesh-vinsol","followers_url":"https://api.github.com/users/rajneesh-vinsol/followers","following_url":"https://api.github.com/users/rajneesh-vinsol/following{/other_user}","gists_url":"https://api.github.com/users/rajneesh-vinsol/gists{/gist_id}","starred_url":"https://api.github.com/users/rajneesh-vinsol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rajneesh-vinsol/subscriptions","organizations_url":"https://api.github.com/users/rajneesh-vinsol/orgs","repos_url":"https://api.github.com/users/rajneesh-vinsol/repos","events_url":"https://api.github.com/users/rajneesh-vinsol/events{/privacy}","received_events_url":"https://api.github.com/users/rajneesh-vinsol/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-11-15T08:13:33Z","updated_at":"2018-11-15T09:18:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5311d58e22cdb7ae67d54c6feab818acd3df62c6","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/pulls/8/commits","review_comments_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/pulls/8/comments","review_comment_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/issues/8/comments","statuses_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/statuses/b2ebc1536f0e50aef8e17a8889f9d79bc023a178","head":{"label":"rajneesh-vinsol:deals-crud","ref":"deals-crud","sha":"b2ebc1536f0e50aef8e17a8889f9d79bc023a178","user":{"login":"rajneesh-vinsol","id":41813980,"node_id":"MDQ6VXNlcjQxODEzOTgw","avatar_url":"https://avatars1.githubusercontent.com/u/41813980?v=4","gravatar_id":"","url":"https://api.github.com/users/rajneesh-vinsol","html_url":"https://github.com/rajneesh-vinsol","followers_url":"https://api.github.com/users/rajneesh-vinsol/followers","following_url":"https://api.github.com/users/rajneesh-vinsol/following{/other_user}","gists_url":"https://api.github.com/users/rajneesh-vinsol/gists{/gist_id}","starred_url":"https://api.github.com/users/rajneesh-vinsol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rajneesh-vinsol/subscriptions","organizations_url":"https://api.github.com/users/rajneesh-vinsol/orgs","repos_url":"https://api.github.com/users/rajneesh-vinsol/repos","events_url":"https://api.github.com/users/rajneesh-vinsol/events{/privacy}","received_events_url":"https://api.github.com/users/rajneesh-vinsol/received_events","type":"User","site_admin":false},"repo":{"id":155187064,"node_id":"MDEwOlJlcG9zaXRvcnkxNTUxODcwNjQ=","name":"groupon-projects","full_name":"rajneesh-vinsol/groupon-projects","private":false,"owner":{"login":"rajneesh-vinsol","id":41813980,"node_id":"MDQ6VXNlcjQxODEzOTgw","avatar_url":"https://avatars1.githubusercontent.com/u/41813980?v=4","gravatar_id":"","url":"https://api.github.com/users/rajneesh-vinsol","html_url":"https://github.com/rajneesh-vinsol","followers_url":"https://api.github.com/users/rajneesh-vinsol/followers","following_url":"https://api.github.com/users/rajneesh-vinsol/following{/other_user}","gists_url":"https://api.github.com/users/rajneesh-vinsol/gists{/gist_id}","starred_url":"https://api.github.com/users/rajneesh-vinsol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rajneesh-vinsol/subscriptions","organizations_url":"https://api.github.com/users/rajneesh-vinsol/orgs","repos_url":"https://api.github.com/users/rajneesh-vinsol/repos","events_url":"https://api.github.com/users/rajneesh-vinsol/events{/privacy}","received_events_url":"https://api.github.com/users/rajneesh-vinsol/received_events","type":"User","site_admin":false},"html_url":"https://github.com/rajneesh-vinsol/groupon-projects","description":null,"fork":false,"url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects","forks_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/forks","keys_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/teams","hooks_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/hooks","issue_events_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/issues/events{/number}","events_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/events","assignees_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/assignees{/user}","branches_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/branches{/branch}","tags_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/tags","blobs_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/git/refs{/sha}","trees_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/statuses/{sha}","languages_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/languages","stargazers_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/stargazers","contributors_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/contributors","subscribers_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/subscribers","subscription_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/subscription","commits_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/commits{/sha}","git_commits_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/git/commits{/sha}","comments_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/comments{/number}","issue_comment_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/issues/comments{/number}","contents_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/contents/{+path}","compare_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/merges","archive_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/downloads","issues_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/issues{/number}","pulls_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/pulls{/number}","milestones_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/milestones{/number}","notifications_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/labels{/name}","releases_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/releases{/id}","deployments_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/deployments","created_at":"2018-10-29T09:42:31Z","updated_at":"2018-11-13T13:18:53Z","pushed_at":"2018-11-15T08:21:49Z","git_url":"git://github.com/rajneesh-vinsol/groupon-projects.git","ssh_url":"git@github.com:rajneesh-vinsol/groupon-projects.git","clone_url":"https://github.com/rajneesh-vinsol/groupon-projects.git","svn_url":"https://github.com/rajneesh-vinsol/groupon-projects","homepage":null,"size":203,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"rajneesh-vinsol:f-admin","ref":"f-admin","sha":"983e5666fb62c40b0ec0547b53bba5a5882b3c65","user":{"login":"rajneesh-vinsol","id":41813980,"node_id":"MDQ6VXNlcjQxODEzOTgw","avatar_url":"https://avatars1.githubusercontent.com/u/41813980?v=4","gravatar_id":"","url":"https://api.github.com/users/rajneesh-vinsol","html_url":"https://github.com/rajneesh-vinsol","followers_url":"https://api.github.com/users/rajneesh-vinsol/followers","following_url":"https://api.github.com/users/rajneesh-vinsol/following{/other_user}","gists_url":"https://api.github.com/users/rajneesh-vinsol/gists{/gist_id}","starred_url":"https://api.github.com/users/rajneesh-vinsol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rajneesh-vinsol/subscriptions","organizations_url":"https://api.github.com/users/rajneesh-vinsol/orgs","repos_url":"https://api.github.com/users/rajneesh-vinsol/repos","events_url":"https://api.github.com/users/rajneesh-vinsol/events{/privacy}","received_events_url":"https://api.github.com/users/rajneesh-vinsol/received_events","type":"User","site_admin":false},"repo":{"id":155187064,"node_id":"MDEwOlJlcG9zaXRvcnkxNTUxODcwNjQ=","name":"groupon-projects","full_name":"rajneesh-vinsol/groupon-projects","private":false,"owner":{"login":"rajneesh-vinsol","id":41813980,"node_id":"MDQ6VXNlcjQxODEzOTgw","avatar_url":"https://avatars1.githubusercontent.com/u/41813980?v=4","gravatar_id":"","url":"https://api.github.com/users/rajneesh-vinsol","html_url":"https://github.com/rajneesh-vinsol","followers_url":"https://api.github.com/users/rajneesh-vinsol/followers","following_url":"https://api.github.com/users/rajneesh-vinsol/following{/other_user}","gists_url":"https://api.github.com/users/rajneesh-vinsol/gists{/gist_id}","starred_url":"https://api.github.com/users/rajneesh-vinsol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rajneesh-vinsol/subscriptions","organizations_url":"https://api.github.com/users/rajneesh-vinsol/orgs","repos_url":"https://api.github.com/users/rajneesh-vinsol/repos","events_url":"https://api.github.com/users/rajneesh-vinsol/events{/privacy}","received_events_url":"https://api.github.com/users/rajneesh-vinsol/received_events","type":"User","site_admin":false},"html_url":"https://github.com/rajneesh-vinsol/groupon-projects","description":null,"fork":false,"url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects","forks_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/forks","keys_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/teams","hooks_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/hooks","issue_events_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/issues/events{/number}","events_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/events","assignees_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/assignees{/user}","branches_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/branches{/branch}","tags_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/tags","blobs_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/git/refs{/sha}","trees_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/statuses/{sha}","languages_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/languages","stargazers_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/stargazers","contributors_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/contributors","subscribers_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/subscribers","subscription_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/subscription","commits_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/commits{/sha}","git_commits_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/git/commits{/sha}","comments_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/comments{/number}","issue_comment_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/issues/comments{/number}","contents_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/contents/{+path}","compare_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/merges","archive_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/downloads","issues_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/issues{/number}","pulls_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/pulls{/number}","milestones_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/milestones{/number}","notifications_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/labels{/name}","releases_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/releases{/id}","deployments_url":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/deployments","created_at":"2018-10-29T09:42:31Z","updated_at":"2018-11-13T13:18:53Z","pushed_at":"2018-11-15T08:21:49Z","git_url":"git://github.com/rajneesh-vinsol/groupon-projects.git","ssh_url":"git@github.com:rajneesh-vinsol/groupon-projects.git","clone_url":"https://github.com/rajneesh-vinsol/groupon-projects.git","svn_url":"https://github.com/rajneesh-vinsol/groupon-projects","homepage":null,"size":203,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/pulls/8"},"html":{"href":"https://github.com/rajneesh-vinsol/groupon-projects/pull/8"},"issue":{"href":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/issues/8"},"comments":{"href":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/rajneesh-vinsol/groupon-projects/statuses/b2ebc1536f0e50aef8e17a8889f9d79bc023a178"}},"author_association":"OWNER"}}
{"actor":{"display_login":"sawangupta92"}}