Skip to content

Commit

Permalink
[feat] add image
Browse files Browse the repository at this point in the history
  • Loading branch information
PicturePark1101 committed Jul 11, 2024
1 parent d027c20 commit f6670ce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,10 @@ public class FavoriteCommandService {
public void create(final FavoritePostCommand command) {

User findUser = userFinder.getUser(command.userId());

String title = command.title();
String details = String.join(" ", command.details());

favoriteRepository.save(Favorite.create(findUser, title, details));

}

@Transactional
Expand All @@ -50,6 +48,5 @@ public void deleteFavorites(final FavoritesDeleteCommand command) {

favoriteStoreDeleter.deleteAllByFavorites(favorites);
favoriteDeleter.deleteAll(favorites);

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class Favorite extends BaseTimeEntity {
private String detail;

@Column(nullable = false)
private String favorite_image_url;
private String image_url;

@OneToMany(mappedBy = "favorite")
private List<FavoriteStore> favoriteStores = new ArrayList<>();
Expand All @@ -49,5 +49,6 @@ private Favorite(User user, String name, String detail) {
this.user = user;
this.name = name;
this.detail = detail;
this.image_url = "default.com";
}
}

0 comments on commit f6670ce

Please sign in to comment.