-
Notifications
You must be signed in to change notification settings - Fork 3
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
…-enums Refactor/#76 patch enums
- Loading branch information
Showing
16 changed files
with
106 additions
and
67 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
API-Server/src/main/java/swm/hkcc/LGTM/app/modules/auth/constants/MemberType.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,18 @@ | ||
package swm.hkcc.LGTM.app.modules.auth.constants; | ||
|
||
import swm.hkcc.LGTM.app.modules.auth.exception.UnspecifiedMemberType; | ||
import swm.hkcc.LGTM.app.modules.member.domain.Member; | ||
|
||
public enum MemberType { | ||
JUNIOR, SENIOR; | ||
|
||
public static MemberType getType(Member member) { | ||
if (member.getSenior() != null) { | ||
return SENIOR; | ||
} else if (member.getJunior() != null) { | ||
return JUNIOR; | ||
} else { | ||
throw new UnspecifiedMemberType(); | ||
} | ||
} | ||
} |
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
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
19 changes: 0 additions & 19 deletions
19
API-Server/src/main/java/swm/hkcc/LGTM/app/modules/registration/domain/PersonalStatus.java
This file was deleted.
Oops, something went wrong.
34 changes: 34 additions & 0 deletions
34
API-Server/src/main/java/swm/hkcc/LGTM/app/modules/registration/domain/ProcessStatus.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,34 @@ | ||
package swm.hkcc.LGTM.app.modules.registration.domain; | ||
|
||
import lombok.Getter; | ||
|
||
@Getter | ||
public enum ProcessStatus { | ||
WAITING_FOR_PAYMENT("입금 대기중", 0), | ||
PAYMENT_CONFIRMATION("입금 확인중", 1), | ||
MISSION_PROCEEDING("미션 수행중", 2), | ||
CODE_REVIEW("코드 리뷰 작성", 3), | ||
MISSION_FINISHED("미션 완료!", 4), | ||
FEEDBACK_REVIEWED("리뷰 완료!", 5); | ||
|
||
private final String status; | ||
private final int sequence; | ||
|
||
ProcessStatus(String status, int sequence) { | ||
this.status = status; | ||
this.sequence = sequence; | ||
} | ||
|
||
public boolean isPayed() { | ||
return this.sequence >= MISSION_PROCEEDING.sequence; | ||
} | ||
|
||
public boolean isPullRequestCreated() { | ||
return this.sequence >= CODE_REVIEW.sequence; | ||
} | ||
|
||
public boolean isCompleted() { | ||
return this.sequence >= MISSION_FINISHED.sequence; | ||
} | ||
|
||
} |
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