Skip to content

Commit

Permalink
[feat] #15 - invitation DTO에 BankAccount 부분 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
leeseulgi0208 committed Jan 20, 2025
1 parent 1c70182 commit 399002f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
import lombok.NoArgsConstructor;

import java.time.LocalDate;
import java.util.List;

import com.wedit.weditapp.domain.bankAccounts.dto.BankAccountDTO;

@Getter
@NoArgsConstructor
Expand Down Expand Up @@ -41,6 +44,5 @@ public class InvitationCreateRequestDTO {

private boolean accountOption; // 계좌 공개 옵션

// BankAccountDTO 생성 후 활성화
//private List<BankAccountDTO> bankAccounts; // 계좌 정보 리스트
private List<BankAccountDTO> bankAccounts; // 계좌 정보 리스트
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
import lombok.NoArgsConstructor;

import java.time.LocalDate;
import java.util.List;

import com.wedit.weditapp.domain.bankAccounts.dto.BankAccountDTO;

@Getter
@NoArgsConstructor
Expand Down Expand Up @@ -42,6 +45,5 @@ public class InvitationUpdateRequestDTO {

private boolean accountOption; // 계좌 공개 옵션

// BankAccountDTO 생성 후 활성화
//private List<BankAccountDTO> bankAccounts; // 계좌 정보 리스트
private List<BankAccountDTO> bankAccounts; // 계좌 정보 리스트
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package com.wedit.weditapp.domain.invitation.dto.response;

import com.wedit.weditapp.domain.bankAccounts.dto.BankAccountDTO;
import com.wedit.weditapp.domain.invitation.domain.Invitation;
import jakarta.validation.constraints.NotBlank;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;

import java.time.LocalDate;
import java.util.List;

@Getter
@NoArgsConstructor
Expand Down Expand Up @@ -44,13 +46,14 @@ public class InvitationResponseDTO {

private boolean accountOption; // 계좌 공개 옵션

private List<BankAccountDTO> bankAccounts; // 계좌 정보 리스트

// DTO 생성 후 활성화
//private List<BankAccountDTO> bankAccounts; // 계좌 정보 리스트
//private List<GuestbookResponseDTO> guestbooks; // 방명록 리스트

@Builder
private InvitationResponseDTO(String groom, String bride, String groomF, String groomM, String brideF, String brideM, String address, String extraAddress, LocalDate date, String theme, String distribution, boolean guestBookOption, boolean decisionOption, boolean accountOption
//, List<BankAccountDTO> bankAccounts, List<GuestbookResponseDTO> guestbooks
private InvitationResponseDTO(String groom, String bride, String groomF, String groomM, String brideF, String brideM, String address, String extraAddress, LocalDate date, String theme, String distribution, boolean guestBookOption, boolean decisionOption, boolean accountOption, List<BankAccountDTO> bankAccounts
//, List<GuestbookResponseDTO> guestbooks
) {
this.groom = groom;
this.bride = bride;
Expand All @@ -66,12 +69,12 @@ private InvitationResponseDTO(String groom, String bride, String groomF, String
this.guestBookOption = guestBookOption;
this.decisionOption = decisionOption;
this.accountOption = accountOption;
//this.bankAccounts = bankAccounts;
this.bankAccounts = bankAccounts;
//this.guestbooks = guestbooks;
}

public static InvitationResponseDTO from(Invitation invitation
//, List<BankAccountDTO> bankAccounts, List<GuestbookResponseDTO> guestbooks
public static InvitationResponseDTO from(Invitation invitation, List<BankAccountDTO> bankAccounts
//, List<GuestbookResponseDTO> guestbooks
) {
return InvitationResponseDTO.builder()
.groom(invitation.getGroom())
Expand All @@ -88,7 +91,7 @@ public static InvitationResponseDTO from(Invitation invitation
.guestBookOption(invitation.isGuestBookOption())
.decisionOption(invitation.isDecisionOption())
.accountOption(invitation.isAccountOption())
//.bankAccounts(bankAccounts)
.bankAccounts(bankAccounts)
//.guestbooks(guestbooks)
.build();
}
Expand Down

0 comments on commit 399002f

Please sign in to comment.