-
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.
[Fix] AnniversaryCategory 디자인 매칭, 친구 조회 userId 누락 #68
- Loading branch information
Showing
15 changed files
with
152 additions
and
58 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
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
57 changes: 57 additions & 0 deletions
57
favor/src/main/java/com/favor/favor/common/enums/CategoryAnniversary.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,57 @@ | ||
package com.favor.favor.common.enums; | ||
|
||
import lombok.Getter; | ||
|
||
public enum CategoryAnniversary { | ||
연인(1), | ||
축하_생일(2), | ||
졸업(3), | ||
합격(4), | ||
입사_승진(5), | ||
이사_집들이(6), | ||
출산(7); | ||
|
||
@Getter | ||
Integer type; | ||
|
||
CategoryAnniversary(Integer type){ | ||
this.type = type; | ||
} | ||
|
||
public static CategoryAnniversary validateType(String category){ | ||
try{ | ||
return CategoryAnniversary.valueOf(category); | ||
}catch(IllegalStateException e){ | ||
throw new IllegalArgumentException(); | ||
} | ||
|
||
} | ||
|
||
public static CategoryAnniversary valueOf(Integer type){ | ||
CategoryAnniversary categoryAnniversary = null; | ||
switch (type){ | ||
case 1: | ||
categoryAnniversary = CategoryAnniversary.연인; | ||
break; | ||
case 2: | ||
categoryAnniversary = CategoryAnniversary.축하_생일; | ||
break; | ||
case 3: | ||
categoryAnniversary = CategoryAnniversary.졸업; | ||
break; | ||
case 4: | ||
categoryAnniversary = CategoryAnniversary.합격; | ||
break; | ||
case 5: | ||
categoryAnniversary = CategoryAnniversary.입사_승진; | ||
break; | ||
case 6: | ||
categoryAnniversary = CategoryAnniversary.이사_집들이; | ||
break; | ||
case 7: | ||
categoryAnniversary = CategoryAnniversary.출산; | ||
break; | ||
} | ||
return categoryAnniversary; | ||
} | ||
} |
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
Oops, something went wrong.