From cc0b5b4c321eb4765264fe4c7583dfd398de0953 Mon Sep 17 00:00:00 2001 From: Subi Hwang Date: Fri, 26 Jan 2024 13:48:53 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20*ListResponseDto=EC=97=90=20id=20?= =?UTF-8?q?=EA=B0=92=20=EC=B6=94=EA=B0=80=20#33?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/AccessoryListResponseDto.java | 25 ++++++++++--------- .../color/dto/ColorListResponseDto.java | 2 ++ .../custom/font/dto/FontListResponseDto.java | 2 ++ .../pattern/dto/PatternListResponseDto.java | 2 ++ .../wheel/dto/WheelListResponseDto.java | 25 ++++++++++--------- 5 files changed, 32 insertions(+), 24 deletions(-) diff --git a/src/main/java/com/endlesshorses/oot/custom/accessory/dto/AccessoryListResponseDto.java b/src/main/java/com/endlesshorses/oot/custom/accessory/dto/AccessoryListResponseDto.java index 07081c7..f64f89a 100644 --- a/src/main/java/com/endlesshorses/oot/custom/accessory/dto/AccessoryListResponseDto.java +++ b/src/main/java/com/endlesshorses/oot/custom/accessory/dto/AccessoryListResponseDto.java @@ -1,7 +1,6 @@ package com.endlesshorses.oot.custom.accessory.dto; import com.endlesshorses.oot.custom.accessory.enity.Accessory; -import jakarta.persistence.Column; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; @@ -9,16 +8,18 @@ @Getter @NoArgsConstructor public class AccessoryListResponseDto { - private String name; - private Long price; - private String imageUrl; - private String explanation; + private Long id; + private String name; + private Long price; + private String imageUrl; + private String explanation; - @Builder - public AccessoryListResponseDto(Accessory accessory) { - this.name = accessory.getName(); - this.price = accessory.getPrice(); - this.imageUrl = accessory.getImageUrl(); - this.explanation = accessory.getExplanation(); - } + @Builder + public AccessoryListResponseDto(Accessory accessory) { + this.id = accessory.getId(); + this.name = accessory.getName(); + this.price = accessory.getPrice(); + this.imageUrl = accessory.getImageUrl(); + this.explanation = accessory.getExplanation(); + } } diff --git a/src/main/java/com/endlesshorses/oot/custom/color/dto/ColorListResponseDto.java b/src/main/java/com/endlesshorses/oot/custom/color/dto/ColorListResponseDto.java index 3d503b1..891b71e 100644 --- a/src/main/java/com/endlesshorses/oot/custom/color/dto/ColorListResponseDto.java +++ b/src/main/java/com/endlesshorses/oot/custom/color/dto/ColorListResponseDto.java @@ -8,11 +8,13 @@ @Getter @NoArgsConstructor public class ColorListResponseDto { + private Long id; private String name; private String rgb; @Builder public ColorListResponseDto(Color color) { + this.id = color.getId(); this.name = color.getName(); this.rgb = color.getRgb(); } diff --git a/src/main/java/com/endlesshorses/oot/custom/font/dto/FontListResponseDto.java b/src/main/java/com/endlesshorses/oot/custom/font/dto/FontListResponseDto.java index 72253fa..e583e1f 100644 --- a/src/main/java/com/endlesshorses/oot/custom/font/dto/FontListResponseDto.java +++ b/src/main/java/com/endlesshorses/oot/custom/font/dto/FontListResponseDto.java @@ -8,12 +8,14 @@ @Getter @NoArgsConstructor public class FontListResponseDto { + private Long id; private String name; private Long price; private String imageUrl; @Builder public FontListResponseDto(Font font) { + this.id = font.getId(); this.name = font.getName(); this.price = font.getPrice(); this.imageUrl = font.getImageUrl(); diff --git a/src/main/java/com/endlesshorses/oot/custom/pattern/dto/PatternListResponseDto.java b/src/main/java/com/endlesshorses/oot/custom/pattern/dto/PatternListResponseDto.java index 7643572..55e739c 100644 --- a/src/main/java/com/endlesshorses/oot/custom/pattern/dto/PatternListResponseDto.java +++ b/src/main/java/com/endlesshorses/oot/custom/pattern/dto/PatternListResponseDto.java @@ -8,6 +8,7 @@ @Getter @NoArgsConstructor public class PatternListResponseDto { + private Long id; private String name; private Long price; private String imageUrl; @@ -15,6 +16,7 @@ public class PatternListResponseDto { @Builder public PatternListResponseDto(Pattern pattern) { + this.id = pattern.getId(); this.name = pattern.getName(); this.price = pattern.getPrice(); this.imageUrl = pattern.getImageUrl(); diff --git a/src/main/java/com/endlesshorses/oot/custom/wheel/dto/WheelListResponseDto.java b/src/main/java/com/endlesshorses/oot/custom/wheel/dto/WheelListResponseDto.java index c435aac..8dcb61c 100644 --- a/src/main/java/com/endlesshorses/oot/custom/wheel/dto/WheelListResponseDto.java +++ b/src/main/java/com/endlesshorses/oot/custom/wheel/dto/WheelListResponseDto.java @@ -8,17 +8,18 @@ @Getter @NoArgsConstructor public class WheelListResponseDto { + private Long id; + private String name; + private Long price; + private String imageUrl; + private String explanation; - private String name; - private Long price; - private String imageUrl; - private String explanation; - - @Builder - public WheelListResponseDto(Wheel wheel) { - this.name = wheel.getName(); - this.price = wheel.getPrice(); - this.imageUrl = wheel.getImageUrl(); - this.explanation = wheel.getExplanation(); - } + @Builder + public WheelListResponseDto(Wheel wheel) { + this.id = wheel.getId(); + this.name = wheel.getName(); + this.price = wheel.getPrice(); + this.imageUrl = wheel.getImageUrl(); + this.explanation = wheel.getExplanation(); + } }