-
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.
#284 Refactor: Member에 Provider 속성 추가
Showing
6 changed files
with
44 additions
and
22 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
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
33 changes: 33 additions & 0 deletions
33
src/main/java/com/drinkeg/drinkeg/member/enums/Provider.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,33 @@ | ||
package com.drinkeg.drinkeg.member.enums; | ||
|
||
|
||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
import org.hibernate.AssertionFailure; | ||
|
||
@Getter | ||
@RequiredArgsConstructor | ||
public enum Provider { | ||
|
||
KAKAO("Kakao"), | ||
APPLE("Apple"), | ||
DRINKEG("Drinkeg"); | ||
|
||
private final String value; | ||
|
||
@Override | ||
public String toString() { | ||
return this.value; | ||
} | ||
|
||
public static Provider fromValue(String value) { | ||
for (Provider provider : Provider.values()) { | ||
if (provider.value.equalsIgnoreCase(value)) { | ||
return provider; | ||
} | ||
} | ||
throw new IllegalArgumentException("No enum constant " + Provider.class.getCanonicalName() + "." + value); | ||
} | ||
|
||
|
||
} |
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