generated from yandex-praktikum/java-explore-with-me-plus
-
Notifications
You must be signed in to change notification settings - Fork 1
Этап 3: Реализация дополнительной функциональности "Комментарии к событиям" #108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* add the "commentsEnabled" flag to Event * create Comment entity * create Comment DTOs * add comment repository and mapper * create CommentMapper unit tests * checkstyle * add empty postman collection to pass checks --------- Co-authored-by: Pepe Ronin <ivanpetrovskiy98@gmail.com>
* COMMENTS-PUBLIC: Получение комментариев к событию #85 Первичное исполнение без тестов. * Исправление стиля. * Исправление замечаний и добавление тестов * Исправление стиля
Co-authored-by: Pepe Ronin <ivanpetrovskiy98@gmail.com>
…103) * fix comment update timestamp in server response * might as well * update tests to interact with correct repository method --------- Co-authored-by: Pepe Ronin <ivanpetrovskiy98@gmail.com>
* добавила эндпоинты на удаление коммента * стиль * правки * стиль
* add admin search params and update service interface * implement admin comment search * add/refactor integration tests for CommentServiceImpl * fix interaction with null predicate (also in EventService) * update CommentServiceImpl unit tests * implement the admin comment search endpoint * create unit tests for event admin controller * fix stats-local launch config * add `@Positive` constraints to request parameters * remove explicit empty list check * remove explicit empty list check * cleanup * uncomment service unit tests --------- Co-authored-by: Pepe Ronin <ivanpetrovskiy98@gmail.com>
* create admin dto for comments * add new mappings * update mapper tests * make service return admin dto for admin methods * make controller respond with admin dto for admin endpoints * update tests to use correct dto --------- Co-authored-by: Pepe Ronin <ivanpetrovskiy98@gmail.com>
Co-authored-by: Pepe Ronin <ivanpetrovskiy98@gmail.com>
* create tests for comments endpoints * add more test for 400 Bad Request scenarios --------- Co-authored-by: Pepe Ronin <ivanpetrovskiy98@gmail.com>
Co-authored-by: Pepe Ronin <ivanpetrovskiy98@gmail.com>
kesch9
approved these changes
Jun 2, 2025
kesch9
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approve
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Описание
Данный Pull Request содержит реализацию Этапа 3 проекта "Explore With Me" – дополнительной функциональности "Комментарии к событиям".
Обзор реализованной функциональности "Комментарии":
В рамках данной фичи была добавлена возможность для пользователей взаимодействовать с событиями через комментарии, а для администраторов – модерировать их.
Ключевые реализованные аспекты:
Новая сущность
Comment:Commentсо связями кUser(автор) иEvent(событие).isDeleted) и отслеживание редактирования (флагisEdited).createdOnиupdatedOn.Интеграция с
Event:Eventдобавлено полеcommentsEnabled(boolean, defaulttrue), позволяющее инициаторам и администраторам управлять возможностью комментирования для каждого события.API для комментариев (согласно обновленной спецификации):
/users/{userId}/comments):commentsEnabled)./admin/comments):isDeleted) и пагинацией. Ответы для администратора включают полеisDeleted./events/{eventId}/comments):commentsEnabled).DTO и Маппинг:
NewCommentDto,UpdateCommentDto,CommentDto,CommentAdminDto) для работы с комментариями.Тестирование:
postman/feature.json) с базовыми тестами для всех новых эндпоинтов, реализующих фичу "Комментарии". Тесты проверяют коды ответов, формат JSON и содержимое полей.Документация:
README.mdобновлен: указана выбранная фича "Комментарии" и добавлено краткое описание ее реализации и новых эндпоинтов. Спецификация API (ewm-main-service-spec.json) обновлена и содержит добавленные в рамках реализации фичи эндпойнты.