-
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.
Merge pull request #63 from WE-ARE-RACCOONS/RAC-219
RAC-129 refactor : ๊ธฐ์กด ๊ตฌํ ์ ๊ฒ ๋ฐ ์์ ์ฌํญ ์ ์ฉ
- Loading branch information
Showing
28 changed files
with
278 additions
and
279 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
src/main/java/com/postgraduate/domain/auth/application/dto/req/CodeRequest.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,6 @@ | ||
package com.postgraduate.domain.auth.application.dto.req; | ||
|
||
import jakarta.validation.constraints.NotNull; | ||
|
||
public record CodeRequest(@NotNull String code) { | ||
} |
12 changes: 0 additions & 12 deletions
12
src/main/java/com/postgraduate/domain/auth/application/dto/req/KakaoCodeRequest.java
This file was deleted.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
src/main/java/com/postgraduate/domain/auth/application/usecase/SignInUseCase.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.postgraduate.domain.auth.application.usecase; | ||
|
||
import com.postgraduate.domain.auth.application.dto.req.CodeRequest; | ||
import com.postgraduate.domain.auth.application.dto.res.AuthUserResponse; | ||
|
||
public interface SignInUseCase { | ||
AuthUserResponse getUser(CodeRequest request); | ||
} |
20 changes: 20 additions & 0 deletions
20
src/main/java/com/postgraduate/domain/auth/application/usecase/oauth/SelectOauth.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,20 @@ | ||
package com.postgraduate.domain.auth.application.usecase.oauth; | ||
|
||
import com.postgraduate.domain.auth.application.usecase.SignInUseCase; | ||
import com.postgraduate.domain.auth.application.usecase.oauth.kakao.KakaoSignInUseCase; | ||
import com.postgraduate.domain.auth.exception.OauthException; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.stereotype.Component; | ||
|
||
@RequiredArgsConstructor | ||
@Component | ||
public class SelectOauth { | ||
private final KakaoSignInUseCase kakaoSignInUseCase; | ||
|
||
public SignInUseCase selectStrategy(String provider) { | ||
switch (provider) { | ||
case "KAKAO" : return kakaoSignInUseCase; | ||
default: throw new OauthException(); | ||
} | ||
} | ||
} |
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
10 changes: 10 additions & 0 deletions
10
src/main/java/com/postgraduate/domain/auth/exception/OauthException.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.postgraduate.domain.auth.exception; | ||
|
||
import static com.postgraduate.domain.auth.presentation.contant.AuthResponseCode.NONE_PROVIDER; | ||
import static com.postgraduate.domain.auth.presentation.contant.AuthResponseMessage.PROVIDER_NONE; | ||
|
||
public class OauthException extends AuthException{ | ||
public OauthException() { | ||
super(PROVIDER_NONE.getMessage(), NONE_PROVIDER.getCode()); | ||
} | ||
} |
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
20 changes: 2 additions & 18 deletions
20
src/main/java/com/postgraduate/domain/mentoring/application/dto/DoneMentoringInfo.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,21 +1,5 @@ | ||
package com.postgraduate.domain.mentoring.application.dto; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
|
||
|
||
@Getter | ||
@Builder | ||
@AllArgsConstructor | ||
public class DoneMentoringInfo { | ||
private Long mentoringId; | ||
private Long seniorId; | ||
private String profile; | ||
private String nickName; | ||
private String postgradu; | ||
private String major; | ||
private String lab; | ||
private String date; | ||
private int term; | ||
public record DoneMentoringInfo(Long mentoringId, Long seniorId, String profile, String nickName, String postgradu, | ||
String major, String lab, String date, int term) { | ||
} |
17 changes: 2 additions & 15 deletions
17
src/main/java/com/postgraduate/domain/mentoring/application/dto/DoneSeniorMentoringInfo.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,20 +1,7 @@ | ||
package com.postgraduate.domain.mentoring.application.dto; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
|
||
import java.time.LocalDate; | ||
|
||
@Getter | ||
@Builder | ||
@AllArgsConstructor | ||
public class DoneSeniorMentoringInfo { | ||
private Long mentoringId; | ||
private String profile; | ||
private String nickname; | ||
private int term; | ||
private String date; | ||
private LocalDate salaryDate; | ||
private Boolean status; | ||
public record DoneSeniorMentoringInfo(Long mentoringId, String profile, String nickName, int term, String date, | ||
LocalDate salaryDate, Boolean status) { | ||
} |
21 changes: 2 additions & 19 deletions
21
src/main/java/com/postgraduate/domain/mentoring/application/dto/ExpectedMentoringInfo.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,5 @@ | ||
package com.postgraduate.domain.mentoring.application.dto; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
|
||
|
||
@Getter | ||
@Builder | ||
@AllArgsConstructor | ||
public class ExpectedMentoringInfo { | ||
private Long mentoringId; | ||
private Long seniorId; | ||
private String profile; | ||
private String nickName; | ||
private String postgradu; | ||
private String major; | ||
private String lab; | ||
private String date; | ||
private int term; | ||
private String chatLink; | ||
public record ExpectedMentoringInfo(Long mentoringId, Long seniorId, String profile, String nickName, String postgradu, | ||
String major, String lab, String date, int term, String chatLink) { | ||
} |
14 changes: 1 addition & 13 deletions
14
...n/java/com/postgraduate/domain/mentoring/application/dto/ExpectedSeniorMentoringInfo.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,16 +1,4 @@ | ||
package com.postgraduate.domain.mentoring.application.dto; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
@Builder | ||
@AllArgsConstructor | ||
public class ExpectedSeniorMentoringInfo { | ||
private Long mentoringId; | ||
private String profile; | ||
private String nickname; | ||
private int term; | ||
private String date; | ||
public record ExpectedSeniorMentoringInfo(Long mentoringId, String profile, String nickName, int term, String date) { | ||
} |
19 changes: 2 additions & 17 deletions
19
src/main/java/com/postgraduate/domain/mentoring/application/dto/WaitingMentoringInfo.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,20 +1,5 @@ | ||
package com.postgraduate.domain.mentoring.application.dto; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
|
||
|
||
@Getter | ||
@Builder | ||
@AllArgsConstructor | ||
public class WaitingMentoringInfo { | ||
private Long mentoringId; | ||
private Long seniorId; | ||
private String profile; | ||
private String nickName; | ||
private String postgradu; | ||
private String major; | ||
private String lab; | ||
private int term; | ||
public record WaitingMentoringInfo(Long mentoringId, Long seniorId, String profile, String nickName, String postgradu, | ||
String major, String lab, int term) { | ||
} |
14 changes: 1 addition & 13 deletions
14
...in/java/com/postgraduate/domain/mentoring/application/dto/WaitingSeniorMentoringInfo.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,16 +1,4 @@ | ||
package com.postgraduate.domain.mentoring.application.dto; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
@Builder | ||
@AllArgsConstructor | ||
public class WaitingSeniorMentoringInfo { | ||
private Long mentoringId; | ||
private String profile; | ||
private String nickname; | ||
private int term; | ||
private long remainTime; | ||
public record WaitingSeniorMentoringInfo(Long mentoringId, String profile, String nickName, int term, long remainTime) { | ||
} |
16 changes: 2 additions & 14 deletions
16
.../com/postgraduate/domain/mentoring/application/dto/res/SeniorMentoringDetailResponse.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,17 +1,5 @@ | ||
package com.postgraduate.domain.mentoring.application.dto.res; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
|
||
@Builder | ||
@AllArgsConstructor | ||
@Getter | ||
public class SeniorMentoringDetailResponse { | ||
private String profile; | ||
private String nickName; | ||
private String topic; | ||
private String question; | ||
private String[] dates; | ||
private int term; | ||
public record SeniorMentoringDetailResponse(String profile, String nickName, String topic, String question, | ||
String[] dates, int term) { | ||
} |
Oops, something went wrong.