Skip to content

Commit

Permalink
updated Order & OrderItem
Browse files Browse the repository at this point in the history
  • Loading branch information
fedorovychh committed Jan 3, 2024
1 parent 415c362 commit f171d51
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/com/app/bookstore/model/Order.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public class Order {
private BigDecimal total;
@CreationTimestamp
private LocalDateTime orderDate;
@Column(nullable = false)
private String shippingAddress;
@OneToMany(mappedBy = "order")
@ToString.Exclude
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/app/bookstore/model/OrderItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ public class OrderItem {
@EqualsAndHashCode.Exclude
@JoinColumn(name = "book_id", nullable = false)
private Book book;
@Column(nullable = false)
private int quantity;
@Column(nullable = false)
private BigDecimal price;
@Column(nullable = false)
private boolean isDeleted = false;
Expand Down

0 comments on commit f171d51

Please sign in to comment.