Skip to content

Commit

Permalink
Merge pull request #34 from endless-horses/fix#33-add-id
Browse files Browse the repository at this point in the history
*ListResponseDto에 id 값 추가 close #33
  • Loading branch information
SubiHwang authored Jan 26, 2024
2 parents 6ab03da + cc0b5b4 commit d8a2db2
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 24 deletions.
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
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;

@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();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@
@Getter
@NoArgsConstructor
public class PatternListResponseDto {
private Long id;
private String name;
private Long price;
private String imageUrl;
private String explanation;

@Builder
public PatternListResponseDto(Pattern pattern) {
this.id = pattern.getId();
this.name = pattern.getName();
this.price = pattern.getPrice();
this.imageUrl = pattern.getImageUrl();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}

0 comments on commit d8a2db2

Please sign in to comment.