File tree Expand file tree Collapse file tree 3 files changed +16
-20
lines changed
src/main/java/com/threestar/trainus/domain/comment/dto Expand file tree Collapse file tree 3 files changed +16
-20
lines changed Original file line number Diff line number Diff line change 22
33import jakarta .validation .constraints .NotBlank ;
44import jakarta .validation .constraints .Size ;
5- import lombok .Getter ;
65
7- @ Getter
8- public class CommentCreateRequestDto {
6+ public record CommentCreateRequestDto (
97 @ NotBlank (message = "댓글 내용은 필수입니다" )
108 @ Size (max = 255 , message = "댓글은 255자 이내여야 합니다." )
11- private String content ;
12- private Long parentCommentId ;
9+ String content ,
10+ Long parentCommentId
11+ ) {
1312}
Original file line number Diff line number Diff line change 33import java .util .List ;
44
55import lombok .Builder ;
6- import lombok .Getter ;
76
8- @ Getter
97@ Builder
10- public class CommentPageResponseDto {
11-
12- private List < CommentResponseDto > comments ;
13- private Integer count ;
8+ public record CommentPageResponseDto (
9+ List < CommentResponseDto > comments ,
10+ Integer count
11+ ) {
1412}
Original file line number Diff line number Diff line change 33import java .time .LocalDateTime ;
44
55import lombok .Builder ;
6- import lombok .Getter ;
76
8- @ Getter
97@ Builder
10- public class CommentResponseDto {
11- private Long commentId ;
12- private Long userId ;
13- private String content ;
14- private Long parentCommentId ;
15- private Boolean deleted ;
16- private LocalDateTime createdAt ;
8+ public record CommentResponseDto (
9+ Long commentId ,
10+ Long userId ,
11+ String content ,
12+ Long parentCommentId ,
13+ Boolean deleted ,
14+ LocalDateTime createdAt
15+ ) {
1716}
You can’t perform that action at this time.
0 commit comments