Skip to content

Commit

Permalink
add : 3차 세미나 실습 과제_post 조회 record 추가 #7
Browse files Browse the repository at this point in the history
  • Loading branch information
PicturePark1101 committed May 1, 2024
1 parent 99d4503 commit b663aca
Showing 1 changed file with 19 additions and 0 deletions.
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.Member;
import com.example.demo.domain.Post;
import com.example.demo.service.dto.member.MemberFindDto;
import jakarta.validation.constraints.NotBlank;

public record PostFindDto(
String name,

String content

) {
public static PostFindDto of(
Post post
) {
return new PostFindDto(post.getName(), post.getContent());
}
}

0 comments on commit b663aca

Please sign in to comment.