-
Notifications
You must be signed in to change notification settings - Fork 1
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 #31 from team1-healthy-fb-hackerton/feat/issue-30-…
…item-details #30 아이템 상세 페이지
- Loading branch information
Showing
8 changed files
with
129 additions
and
132 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
54 changes: 0 additions & 54 deletions
54
src/main/java/team1/hackerton/converter/ItemDetailConverter.java
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package team1.hackerton.domain.enums; | ||
|
||
public enum Type { | ||
HEALTHY, CAREFUL, LEAK | ||
} |
38 changes: 38 additions & 0 deletions
38
src/main/java/team1/hackerton/dto/process/ItemDetailProcessDto.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,38 @@ | ||
package team1.hackerton.dto.process; | ||
|
||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Getter | ||
@NoArgsConstructor | ||
|
||
public class ItemDetailProcessDto { | ||
|
||
private Long itemId; | ||
private int zeroSugar; | ||
private int zeroKcal; | ||
private String itemUrl; | ||
private String company; | ||
private String store; | ||
private String name; | ||
private int price; | ||
private String nutritionUrl; | ||
private int like; | ||
private String infoUrl; | ||
|
||
@Builder | ||
public ItemDetailProcessDto(Long itemId, int zeroSugar, int zeroKcal, String itemUrl, String company, String store, String name, int price, String nutritionUrl, int like, String infoUrl) { | ||
this.itemId = itemId; | ||
this.zeroSugar = zeroSugar; | ||
this.zeroKcal = zeroKcal; | ||
this.itemUrl = itemUrl; | ||
this.company = company; | ||
this.store = store; | ||
this.name = name; | ||
this.price = price; | ||
this.nutritionUrl = nutritionUrl; | ||
this.like = like; | ||
this.infoUrl = infoUrl; | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
src/main/java/team1/hackerton/dto/request/CreateGradientRequestDto.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,24 @@ | ||
package team1.hackerton.dto.request; | ||
|
||
|
||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import team1.hackerton.domain.enums.Rate; | ||
import team1.hackerton.domain.enums.Type; | ||
|
||
@Getter | ||
@NoArgsConstructor | ||
public class CreateGradientRequestDto { | ||
|
||
private Type type ; | ||
private String name; | ||
private String description; | ||
private Long itemId; | ||
|
||
public CreateGradientRequestDto(Type type, String name, String description, Long itemId) { | ||
this.type = type; | ||
this.name = name; | ||
this.description = description; | ||
this.itemId = itemId; | ||
} | ||
} |
60 changes: 11 additions & 49 deletions
60
src/main/java/team1/hackerton/dto/response/ItemDetailResponseDto.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 |
---|---|---|
@@ -1,60 +1,22 @@ | ||
package team1.hackerton.dto.response; | ||
|
||
import lombok.Builder; | ||
|
||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import team1.hackerton.domain.Gradient; | ||
import team1.hackerton.dto.process.ItemDetailProcessDto; | ||
|
||
import java.time.LocalDateTime; | ||
import java.util.List; | ||
|
||
@Getter | ||
@NoArgsConstructor | ||
public class ItemDetailResponseDto { | ||
|
||
@Builder | ||
public static class ItemDetailDto{ | ||
|
||
private Long itemId; | ||
|
||
private boolean zeroSugar; | ||
|
||
private boolean zeroKcal; | ||
|
||
private String itemUrl; | ||
|
||
private String company; | ||
|
||
private String store; | ||
|
||
private String name; | ||
|
||
private int price; | ||
|
||
private String nutritionUrl; | ||
|
||
private int gradientCnt; | ||
|
||
private boolean like; | ||
|
||
|
||
private String infoUrl; | ||
|
||
private LocalDateTime createdAt; | ||
|
||
private LocalDateTime updatedAt; | ||
|
||
private List<GradientDto> gradientDto; | ||
} | ||
|
||
@Builder | ||
public static class GradientDto{ | ||
private Long gradientId; | ||
|
||
private Long itemId; | ||
|
||
private String name; | ||
|
||
private String description; | ||
|
||
private int type; | ||
private ItemDetailProcessDto detail; | ||
private List<Gradient> gradientList; | ||
|
||
public ItemDetailResponseDto(ItemDetailProcessDto detail, List<Gradient> gradientList) { | ||
this.detail = detail; | ||
this.gradientList = gradientList; | ||
} | ||
|
||
} |
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