-
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.
Browse files
Browse the repository at this point in the history
Feat/#49 컬러 커버 이미지 설정 기능 추가
- Loading branch information
Showing
15 changed files
with
148 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
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
40 changes: 40 additions & 0 deletions
40
src/main/java/com/pyro/yolog/domain/trip/entity/ColorCover.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,40 @@ | ||
package com.pyro.yolog.domain.trip.entity; | ||
|
||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import com.pyro.yolog.domain.trip.exception.RequestColorCoverInvalidException; | ||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
|
||
import java.util.stream.Stream; | ||
|
||
@Getter | ||
@RequiredArgsConstructor | ||
public enum ColorCover { | ||
PALE_YELLOW("FFFFB5"), | ||
AQUA_BLUE("D2F5F5"), | ||
PASTEL_BLUE("C6DCE9"), | ||
GRAY_GREEN("9DAAA2"), | ||
PALE_MINT("C6EFDC"), | ||
PALE_PEACH("FED5CF"), | ||
BABY_PINK("FFD1DB"), | ||
BEIGE_BROWN("BBA498"), | ||
IVORY("F2E3C7"), | ||
PALE_OLIVE_GREEN("C4D4B1"), | ||
PALE_GREEN("B2BDA8"), | ||
LIGHT_BROWN("A49D92"), | ||
PALE_AQUA("C6DBDA"), | ||
PALE_CORAL("F1B598"), | ||
LAVENDER("D3C7E6"), | ||
PALE_LILAC("ECD5E3") | ||
; | ||
|
||
private final String code; | ||
|
||
@JsonCreator | ||
public static ColorCover parsing(String inputValue) { | ||
return Stream.of(ColorCover.values()) | ||
.filter(color -> color.getCode().equals(inputValue)) | ||
.findFirst() | ||
.orElseThrow(RequestColorCoverInvalidException::new); | ||
} | ||
} |
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/pyro/yolog/domain/trip/exception/RequestColorCoverInvalidException.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.pyro.yolog.domain.trip.exception; | ||
|
||
import com.pyro.yolog.global.error.ErrorCode; | ||
import com.pyro.yolog.global.error.exception.BusinessException; | ||
|
||
public class RequestColorCoverInvalidException extends BusinessException { | ||
public RequestColorCoverInvalidException() { | ||
super(ErrorCode.REQUEST_COLOR_COVER_INVALID_ERROR); | ||
} | ||
} |
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