Skip to content

Commit

Permalink
add : 3차 세미나 실습 과제_ PostFindDto를 요소로 가지는 ListDto 구현 #7
Browse files Browse the repository at this point in the history
  • Loading branch information
PicturePark1101 committed May 1, 2024
1 parent 3305c4f commit 0bdefff
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
Binary file not shown.
Binary file modified week02/seminar/demo/.gradle/8.7/fileHashes/fileHashes.lock
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.example.demo.service.dto.post;

import com.example.demo.domain.Post;
import java.util.List;

public record PostListFindDto(
List<PostFindDto> postList

) {
public static PostListFindDto of(
List<Post> posts
) {
List<PostFindDto> postFindDtoList = posts.stream()
.map(PostFindDto::of)
.toList();
return new PostListFindDto(postFindDtoList);
}
}

0 comments on commit 0bdefff

Please sign in to comment.