-
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
Showing
7 changed files
with
89 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.ripple.BE.user.dto; | ||
|
||
import com.ripple.BE.user.dto.request.UserGoalRequest; | ||
|
||
public record UserGoalDTO(int conceptGoal, int quizGoal, int articleGoal) { | ||
|
||
public static UserGoalDTO toUserGoalDTO(UserGoalRequest userGoalRequest) { | ||
return new UserGoalDTO( | ||
userGoalRequest.conceptGoal(), userGoalRequest.quizGoal(), userGoalRequest.articleGoal()); | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
src/main/java/com/ripple/BE/user/dto/request/UserGoalRequest.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,8 @@ | ||
package com.ripple.BE.user.dto.request; | ||
|
||
import jakarta.validation.constraints.Min; | ||
|
||
public record UserGoalRequest( | ||
@Min(value = 1, message = "1 이상의 값을 입력해주세요.") int conceptGoal, | ||
@Min(value = 1, message = "1 이상의 값을 입력해주세요.") int quizGoal, | ||
@Min(value = 1, message = "1 이상의 값을 입력해주세요.") int articleGoal) {} |
10 changes: 10 additions & 0 deletions
10
src/main/java/com/ripple/BE/user/dto/response/UserGoalResponse.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,10 @@ | ||
package com.ripple.BE.user.dto.response; | ||
|
||
import com.ripple.BE.user.dto.UserGoalDTO; | ||
|
||
public record UserGoalResponse(int conceptGoal, int quizGoal, int articleGoal) { | ||
public static UserGoalResponse toUserGoalResponse(UserGoalDTO userGoalDTO) { | ||
return new UserGoalResponse( | ||
userGoalDTO.conceptGoal(), userGoalDTO.quizGoal(), userGoalDTO.articleGoal()); | ||
} | ||
} |
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