-
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.
* [feat] add request, command dto * [feat] imple repository logic * [feat] imple service, refac origin functions * [feat] imple controller * [refac] Applying feedback * [feat] Applying feedback
- Loading branch information
1 parent
ee814a3
commit c833c74
Showing
6 changed files
with
68 additions
and
14 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
13 changes: 13 additions & 0 deletions
13
...va/org/hankki/hankkiserver/api/favorite/controller/request/FavoriteSharedPostRequest.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,13 @@ | ||
package org.hankki.hankkiserver.api.favorite.controller.request; | ||
|
||
import jakarta.validation.constraints.NotBlank; | ||
import jakarta.validation.constraints.Size; | ||
import java.util.List; | ||
|
||
public record FavoriteSharedPostRequest ( | ||
@NotBlank(message = "제목이 비었습니다.") | ||
@Size(max = 18, message = "제목 길이가 18자를 초과했습니다.") | ||
String title, | ||
@Size(min = 1, max = 2, message = "해시태그 리스트 size가 1 이상 2 이하가 아닙니다.") | ||
List<@Size(min = 2, max= 9, message = "해시태그가 # 포함 9자를 초과했습니다.") String> details | ||
) { } |
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
14 changes: 14 additions & 0 deletions
14
.../java/org/hankki/hankkiserver/api/favorite/service/command/FavoriteSharedPostCommand.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,14 @@ | ||
package org.hankki.hankkiserver.api.favorite.service.command; | ||
|
||
import java.util.List; | ||
|
||
public record FavoriteSharedPostCommand ( | ||
long userId, | ||
long sharedFavoriteId, | ||
String title, | ||
List<String> details | ||
) { | ||
public static FavoriteSharedPostCommand of(final long userId, final long sharedFavoriteId, final String title, final List<String> details) { | ||
return new FavoriteSharedPostCommand(userId, sharedFavoriteId, title, details); | ||
} | ||
} |
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