Skip to content

Commit

Permalink
feat: 게시글 응답 시 balanceOptionId 반환 구현 (#195)
Browse files Browse the repository at this point in the history
  • Loading branch information
gywns0417 authored Mar 16, 2024
1 parent 11c2a15 commit 652f63a
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
@AllArgsConstructor
public class BalanceOptionDto {

@Schema(description = "선택지 id", example = "1")
private Long balanceOptionId;

@Schema(description = "선택지 제목", example = "선택지 제목1")
private String title;

Expand All @@ -36,6 +39,7 @@ public BalanceOption toEntity(@Nullable File image) {

public static BalanceOptionDto fromEntity(BalanceOption balanceOption) {
BalanceOptionDtoBuilder builder = BalanceOptionDto.builder()
.balanceOptionId(balanceOption.getId())
.title(balanceOption.getTitle())
.description(balanceOption.getDescription());
if (balanceOption.getFile() != null) {
Expand Down

0 comments on commit 652f63a

Please sign in to comment.