{"action":"created","comment":{"url":"https://api.github.com/repos/Java-Classes/Exlibris/pulls/comments/166299144","pull_request_review_id":94343663,"id":166299144,"diff_hunk":"@@ -86,4 +106,228 @@ message HomePage {\n     repeated Book book = 1;\n     repeated Category category = 2;\n }\n+\n // *** This is projections for UI role librarian ***\n+\n+// View for adding book.\n+//\n+// View consist of fields for writing book details.\n+//\n+message AddBookView {\n+\n+    //List of book categories.\n+    repeated Category categories = 1;\n+}\n+\n+// View for editing book.\n+//\n+// View consist of fields for edit book details.\n+//\n+message UpdateBookView {\n+\n+    // URL for book cover.\n+    spine.net.Url cover_url = 1;\n+\n+    // Value that generated from decimal ISBN.\n+    Isbn62 isbn = 2;\n+\n+    // Book’s title.\n+    BookTitle title = 3;\n+\n+    // Full author’s name.\n+    repeated Author authors = 4;\n+\n+    // Year of publication of the book.\n+    Year year = 5;\n+\n+    // Categories of book.\n+    repeated Category categories = 6;\n+\n+    // Full book’s description.\n+    BookDescription description = 7;\n+}\n+\n+// View for appending inventory.\n+//\n+// The second step of wizard of adding book items.\n+//\n+message AppendInventoryView {\n+\n+    // An identifier is represented by BookId.\n+    InventoryId inventory_id = 2;\n+}\n+\n+//\n+//\n+//\n+//\n+message BookCompactHistory {\n+    spine.net.Url cover_url = 1;\n+    repeated LoanDetails loans = 2;\n+}\n+\n+message LoanDetails {\n+    InventoryItemId inventory_item_id = 1;\n+    UserId user_id = 2;\n+    google.protobuf.Timestamp when_taken = 3;\n+    google.protobuf.Timestamp when_due = 4;\n+}\n+\n+message BookFullHistory {\n+    spine.net.Url cover_url = 1;\n+    repeated InventoryItemRecord inventory_item_record = 2;\n+}\n+\n+message InventoryItemRecord {\n+\n+    InventoryItemId inventory_item_id = 1;\n+    oneof book_record {\n+        bool borrowed = 2;\n+        bool reserved = 3;\n+        bool loan_period_extended = 4;\n+        bool returned = 5;\n+        bool lost = 6;\n+    }\n+    google.protobuf.Timestamp action_date = 7;\n+}\n+\n+message DetailsView {\n+    BookView book_view = 1;\n+    Year year = 2;\n+    BookDescription book_desctiption = 3;\n+    repeated Category categories = 4;\n+}\n+\n+message ExtendedInventoryView {\n+    repeated LoanDetails loan_details = 1;\n+}\n+\n+message InventoryDetails {\n+    BookTitle book_title = 1;\n+    repeated Author authors = 2;\n+    int32 availableItems = 3;\n+    int32 itemsSize = 4;\n+}\n+\n+message InventoryByBookView {\n+    spine.net.Url url = 1;\n+    repeated InventoryDetails inventory_details = 2;\n+    repeated LoanDetails loan_details = 3;\n+}\n+\n+message InventoryView {\n+    InventoryDetails inventory_details = 1;\n+}\n+\n+// Informaton about the book that was lost.\n+//\n+message LostBook {\n+\n+    // An identifier of the book that was lost.\n+    InventoryItemId inventory_item_id = 1;\n+\n+    // A title of the book that was lost.\n+    BookTitle book_title = 2;\n+\n+    // The list of authors.\n+    repeated Author authors = 3;\n+\n+    // An identifier of the user who lost the book.\n+    UserId user_id = 4;\n+\n+    // The time when was reported about book losing.\n+    google.protobuf.Timestamp reported_on = 5;\n+}\n+\n+// The wiew with information about lost books.\n+//\n+message LostBookView {\n+\n+    // The list of all books that were lost.\n+    repeated LostBook lost_books = 1;\n+}\n+\n+// All current readers and their summary.\n+//\n+message ReadersView {\n+\n+    // The list of the concrete user’s summary.\n+    repeated UserDetails user_details = 1;\n+}\n+\n+// The necessary for librarian information about users.\n+//\n+message UserDetails {\n+\n+    // An identifier of the user.\n+    UserId user_id = 1;\n+\n+    // An name of user in the library.\n+    string username = 2;\n+\n+    // The amount of borrowed by user books now.\n+    int32 currently_reading = 3;\n+\n+    // The amount of reserved by user books now.\n+    int32 reservations = 4;\n+\n+    // The amount of books that user return with lateness or doesn’t return at all.\n+    int32 orverdue = 5;\n+}\n+\n+// Contains the information about all reservations of the current book.\n+//\n+message ReservationView {\n+\n+    // An URL of the book’s cover.\n+    spine.net.Url cover_url = 2;\n+\n+    // The details of the reservation.\n+    ReservationDetails reservation_details = 3;\n+}\n+\n+// The necessary for librarian information about reservations.\n+//\n+message ReservationDetails {\n+\n+    // An title of the book.\n+    BookTitle book_title = 1;\n+\n+    // List of the book’s authors.","path":"model/src/main/proto/javaclasses/exlibris/q/projections.proto","position":257,"original_position":257,"commit_id":"4f9ddd3b406170fe913062970bb1edf25388d6d0","original_commit_id":"4f9ddd3b406170fe913062970bb1edf25388d6d0","user":{"login":"alexanderkarpetc","id":32199323,"avatar_url":"https://avatars1.githubusercontent.com/u/32199323?v=4","gravatar_id":"","url":"https://api.github.com/users/alexanderkarpetc","html_url":"https://github.com/alexanderkarpetc","followers_url":"https://api.github.com/users/alexanderkarpetc/followers","following_url":"https://api.github.com/users/alexanderkarpetc/following{/other_user}","gists_url":"https://api.github.com/users/alexanderkarpetc/gists{/gist_id}","starred_url":"https://api.github.com/users/alexanderkarpetc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexanderkarpetc/subscriptions","organizations_url":"https://api.github.com/users/alexanderkarpetc/orgs","repos_url":"https://api.github.com/users/alexanderkarpetc/repos","events_url":"https://api.github.com/users/alexanderkarpetc/events{/privacy}","received_events_url":"https://api.github.com/users/alexanderkarpetc/received_events","type":"User","site_admin":false},"body":"book's-> book","created_at":"2018-02-06T13:35:59Z","updated_at":"2018-02-06T13:35:59Z","html_url":"https://github.com/Java-Classes/Exlibris/pull/19#discussion_r166299144","pull_request_url":"https://api.github.com/repos/Java-Classes/Exlibris/pulls/19","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Java-Classes/Exlibris/pulls/comments/166299144"},"html":{"href":"https://github.com/Java-Classes/Exlibris/pull/19#discussion_r166299144"},"pull_request":{"href":"https://api.github.com/repos/Java-Classes/Exlibris/pulls/19"}}},"pull_request":{"url":"https://api.github.com/repos/Java-Classes/Exlibris/pulls/19","id":167411975,"html_url":"https://github.com/Java-Classes/Exlibris/pull/19","diff_url":"https://github.com/Java-Classes/Exlibris/pull/19.diff","patch_url":"https://github.com/Java-Classes/Exlibris/pull/19.patch","issue_url":"https://api.github.com/repos/Java-Classes/Exlibris/issues/19","number":19,"state":"open","locked":false,"title":"Add docs for projections","user":{"login":"Dmytry-Dyachenko","id":33631721,"avatar_url":"https://avatars0.githubusercontent.com/u/33631721?v=4","gravatar_id":"","url":"https://api.github.com/users/Dmytry-Dyachenko","html_url":"https://github.com/Dmytry-Dyachenko","followers_url":"https://api.github.com/users/Dmytry-Dyachenko/followers","following_url":"https://api.github.com/users/Dmytry-Dyachenko/following{/other_user}","gists_url":"https://api.github.com/users/Dmytry-Dyachenko/gists{/gist_id}","starred_url":"https://api.github.com/users/Dmytry-Dyachenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dmytry-Dyachenko/subscriptions","organizations_url":"https://api.github.com/users/Dmytry-Dyachenko/orgs","repos_url":"https://api.github.com/users/Dmytry-Dyachenko/repos","events_url":"https://api.github.com/users/Dmytry-Dyachenko/events{/privacy}","received_events_url":"https://api.github.com/users/Dmytry-Dyachenko/received_events","type":"User","site_admin":false},"body":"Add some docs in `projections.proto`.\r\n\r\nExample: Docs for `book_status`\r\n\r\n\r\n```\r\n// The book can has one of the next status:\r\n    //\r\n    //  1. Borrowed — when book is borrowed by user.\r\n    //  2. Reserved — when book is reserved by user.\r\n    //  3. Available — when book is available to borrow or reserve.\r\n    //  4. Expected soon — when book is not available now, but user can reserve it.\r\n    //  5. Overdue — when book was borrowed by user but still doesn’t returned.\r\n    //\r\n    oneof book_status {\r\n        bool borrowed = 4;\r\n        bool reserved = 5;\r\n        bool available = 6;\r\n        bool expected_soon = 7;\r\n        bool overdue = 8;\r\n    }\r\n```","created_at":"2018-02-06T13:21:14Z","updated_at":"2018-02-06T13:35:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"98b9dd87490c28cae6f81b54fd28f9b42515111d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/Java-Classes/Exlibris/pulls/19/commits","review_comments_url":"https://api.github.com/repos/Java-Classes/Exlibris/pulls/19/comments","review_comment_url":"https://api.github.com/repos/Java-Classes/Exlibris/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Java-Classes/Exlibris/issues/19/comments","statuses_url":"https://api.github.com/repos/Java-Classes/Exlibris/statuses/4f9ddd3b406170fe913062970bb1edf25388d6d0","head":{"label":"Java-Classes:docs_for_projections","ref":"docs_for_projections","sha":"4f9ddd3b406170fe913062970bb1edf25388d6d0","user":{"login":"Java-Classes","id":16760983,"avatar_url":"https://avatars1.githubusercontent.com/u/16760983?v=4","gravatar_id":"","url":"https://api.github.com/users/Java-Classes","html_url":"https://github.com/Java-Classes","followers_url":"https://api.github.com/users/Java-Classes/followers","following_url":"https://api.github.com/users/Java-Classes/following{/other_user}","gists_url":"https://api.github.com/users/Java-Classes/gists{/gist_id}","starred_url":"https://api.github.com/users/Java-Classes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Java-Classes/subscriptions","organizations_url":"https://api.github.com/users/Java-Classes/orgs","repos_url":"https://api.github.com/users/Java-Classes/repos","events_url":"https://api.github.com/users/Java-Classes/events{/privacy}","received_events_url":"https://api.github.com/users/Java-Classes/received_events","type":"Organization","site_admin":false},"repo":{"id":119825128,"name":"Exlibris","full_name":"Java-Classes/Exlibris","owner":{"login":"Java-Classes","id":16760983,"avatar_url":"https://avatars1.githubusercontent.com/u/16760983?v=4","gravatar_id":"","url":"https://api.github.com/users/Java-Classes","html_url":"https://github.com/Java-Classes","followers_url":"https://api.github.com/users/Java-Classes/followers","following_url":"https://api.github.com/users/Java-Classes/following{/other_user}","gists_url":"https://api.github.com/users/Java-Classes/gists{/gist_id}","starred_url":"https://api.github.com/users/Java-Classes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Java-Classes/subscriptions","organizations_url":"https://api.github.com/users/Java-Classes/orgs","repos_url":"https://api.github.com/users/Java-Classes/repos","events_url":"https://api.github.com/users/Java-Classes/events{/privacy}","received_events_url":"https://api.github.com/users/Java-Classes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Java-Classes/Exlibris","description":"The Librarian application.","fork":false,"url":"https://api.github.com/repos/Java-Classes/Exlibris","forks_url":"https://api.github.com/repos/Java-Classes/Exlibris/forks","keys_url":"https://api.github.com/repos/Java-Classes/Exlibris/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Java-Classes/Exlibris/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Java-Classes/Exlibris/teams","hooks_url":"https://api.github.com/repos/Java-Classes/Exlibris/hooks","issue_events_url":"https://api.github.com/repos/Java-Classes/Exlibris/issues/events{/number}","events_url":"https://api.github.com/repos/Java-Classes/Exlibris/events","assignees_url":"https://api.github.com/repos/Java-Classes/Exlibris/assignees{/user}","branches_url":"https://api.github.com/repos/Java-Classes/Exlibris/branches{/branch}","tags_url":"https://api.github.com/repos/Java-Classes/Exlibris/tags","blobs_url":"https://api.github.com/repos/Java-Classes/Exlibris/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Java-Classes/Exlibris/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Java-Classes/Exlibris/git/refs{/sha}","trees_url":"https://api.github.com/repos/Java-Classes/Exlibris/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Java-Classes/Exlibris/statuses/{sha}","languages_url":"https://api.github.com/repos/Java-Classes/Exlibris/languages","stargazers_url":"https://api.github.com/repos/Java-Classes/Exlibris/stargazers","contributors_url":"https://api.github.com/repos/Java-Classes/Exlibris/contributors","subscribers_url":"https://api.github.com/repos/Java-Classes/Exlibris/subscribers","subscription_url":"https://api.github.com/repos/Java-Classes/Exlibris/subscription","commits_url":"https://api.github.com/repos/Java-Classes/Exlibris/commits{/sha}","git_commits_url":"https://api.github.com/repos/Java-Classes/Exlibris/git/commits{/sha}","comments_url":"https://api.github.com/repos/Java-Classes/Exlibris/comments{/number}","issue_comment_url":"https://api.github.com/repos/Java-Classes/Exlibris/issues/comments{/number}","contents_url":"https://api.github.com/repos/Java-Classes/Exlibris/contents/{+path}","compare_url":"https://api.github.com/repos/Java-Classes/Exlibris/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Java-Classes/Exlibris/merges","archive_url":"https://api.github.com/repos/Java-Classes/Exlibris/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Java-Classes/Exlibris/downloads","issues_url":"https://api.github.com/repos/Java-Classes/Exlibris/issues{/number}","pulls_url":"https://api.github.com/repos/Java-Classes/Exlibris/pulls{/number}","milestones_url":"https://api.github.com/repos/Java-Classes/Exlibris/milestones{/number}","notifications_url":"https://api.github.com/repos/Java-Classes/Exlibris/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Java-Classes/Exlibris/labels{/name}","releases_url":"https://api.github.com/repos/Java-Classes/Exlibris/releases{/id}","deployments_url":"https://api.github.com/repos/Java-Classes/Exlibris/deployments","created_at":"2018-02-01T11:12:45Z","updated_at":"2018-02-05T10:40:26Z","pushed_at":"2018-02-06T13:22:57Z","git_url":"git://github.com/Java-Classes/Exlibris.git","ssh_url":"git@github.com:Java-Classes/Exlibris.git","clone_url":"https://github.com/Java-Classes/Exlibris.git","svn_url":"https://github.com/Java-Classes/Exlibris","homepage":null,"size":4646,"stargazers_count":0,"watchers_count":0,"language":null,"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":3,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"Java-Classes:master","ref":"master","sha":"8689a36812d26919f815d08f94536de0d5693506","user":{"login":"Java-Classes","id":16760983,"avatar_url":"https://avatars1.githubusercontent.com/u/16760983?v=4","gravatar_id":"","url":"https://api.github.com/users/Java-Classes","html_url":"https://github.com/Java-Classes","followers_url":"https://api.github.com/users/Java-Classes/followers","following_url":"https://api.github.com/users/Java-Classes/following{/other_user}","gists_url":"https://api.github.com/users/Java-Classes/gists{/gist_id}","starred_url":"https://api.github.com/users/Java-Classes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Java-Classes/subscriptions","organizations_url":"https://api.github.com/users/Java-Classes/orgs","repos_url":"https://api.github.com/users/Java-Classes/repos","events_url":"https://api.github.com/users/Java-Classes/events{/privacy}","received_events_url":"https://api.github.com/users/Java-Classes/received_events","type":"Organization","site_admin":false},"repo":{"id":119825128,"name":"Exlibris","full_name":"Java-Classes/Exlibris","owner":{"login":"Java-Classes","id":16760983,"avatar_url":"https://avatars1.githubusercontent.com/u/16760983?v=4","gravatar_id":"","url":"https://api.github.com/users/Java-Classes","html_url":"https://github.com/Java-Classes","followers_url":"https://api.github.com/users/Java-Classes/followers","following_url":"https://api.github.com/users/Java-Classes/following{/other_user}","gists_url":"https://api.github.com/users/Java-Classes/gists{/gist_id}","starred_url":"https://api.github.com/users/Java-Classes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Java-Classes/subscriptions","organizations_url":"https://api.github.com/users/Java-Classes/orgs","repos_url":"https://api.github.com/users/Java-Classes/repos","events_url":"https://api.github.com/users/Java-Classes/events{/privacy}","received_events_url":"https://api.github.com/users/Java-Classes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Java-Classes/Exlibris","description":"The Librarian application.","fork":false,"url":"https://api.github.com/repos/Java-Classes/Exlibris","forks_url":"https://api.github.com/repos/Java-Classes/Exlibris/forks","keys_url":"https://api.github.com/repos/Java-Classes/Exlibris/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Java-Classes/Exlibris/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Java-Classes/Exlibris/teams","hooks_url":"https://api.github.com/repos/Java-Classes/Exlibris/hooks","issue_events_url":"https://api.github.com/repos/Java-Classes/Exlibris/issues/events{/number}","events_url":"https://api.github.com/repos/Java-Classes/Exlibris/events","assignees_url":"https://api.github.com/repos/Java-Classes/Exlibris/assignees{/user}","branches_url":"https://api.github.com/repos/Java-Classes/Exlibris/branches{/branch}","tags_url":"https://api.github.com/repos/Java-Classes/Exlibris/tags","blobs_url":"https://api.github.com/repos/Java-Classes/Exlibris/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Java-Classes/Exlibris/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Java-Classes/Exlibris/git/refs{/sha}","trees_url":"https://api.github.com/repos/Java-Classes/Exlibris/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Java-Classes/Exlibris/statuses/{sha}","languages_url":"https://api.github.com/repos/Java-Classes/Exlibris/languages","stargazers_url":"https://api.github.com/repos/Java-Classes/Exlibris/stargazers","contributors_url":"https://api.github.com/repos/Java-Classes/Exlibris/contributors","subscribers_url":"https://api.github.com/repos/Java-Classes/Exlibris/subscribers","subscription_url":"https://api.github.com/repos/Java-Classes/Exlibris/subscription","commits_url":"https://api.github.com/repos/Java-Classes/Exlibris/commits{/sha}","git_commits_url":"https://api.github.com/repos/Java-Classes/Exlibris/git/commits{/sha}","comments_url":"https://api.github.com/repos/Java-Classes/Exlibris/comments{/number}","issue_comment_url":"https://api.github.com/repos/Java-Classes/Exlibris/issues/comments{/number}","contents_url":"https://api.github.com/repos/Java-Classes/Exlibris/contents/{+path}","compare_url":"https://api.github.com/repos/Java-Classes/Exlibris/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Java-Classes/Exlibris/merges","archive_url":"https://api.github.com/repos/Java-Classes/Exlibris/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Java-Classes/Exlibris/downloads","issues_url":"https://api.github.com/repos/Java-Classes/Exlibris/issues{/number}","pulls_url":"https://api.github.com/repos/Java-Classes/Exlibris/pulls{/number}","milestones_url":"https://api.github.com/repos/Java-Classes/Exlibris/milestones{/number}","notifications_url":"https://api.github.com/repos/Java-Classes/Exlibris/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Java-Classes/Exlibris/labels{/name}","releases_url":"https://api.github.com/repos/Java-Classes/Exlibris/releases{/id}","deployments_url":"https://api.github.com/repos/Java-Classes/Exlibris/deployments","created_at":"2018-02-01T11:12:45Z","updated_at":"2018-02-05T10:40:26Z","pushed_at":"2018-02-06T13:22:57Z","git_url":"git://github.com/Java-Classes/Exlibris.git","ssh_url":"git@github.com:Java-Classes/Exlibris.git","clone_url":"https://github.com/Java-Classes/Exlibris.git","svn_url":"https://github.com/Java-Classes/Exlibris","homepage":null,"size":4646,"stargazers_count":0,"watchers_count":0,"language":null,"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":3,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Java-Classes/Exlibris/pulls/19"},"html":{"href":"https://github.com/Java-Classes/Exlibris/pull/19"},"issue":{"href":"https://api.github.com/repos/Java-Classes/Exlibris/issues/19"},"comments":{"href":"https://api.github.com/repos/Java-Classes/Exlibris/issues/19/comments"},"review_comments":{"href":"https://api.github.com/repos/Java-Classes/Exlibris/pulls/19/comments"},"review_comment":{"href":"https://api.github.com/repos/Java-Classes/Exlibris/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Java-Classes/Exlibris/pulls/19/commits"},"statuses":{"href":"https://api.github.com/repos/Java-Classes/Exlibris/statuses/4f9ddd3b406170fe913062970bb1edf25388d6d0"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"alexanderkarpetc"}}