-
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.
Browse files
Browse the repository at this point in the history
Feature/add test(#109)
- Loading branch information
Showing
19 changed files
with
1,896 additions
and
152 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
10 changes: 8 additions & 2 deletions
10
src/main/java/zip/ootd/ootdzip/comment/data/CommentPostReq.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 |
---|---|---|
@@ -1,22 +1,28 @@ | ||
package zip.ootd.ootdzip.comment.data; | ||
|
||
import jakarta.validation.constraints.Max; | ||
import jakarta.validation.constraints.Min; | ||
import jakarta.validation.constraints.NotBlank; | ||
import jakarta.validation.constraints.NotNull; | ||
import jakarta.validation.constraints.Size; | ||
import lombok.Data; | ||
|
||
@Data | ||
public class CommentPostReq { | ||
|
||
@NotNull | ||
@NotNull(message = "OOTD id 값은 필수 입니다.") | ||
private Long ootdId; | ||
|
||
private String taggedUserName; | ||
|
||
private Long commentParentId; | ||
|
||
@NotNull(message = "부모댓글인지 자식댓글인지 값을 알려주어야 합니다.") | ||
private int parentDepth; | ||
@Max(1) | ||
@Min(0) | ||
private Integer parentDepth; | ||
|
||
@NotBlank(message = "댓글 내용은 필수입니다.") | ||
@Size(max = 3000, message = "댓글은 최대 3000자 입니다.") | ||
private String content; | ||
} |
16 changes: 16 additions & 0 deletions
16
src/main/java/zip/ootd/ootdzip/comment/data/CommentPostRes.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,16 @@ | ||
package zip.ootd.ootdzip.comment.data; | ||
|
||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
import zip.ootd.ootdzip.comment.domain.Comment; | ||
|
||
@Data | ||
@NoArgsConstructor | ||
public class CommentPostRes { | ||
|
||
private Long id; | ||
|
||
public CommentPostRes(Comment comment) { | ||
this.id = comment.getId(); | ||
} | ||
} |
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
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
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
Oops, something went wrong.