Skip to content

Commit

Permalink
[BE] refactor: Product의 reviewCount 자료형을 Long으로 변경 (#661)
Browse files Browse the repository at this point in the history
  • Loading branch information
hanueleee authored Sep 18, 2023
1 parent 2cce208 commit d547a3d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backend/src/main/java/com/funeat/product/domain/Product.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class Product {
@OneToMany(mappedBy = "product")
private List<ProductBookmark> productBookmarks;

private AtomicLong reviewCount = new AtomicLong(0);
private Long reviewCount = 0L;

protected Product() {
}
Expand Down Expand Up @@ -112,10 +112,10 @@ public Category getCategory() {
}

public Long getReviewCount() {
return reviewCount.get();
return reviewCount;
}

public void addReviewCount() {
reviewCount.incrementAndGet();
reviewCount++;
}
}

0 comments on commit d547a3d

Please sign in to comment.