-
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.
Browse files
Browse the repository at this point in the history
[refactor] enumValid 어노테이션 User + CS 도메인 적용
- Loading branch information
Showing
12 changed files
with
34 additions
and
33 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
2 changes: 1 addition & 1 deletion
2
...n/kotlin/com/psr/psr/cs/dto/FaqListRes.kt → ...com/psr/psr/cs/dto/response/FaqListRes.kt
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
2 changes: 1 addition & 1 deletion
2
src/main/kotlin/com/psr/psr/cs/dto/FaqRes.kt → ...lin/com/psr/psr/cs/dto/response/FaqRes.kt
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
2 changes: 1 addition & 1 deletion
2
...otlin/com/psr/psr/cs/dto/NoticeListRes.kt → .../psr/psr/cs/dto/response/NoticeListRes.kt
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
2 changes: 1 addition & 1 deletion
2
...in/kotlin/com/psr/psr/cs/dto/NoticeRes.kt → .../com/psr/psr/cs/dto/response/NoticeRes.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
package com.psr.psr.user.dto | ||
|
||
import com.psr.psr.global.resolver.EnumValid | ||
import com.psr.psr.user.entity.Category | ||
|
||
data class UserInterestDto ( | ||
@EnumValid(enumClass = Category::class, message = "올바르지 않은 상품 카테고리입니다.") | ||
val category: String | ||
){ | ||
fun checkInterestCategory() : Category{ | ||
return Category.getCategoryByName(category) | ||
} | ||
} | ||
) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,17 @@ | ||
package com.psr.psr.user.entity | ||
|
||
import com.psr.psr.global.exception.BaseException | ||
import com.psr.psr.global.exception.BaseResponseCode | ||
import com.psr.psr.global.resolver.EnumType | ||
|
||
|
||
enum class Type(val value: String) { | ||
enum class Type(override val value: String) : EnumType { | ||
GENERAL("일반"), | ||
ENTREPRENEUR("사업자"), | ||
SHOW_HOST("쇼호스트"), | ||
MANAGER("관리자"); | ||
|
||
companion object { | ||
fun getTypeByName(name: String): Type { | ||
return enumValues<Type>().find { it.value == name } | ||
?: throw BaseException(BaseResponseCode.INVALID_USER_TYPE_NAME) | ||
fun getTypeByValue(value: String): Type { | ||
return enumValues<Type>().find { it.value == 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