-
Notifications
You must be signed in to change notification settings - Fork 1
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 #44 from BokDoong/image_feature
refactor: 기본 이미지 식별을 위한 OrderStatus 추가
- Loading branch information
Showing
14 changed files
with
104 additions
and
38 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
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
15 changes: 15 additions & 0 deletions
15
src/main/java/hanium/englishfairytale/tale/domain/Image.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
35 changes: 35 additions & 0 deletions
35
src/main/java/hanium/englishfairytale/tale/domain/ImageStatus.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,35 @@ | ||
package hanium.englishfairytale.tale.domain; | ||
|
||
import hanium.englishfairytale.exception.BusinessException; | ||
import hanium.englishfairytale.exception.code.ErrorCode; | ||
|
||
public enum ImageStatus { | ||
CUSTOMIZED("사용자 지정 이미지"), | ||
BASIC_FIRST("기본 이미지1"), | ||
BASIC_SECOND("기본 이미지2"), | ||
BASIC_THIRD("기본 이미지3"), | ||
BASIC_FOURTH("기본 이미지4"), | ||
BASIC_FIFTH("기본 이미지5"); | ||
|
||
private final String status; | ||
|
||
ImageStatus(String status) { | ||
this.status = status; | ||
} | ||
|
||
public static ImageStatus of(String statusStr) { | ||
if (statusStr == null) { | ||
throw new IllegalStateException(); | ||
} | ||
for (ImageStatus is : ImageStatus.values()) { | ||
if (is.status.equals(statusStr)) { | ||
return is; | ||
} | ||
} | ||
throw new BusinessException(ErrorCode.IMAGE_STATUS_NOT_FOUND); | ||
} | ||
|
||
public String getStatus() { | ||
return this.status; | ||
} | ||
} |
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
1 change: 1 addition & 0 deletions
1
src/main/java/hanium/englishfairytale/tale/domain/factory/CreatedTale.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
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