Skip to content

Commit

Permalink
feat [#111] 요청값 전달 DTO 작성
Browse files Browse the repository at this point in the history
  • Loading branch information
ch1hyun committed Jan 18, 2025
1 parent c5243cc commit 4a09cb8
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package org.sopt.confeti.api.user.facade.dto.request;

import org.sopt.confeti.api.user.dto.request.AddTimetableFestivalArtistRequest;

public record AddTimetableFestivalArtiestDTO(
long festivalId
) {
public static AddTimetableFestivalArtiestDTO from(final AddTimetableFestivalArtistRequest addTimetableFestivalArtistRequest) {
return new AddTimetableFestivalArtiestDTO(
addTimetableFestivalArtistRequest.festivalId()
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package org.sopt.confeti.api.user.facade.dto.request;

import java.util.List;
import org.sopt.confeti.api.user.dto.request.AddTimetableFestivalRequest;

public record AddTimetableFestivalDTO(
List<AddTimetableFestivalArtiestDTO> festivals
) {
public static AddTimetableFestivalDTO from(final AddTimetableFestivalRequest addTimetableFestivalRequest) {
return new AddTimetableFestivalDTO(
addTimetableFestivalRequest.festivals().stream()
.map(AddTimetableFestivalArtiestDTO::from)
.toList()
);
}
}

0 comments on commit 4a09cb8

Please sign in to comment.