-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2a4b9c2
commit a32c30b
Showing
6 changed files
with
113 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/main/java/com/numberone/backend/domain/comment/dto/request/CreateCommentRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.numberone.backend.domain.comment.dto.request; | ||
|
||
import com.numberone.backend.config.basetime.BaseTimeEntity; | ||
import jakarta.validation.constraints.NotNull; | ||
import lombok.*; | ||
|
||
@ToString | ||
@Builder | ||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@AllArgsConstructor | ||
public class CreateCommentRequest { | ||
|
||
@NotNull | ||
private String content; | ||
|
||
} |
23 changes: 23 additions & 0 deletions
23
src/main/java/com/numberone/backend/domain/comment/dto/response/CreateCommentResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.numberone.backend.domain.comment.dto.response; | ||
|
||
import com.numberone.backend.domain.comment.entity.CommentEntity; | ||
import lombok.*; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
@ToString | ||
@Builder | ||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@AllArgsConstructor | ||
public class CreateCommentResponse { | ||
private LocalDateTime createdAt; | ||
private Long commentId; | ||
|
||
public static CreateCommentResponse of (CommentEntity comment){ | ||
return CreateCommentResponse.builder() | ||
.createdAt(comment.getCreatedAt()) | ||
.commentId(comment.getId()) | ||
.build(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters