-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #88 from YAPP-Github/feature/like-hate
좋아요 싫어요 개선
- Loading branch information
Showing
9 changed files
with
114 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
src/main/java/com/pyonsnalcolor/product/dto/ReviewRequestDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.pyonsnalcolor.product.dto; | ||
|
||
import com.pyonsnalcolor.product.enumtype.Like; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Data | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class ReviewRequestDto { | ||
private Like taste; //맛 | ||
private Like quality; //퀄리티 | ||
private Like valueForMoney; //가성비 | ||
private float score; //별점 | ||
private String contents; //내용 | ||
|
||
private Long writerId; //작성자 <- 이후 기능 확장 고려한 필드 | ||
private String writerName; // 닉네임 | ||
} |
16 changes: 16 additions & 0 deletions
16
src/main/java/com/pyonsnalcolor/product/entity/HateCount.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.pyonsnalcolor.product.entity; | ||
|
||
import lombok.Data; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
@Data | ||
public class HateCount { | ||
private List<Long> writerIds = new ArrayList<>(); | ||
private Long hateCount = 0L; | ||
|
||
public void addWriter(Long writerId) { | ||
this.writerIds.add(writerId); | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
src/main/java/com/pyonsnalcolor/product/entity/LikeCount.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.pyonsnalcolor.product.entity; | ||
|
||
import lombok.Data; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
@Data | ||
public class LikeCount { | ||
private List<Long> writerIds = new ArrayList<>(); | ||
private Long likeCount = 0L; | ||
|
||
public void addWriter(Long writerId) { | ||
this.writerIds.add(writerId); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters