From 0a56e7421996663d7a76c1ec25dc810216b9ab46 Mon Sep 17 00:00:00 2001 From: Ros Date: Sun, 1 Oct 2023 13:43:28 +0100 Subject: [PATCH] deleted empty lines --- .../spring/boot/bookstore/controller/CategoryController.java | 1 - src/main/java/spring/boot/bookstore/model/CartItem.java | 4 ---- src/main/java/spring/boot/bookstore/model/ShoppingCart.java | 1 - .../spring/boot/bookstore/repository/CategoryRepository.java | 1 - 4 files changed, 7 deletions(-) diff --git a/src/main/java/spring/boot/bookstore/controller/CategoryController.java b/src/main/java/spring/boot/bookstore/controller/CategoryController.java index c221ed0..36e0ecb 100644 --- a/src/main/java/spring/boot/bookstore/controller/CategoryController.java +++ b/src/main/java/spring/boot/bookstore/controller/CategoryController.java @@ -31,7 +31,6 @@ @RestController @RequestMapping(value = "/categories") public class CategoryController { - private static final Logger logger = LogManager.getLogger(BookController.class); private final CategoryService categoryService; private final BookService bookService; diff --git a/src/main/java/spring/boot/bookstore/model/CartItem.java b/src/main/java/spring/boot/bookstore/model/CartItem.java index e674ad7..d71dc74 100644 --- a/src/main/java/spring/boot/bookstore/model/CartItem.java +++ b/src/main/java/spring/boot/bookstore/model/CartItem.java @@ -26,18 +26,14 @@ public class CartItem { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; - @ManyToOne @JoinColumn(name = "shopping_carts_id", nullable = false) private ShoppingCart shoppingCart; - @OneToOne @JoinColumn(name = "books_id", nullable = false) private Book book; - @Column(name = "quantity", nullable = false) private int quantity; - @Column(name = "is_deleted", nullable = false) private boolean isDeleted = false; } diff --git a/src/main/java/spring/boot/bookstore/model/ShoppingCart.java b/src/main/java/spring/boot/bookstore/model/ShoppingCart.java index 03abb23..7defd92 100644 --- a/src/main/java/spring/boot/bookstore/model/ShoppingCart.java +++ b/src/main/java/spring/boot/bookstore/model/ShoppingCart.java @@ -33,7 +33,6 @@ public class ShoppingCart { @OneToOne @JoinColumn(name = "user_id", nullable = false) private User user; - @ManyToMany @JoinTable(name = "shopping_cart_items", joinColumns = @JoinColumn(name = "shopping_cart_id"), diff --git a/src/main/java/spring/boot/bookstore/repository/CategoryRepository.java b/src/main/java/spring/boot/bookstore/repository/CategoryRepository.java index e8ce6e9..fa31211 100644 --- a/src/main/java/spring/boot/bookstore/repository/CategoryRepository.java +++ b/src/main/java/spring/boot/bookstore/repository/CategoryRepository.java @@ -6,6 +6,5 @@ @Repository public interface CategoryRepository extends JpaRepository { - }