Skip to content

Add database#4

Merged
NadezhdaTA merged 5 commits intomainfrom
add-database
Oct 13, 2025
Merged

Add database#4
NadezhdaTA merged 5 commits intomainfrom
add-database

Conversation

@NadezhdaTA
Copy link
Copy Markdown
Owner

No description provided.

Comment thread src/main/resources/schema.sql
return new ErrorResponse(e.getMessage(), HttpStatus.BAD_REQUEST);
}

@ExceptionHandler
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А зря убрала обработку Exception, это очень правильно все оставшиеся эксепшены обработать в статус INTERNAL_SERVER_ERROR

Comment thread src/main/java/ru/yandex/practicum/filmorate/controller/FilmController.java Outdated
Comment thread src/main/java/ru/yandex/practicum/filmorate/model/Film.java
@Data
@Entity
@EqualsAndHashCode(of = {"userId"})
public class Friends {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Классы-сущности для таблиц-связок делать избыточно. Ты же захочешь получать из БД уже готовые сущности или их коллекции.

Comment thread src/main/java/ru/yandex/practicum/filmorate/storage/db/UserDbStorage.java Outdated
Comment thread src/main/java/ru/yandex/practicum/filmorate/storage/db/FilmDbStorage.java Outdated
Comment thread src/main/java/ru/yandex/practicum/filmorate/storage/db/FilmDbStorage.java Outdated
Comment thread src/main/java/ru/yandex/practicum/filmorate/storage/db/FilmDbStorage.java Outdated
Copy link
Copy Markdown

@VadimZharkov VadimZharkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Хорошее начало, можно улучшить

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

InMemory реализации нам уже не понадобятся, лучше удалить из проекта

Copy link
Copy Markdown

@VadimZharkov VadimZharkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Доработки увидел, все ок. Еще пару моментов нужно исправить.

@NadezhdaTA NadezhdaTA merged commit 79fef35 into main Oct 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants