{"action":"created","comment":{"url":"https://api.github.com/repos/scorum/scorum/pulls/comments/207182750","pull_request_review_id":142739976,"id":207182750,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNzE4Mjc1MA==","diff_hunk":"@@ -0,0 +1,198 @@\n+#pragma once\n+#include <fc/static_variant.hpp>\n+#include <scorum/protocol/betting/market_kind.hpp>\n+#include <scorum/protocol/betting/threshold.hpp>\n+\n+namespace scorum {\n+namespace protocol {\n+namespace betting {\n+\n+struct home_tag;\n+struct away_tag;\n+struct draw_tag;\n+struct both_tag;\n+\n+template <market_kind kind, typename tag = void> struct under;\n+template <market_kind kind, typename tag = void> struct over\n+{\n+    static constexpr market_kind kind_v = kind;\n+    using opposite_type = under<kind, tag>;\n+\n+    threshold_type threshold = 0;\n+\n+    opposite_type create_opposite() const\n+    {\n+        return opposite_type{ threshold };\n+    }\n+};\n+\n+template <market_kind kind, typename tag> struct under\n+{\n+    static constexpr market_kind kind_v = kind;\n+    using opposite_type = over<kind, tag>;\n+\n+    threshold_type threshold = 0;","path":"libraries/protocol/include/scorum/protocol/betting/wincase.hpp","position":34,"original_position":34,"commit_id":"95a23eac9ed82be3047cb693e986be80cf14aac0","original_commit_id":"95a23eac9ed82be3047cb693e986be80cf14aac0","user":{"login":"Andrei-Masilevich","id":9274149,"node_id":"MDQ6VXNlcjkyNzQxNDk=","avatar_url":"https://avatars3.githubusercontent.com/u/9274149?v=4","gravatar_id":"","url":"https://api.github.com/users/Andrei-Masilevich","html_url":"https://github.com/Andrei-Masilevich","followers_url":"https://api.github.com/users/Andrei-Masilevich/followers","following_url":"https://api.github.com/users/Andrei-Masilevich/following{/other_user}","gists_url":"https://api.github.com/users/Andrei-Masilevich/gists{/gist_id}","starred_url":"https://api.github.com/users/Andrei-Masilevich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Andrei-Masilevich/subscriptions","organizations_url":"https://api.github.com/users/Andrei-Masilevich/orgs","repos_url":"https://api.github.com/users/Andrei-Masilevich/repos","events_url":"https://api.github.com/users/Andrei-Masilevich/events{/privacy}","received_events_url":"https://api.github.com/users/Andrei-Masilevich/received_events","type":"User","site_admin":false},"body":"Not good architecture when fields are duplicated in initial and opposite wincase.\r\nMaybe try additional bool tag. For instance:\r\n\r\n```\r\ntemplate <bool site, market_kind kind, typename tag = void> struct over_under\r\n{\r\n    static constexpr market_kind kind_v = kind;\r\n    using opposite_type = over_under<!site, kind, tag>;\r\n\r\n    threshold_type threshold = 0;\r\n\r\n    opposite_type create_opposite() const\r\n    {\r\n        return opposite_type{ threshold };\r\n    }\r\n};\r\ntemplate <market_kind kind, typename tag = void> using over = over_under<true, kind, tag>;\r\ntemplate <market_kind kind, typename tag = void> using under = over_under<false, kind, tag>;\r\n```\r\n","created_at":"2018-08-02T10:50:26Z","updated_at":"2018-08-02T10:50:26Z","html_url":"https://github.com/scorum/scorum/pull/279#discussion_r207182750","pull_request_url":"https://api.github.com/repos/scorum/scorum/pulls/279","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/scorum/scorum/pulls/comments/207182750"},"html":{"href":"https://github.com/scorum/scorum/pull/279#discussion_r207182750"},"pull_request":{"href":"https://api.github.com/repos/scorum/scorum/pulls/279"}}},"pull_request":{"url":"https://api.github.com/repos/scorum/scorum/pulls/279","id":204736543,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0NzM2NTQz","html_url":"https://github.com/scorum/scorum/pull/279","diff_url":"https://github.com/scorum/scorum/pull/279.diff","patch_url":"https://github.com/scorum/scorum/pull/279.patch","issue_url":"https://api.github.com/repos/scorum/scorum/issues/279","number":279,"state":"open","locked":false,"title":"403 betting game market wincase","user":{"login":"Katkevich","id":1450867,"node_id":"MDQ6VXNlcjE0NTA4Njc=","avatar_url":"https://avatars0.githubusercontent.com/u/1450867?v=4","gravatar_id":"","url":"https://api.github.com/users/Katkevich","html_url":"https://github.com/Katkevich","followers_url":"https://api.github.com/users/Katkevich/followers","following_url":"https://api.github.com/users/Katkevich/following{/other_user}","gists_url":"https://api.github.com/users/Katkevich/gists{/gist_id}","starred_url":"https://api.github.com/users/Katkevich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Katkevich/subscriptions","organizations_url":"https://api.github.com/users/Katkevich/orgs","repos_url":"https://api.github.com/users/Katkevich/repos","events_url":"https://api.github.com/users/Katkevich/events{/privacy}","received_events_url":"https://api.github.com/users/Katkevich/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-07-30T08:57:33Z","updated_at":"2018-08-02T10:50:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"be5a4dc7d9248bd0e2393ad3fdec3d5a88c3bf5d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/scorum/scorum/pulls/279/commits","review_comments_url":"https://api.github.com/repos/scorum/scorum/pulls/279/comments","review_comment_url":"https://api.github.com/repos/scorum/scorum/pulls/comments{/number}","comments_url":"https://api.github.com/repos/scorum/scorum/issues/279/comments","statuses_url":"https://api.github.com/repos/scorum/scorum/statuses/95a23eac9ed82be3047cb693e986be80cf14aac0","head":{"label":"scorum:403-betting-game-market-wincase","ref":"403-betting-game-market-wincase","sha":"95a23eac9ed82be3047cb693e986be80cf14aac0","user":{"login":"scorum","id":32771359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyNzcxMzU5","avatar_url":"https://avatars0.githubusercontent.com/u/32771359?v=4","gravatar_id":"","url":"https://api.github.com/users/scorum","html_url":"https://github.com/scorum","followers_url":"https://api.github.com/users/scorum/followers","following_url":"https://api.github.com/users/scorum/following{/other_user}","gists_url":"https://api.github.com/users/scorum/gists{/gist_id}","starred_url":"https://api.github.com/users/scorum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scorum/subscriptions","organizations_url":"https://api.github.com/users/scorum/orgs","repos_url":"https://api.github.com/users/scorum/repos","events_url":"https://api.github.com/users/scorum/events{/privacy}","received_events_url":"https://api.github.com/users/scorum/received_events","type":"Organization","site_admin":false},"repo":{"id":106838543,"node_id":"MDEwOlJlcG9zaXRvcnkxMDY4Mzg1NDM=","name":"scorum","full_name":"scorum/scorum","owner":{"login":"scorum","id":32771359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyNzcxMzU5","avatar_url":"https://avatars0.githubusercontent.com/u/32771359?v=4","gravatar_id":"","url":"https://api.github.com/users/scorum","html_url":"https://github.com/scorum","followers_url":"https://api.github.com/users/scorum/followers","following_url":"https://api.github.com/users/scorum/following{/other_user}","gists_url":"https://api.github.com/users/scorum/gists{/gist_id}","starred_url":"https://api.github.com/users/scorum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scorum/subscriptions","organizations_url":"https://api.github.com/users/scorum/orgs","repos_url":"https://api.github.com/users/scorum/repos","events_url":"https://api.github.com/users/scorum/events{/privacy}","received_events_url":"https://api.github.com/users/scorum/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/scorum/scorum","description":"Scorum is a blockchain powered sports media platform built for sports fans worldwide and designed to reward content creators and creators in a fair and transparent economy.","fork":false,"url":"https://api.github.com/repos/scorum/scorum","forks_url":"https://api.github.com/repos/scorum/scorum/forks","keys_url":"https://api.github.com/repos/scorum/scorum/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scorum/scorum/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scorum/scorum/teams","hooks_url":"https://api.github.com/repos/scorum/scorum/hooks","issue_events_url":"https://api.github.com/repos/scorum/scorum/issues/events{/number}","events_url":"https://api.github.com/repos/scorum/scorum/events","assignees_url":"https://api.github.com/repos/scorum/scorum/assignees{/user}","branches_url":"https://api.github.com/repos/scorum/scorum/branches{/branch}","tags_url":"https://api.github.com/repos/scorum/scorum/tags","blobs_url":"https://api.github.com/repos/scorum/scorum/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scorum/scorum/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scorum/scorum/git/refs{/sha}","trees_url":"https://api.github.com/repos/scorum/scorum/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scorum/scorum/statuses/{sha}","languages_url":"https://api.github.com/repos/scorum/scorum/languages","stargazers_url":"https://api.github.com/repos/scorum/scorum/stargazers","contributors_url":"https://api.github.com/repos/scorum/scorum/contributors","subscribers_url":"https://api.github.com/repos/scorum/scorum/subscribers","subscription_url":"https://api.github.com/repos/scorum/scorum/subscription","commits_url":"https://api.github.com/repos/scorum/scorum/commits{/sha}","git_commits_url":"https://api.github.com/repos/scorum/scorum/git/commits{/sha}","comments_url":"https://api.github.com/repos/scorum/scorum/comments{/number}","issue_comment_url":"https://api.github.com/repos/scorum/scorum/issues/comments{/number}","contents_url":"https://api.github.com/repos/scorum/scorum/contents/{+path}","compare_url":"https://api.github.com/repos/scorum/scorum/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scorum/scorum/merges","archive_url":"https://api.github.com/repos/scorum/scorum/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scorum/scorum/downloads","issues_url":"https://api.github.com/repos/scorum/scorum/issues{/number}","pulls_url":"https://api.github.com/repos/scorum/scorum/pulls{/number}","milestones_url":"https://api.github.com/repos/scorum/scorum/milestones{/number}","notifications_url":"https://api.github.com/repos/scorum/scorum/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scorum/scorum/labels{/name}","releases_url":"https://api.github.com/repos/scorum/scorum/releases{/id}","deployments_url":"https://api.github.com/repos/scorum/scorum/deployments","created_at":"2017-10-13T15:01:17Z","updated_at":"2018-07-31T15:21:39Z","pushed_at":"2018-08-02T08:51:00Z","git_url":"git://github.com/scorum/scorum.git","ssh_url":"git@github.com:scorum/scorum.git","clone_url":"https://github.com/scorum/scorum.git","svn_url":"https://github.com/scorum/scorum","homepage":"https://scorumcoins.com/","size":13286,"stargazers_count":39,"watchers_count":39,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":15,"open_issues":8,"watchers":39,"default_branch":"develop"}},"base":{"label":"scorum:fc-static-variant-cpp14-update","ref":"fc-static-variant-cpp14-update","sha":"de6b02ca10d46483c0cdb854cdf928a1ec134e6e","user":{"login":"scorum","id":32771359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyNzcxMzU5","avatar_url":"https://avatars0.githubusercontent.com/u/32771359?v=4","gravatar_id":"","url":"https://api.github.com/users/scorum","html_url":"https://github.com/scorum","followers_url":"https://api.github.com/users/scorum/followers","following_url":"https://api.github.com/users/scorum/following{/other_user}","gists_url":"https://api.github.com/users/scorum/gists{/gist_id}","starred_url":"https://api.github.com/users/scorum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scorum/subscriptions","organizations_url":"https://api.github.com/users/scorum/orgs","repos_url":"https://api.github.com/users/scorum/repos","events_url":"https://api.github.com/users/scorum/events{/privacy}","received_events_url":"https://api.github.com/users/scorum/received_events","type":"Organization","site_admin":false},"repo":{"id":106838543,"node_id":"MDEwOlJlcG9zaXRvcnkxMDY4Mzg1NDM=","name":"scorum","full_name":"scorum/scorum","owner":{"login":"scorum","id":32771359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyNzcxMzU5","avatar_url":"https://avatars0.githubusercontent.com/u/32771359?v=4","gravatar_id":"","url":"https://api.github.com/users/scorum","html_url":"https://github.com/scorum","followers_url":"https://api.github.com/users/scorum/followers","following_url":"https://api.github.com/users/scorum/following{/other_user}","gists_url":"https://api.github.com/users/scorum/gists{/gist_id}","starred_url":"https://api.github.com/users/scorum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scorum/subscriptions","organizations_url":"https://api.github.com/users/scorum/orgs","repos_url":"https://api.github.com/users/scorum/repos","events_url":"https://api.github.com/users/scorum/events{/privacy}","received_events_url":"https://api.github.com/users/scorum/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/scorum/scorum","description":"Scorum is a blockchain powered sports media platform built for sports fans worldwide and designed to reward content creators and creators in a fair and transparent economy.","fork":false,"url":"https://api.github.com/repos/scorum/scorum","forks_url":"https://api.github.com/repos/scorum/scorum/forks","keys_url":"https://api.github.com/repos/scorum/scorum/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scorum/scorum/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scorum/scorum/teams","hooks_url":"https://api.github.com/repos/scorum/scorum/hooks","issue_events_url":"https://api.github.com/repos/scorum/scorum/issues/events{/number}","events_url":"https://api.github.com/repos/scorum/scorum/events","assignees_url":"https://api.github.com/repos/scorum/scorum/assignees{/user}","branches_url":"https://api.github.com/repos/scorum/scorum/branches{/branch}","tags_url":"https://api.github.com/repos/scorum/scorum/tags","blobs_url":"https://api.github.com/repos/scorum/scorum/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scorum/scorum/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scorum/scorum/git/refs{/sha}","trees_url":"https://api.github.com/repos/scorum/scorum/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scorum/scorum/statuses/{sha}","languages_url":"https://api.github.com/repos/scorum/scorum/languages","stargazers_url":"https://api.github.com/repos/scorum/scorum/stargazers","contributors_url":"https://api.github.com/repos/scorum/scorum/contributors","subscribers_url":"https://api.github.com/repos/scorum/scorum/subscribers","subscription_url":"https://api.github.com/repos/scorum/scorum/subscription","commits_url":"https://api.github.com/repos/scorum/scorum/commits{/sha}","git_commits_url":"https://api.github.com/repos/scorum/scorum/git/commits{/sha}","comments_url":"https://api.github.com/repos/scorum/scorum/comments{/number}","issue_comment_url":"https://api.github.com/repos/scorum/scorum/issues/comments{/number}","contents_url":"https://api.github.com/repos/scorum/scorum/contents/{+path}","compare_url":"https://api.github.com/repos/scorum/scorum/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scorum/scorum/merges","archive_url":"https://api.github.com/repos/scorum/scorum/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scorum/scorum/downloads","issues_url":"https://api.github.com/repos/scorum/scorum/issues{/number}","pulls_url":"https://api.github.com/repos/scorum/scorum/pulls{/number}","milestones_url":"https://api.github.com/repos/scorum/scorum/milestones{/number}","notifications_url":"https://api.github.com/repos/scorum/scorum/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scorum/scorum/labels{/name}","releases_url":"https://api.github.com/repos/scorum/scorum/releases{/id}","deployments_url":"https://api.github.com/repos/scorum/scorum/deployments","created_at":"2017-10-13T15:01:17Z","updated_at":"2018-07-31T15:21:39Z","pushed_at":"2018-08-02T08:51:00Z","git_url":"git://github.com/scorum/scorum.git","ssh_url":"git@github.com:scorum/scorum.git","clone_url":"https://github.com/scorum/scorum.git","svn_url":"https://github.com/scorum/scorum","homepage":"https://scorumcoins.com/","size":13286,"stargazers_count":39,"watchers_count":39,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":15,"open_issues":8,"watchers":39,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/scorum/scorum/pulls/279"},"html":{"href":"https://github.com/scorum/scorum/pull/279"},"issue":{"href":"https://api.github.com/repos/scorum/scorum/issues/279"},"comments":{"href":"https://api.github.com/repos/scorum/scorum/issues/279/comments"},"review_comments":{"href":"https://api.github.com/repos/scorum/scorum/pulls/279/comments"},"review_comment":{"href":"https://api.github.com/repos/scorum/scorum/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/scorum/scorum/pulls/279/commits"},"statuses":{"href":"https://api.github.com/repos/scorum/scorum/statuses/95a23eac9ed82be3047cb693e986be80cf14aac0"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Andrei-Masilevich"}}