From cbddb15a88c381e261222085530d60ca7c56e269 Mon Sep 17 00:00:00 2001 From: bbbang105 <2018111366@dgu.ac.kr> Date: Thu, 3 Oct 2024 11:19:04 +0900 Subject: [PATCH 1/2] =?UTF-8?q?#65=20[refactor]=20:=20Enum=EC=9D=98=20?= =?UTF-8?q?=ED=8C=A8=ED=82=A4=EC=A7=80=EB=A5=BC=20=EC=9D=B4=EB=8F=99?= =?UTF-8?q?=ED=95=9C=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/side/onetime/domain/Event.java | 2 +- src/main/java/side/onetime/domain/enums/Category.java | 5 +++++ src/main/java/side/onetime/dto/EventDto.java | 2 +- .../java/side/onetime/global/common/constant/Category.java | 5 ----- src/main/java/side/onetime/service/EventService.java | 2 +- src/main/java/side/onetime/service/MemberService.java | 2 +- src/main/java/side/onetime/util/DateUtil.java | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) create mode 100644 src/main/java/side/onetime/domain/enums/Category.java delete mode 100644 src/main/java/side/onetime/global/common/constant/Category.java diff --git a/src/main/java/side/onetime/domain/Event.java b/src/main/java/side/onetime/domain/Event.java index f3ebf5d..b133a7b 100644 --- a/src/main/java/side/onetime/domain/Event.java +++ b/src/main/java/side/onetime/domain/Event.java @@ -5,7 +5,7 @@ import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; -import side.onetime.global.common.constant.Category; +import side.onetime.domain.enums.Category; import side.onetime.global.common.dao.BaseEntity; import java.util.List; diff --git a/src/main/java/side/onetime/domain/enums/Category.java b/src/main/java/side/onetime/domain/enums/Category.java new file mode 100644 index 0000000..f81a772 --- /dev/null +++ b/src/main/java/side/onetime/domain/enums/Category.java @@ -0,0 +1,5 @@ +package side.onetime.domain.enums; + +public enum Category { + DATE, DAY +} diff --git a/src/main/java/side/onetime/dto/EventDto.java b/src/main/java/side/onetime/dto/EventDto.java index 1a7523c..04fc70e 100644 --- a/src/main/java/side/onetime/dto/EventDto.java +++ b/src/main/java/side/onetime/dto/EventDto.java @@ -8,7 +8,7 @@ import lombok.Getter; import lombok.NoArgsConstructor; import side.onetime.domain.*; -import side.onetime.global.common.constant.Category; +import side.onetime.domain.enums.Category; import java.time.LocalTime; import java.util.ArrayList; diff --git a/src/main/java/side/onetime/global/common/constant/Category.java b/src/main/java/side/onetime/global/common/constant/Category.java deleted file mode 100644 index 6c2f895..0000000 --- a/src/main/java/side/onetime/global/common/constant/Category.java +++ /dev/null @@ -1,5 +0,0 @@ -package side.onetime.global.common.constant; - -public enum Category { - DATE, DAY -} diff --git a/src/main/java/side/onetime/service/EventService.java b/src/main/java/side/onetime/service/EventService.java index d81cf53..975a7cc 100644 --- a/src/main/java/side/onetime/service/EventService.java +++ b/src/main/java/side/onetime/service/EventService.java @@ -10,7 +10,7 @@ import side.onetime.exception.EventException; import side.onetime.exception.ScheduleErrorResult; import side.onetime.exception.ScheduleException; -import side.onetime.global.common.constant.Category; +import side.onetime.domain.enums.Category; import side.onetime.repository.*; import side.onetime.util.DateUtil; import side.onetime.util.JwtUtil; diff --git a/src/main/java/side/onetime/service/MemberService.java b/src/main/java/side/onetime/service/MemberService.java index 0af5104..e5255b7 100644 --- a/src/main/java/side/onetime/service/MemberService.java +++ b/src/main/java/side/onetime/service/MemberService.java @@ -9,7 +9,7 @@ import side.onetime.domain.Selection; import side.onetime.dto.MemberDto; import side.onetime.exception.*; -import side.onetime.global.common.constant.Category; +import side.onetime.domain.enums.Category; import side.onetime.repository.EventRepository; import side.onetime.repository.MemberRepository; import side.onetime.repository.ScheduleRepository; diff --git a/src/main/java/side/onetime/util/DateUtil.java b/src/main/java/side/onetime/util/DateUtil.java index 11c96cf..d2d7ab5 100644 --- a/src/main/java/side/onetime/util/DateUtil.java +++ b/src/main/java/side/onetime/util/DateUtil.java @@ -3,7 +3,7 @@ import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Component; import side.onetime.dto.EventDto; -import side.onetime.global.common.constant.Category; +import side.onetime.domain.enums.Category; import java.time.LocalDate; import java.time.LocalDateTime; From 1d60c3d96f8b8c10394c57c867444e8ed9df3d06 Mon Sep 17 00:00:00 2001 From: bbbang105 <2018111366@dgu.ac.kr> Date: Thu, 3 Oct 2024 11:20:18 +0900 Subject: [PATCH 2/2] =?UTF-8?q?#65=20[refactor]=20:=20status=EB=A1=9C=20?= =?UTF-8?q?=ED=8C=A8=ED=82=A4=EC=A7=80=EB=AA=85=EC=9D=84=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD=ED=95=9C=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/side/onetime/controller/EventController.java | 2 +- src/main/java/side/onetime/controller/MemberController.java | 2 +- src/main/java/side/onetime/controller/ScheduleController.java | 2 +- src/main/java/side/onetime/controller/TokenController.java | 2 +- src/main/java/side/onetime/controller/UrlController.java | 2 +- src/main/java/side/onetime/controller/UserController.java | 2 +- .../java/side/onetime/exception/GlobalExceptionHandler.java | 2 +- .../onetime/global/common/{constant => status}/ErrorStatus.java | 2 +- .../global/common/{constant => status}/SuccessStatus.java | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) rename src/main/java/side/onetime/global/common/{constant => status}/ErrorStatus.java (96%) rename src/main/java/side/onetime/global/common/{constant => status}/SuccessStatus.java (98%) diff --git a/src/main/java/side/onetime/controller/EventController.java b/src/main/java/side/onetime/controller/EventController.java index ecd8a1d..51afeb0 100644 --- a/src/main/java/side/onetime/controller/EventController.java +++ b/src/main/java/side/onetime/controller/EventController.java @@ -5,7 +5,7 @@ import org.springframework.web.bind.annotation.*; import side.onetime.dto.EventDto; import side.onetime.global.common.ApiResponse; -import side.onetime.global.common.constant.SuccessStatus; +import side.onetime.global.common.status.SuccessStatus; import side.onetime.service.EventService; import java.util.List; diff --git a/src/main/java/side/onetime/controller/MemberController.java b/src/main/java/side/onetime/controller/MemberController.java index 0901ad7..a40f4c1 100644 --- a/src/main/java/side/onetime/controller/MemberController.java +++ b/src/main/java/side/onetime/controller/MemberController.java @@ -5,7 +5,7 @@ import org.springframework.web.bind.annotation.*; import side.onetime.dto.MemberDto; import side.onetime.global.common.ApiResponse; -import side.onetime.global.common.constant.SuccessStatus; +import side.onetime.global.common.status.SuccessStatus; import side.onetime.service.MemberService; @RestController diff --git a/src/main/java/side/onetime/controller/ScheduleController.java b/src/main/java/side/onetime/controller/ScheduleController.java index 2c23214..ff060e0 100644 --- a/src/main/java/side/onetime/controller/ScheduleController.java +++ b/src/main/java/side/onetime/controller/ScheduleController.java @@ -5,7 +5,7 @@ import org.springframework.web.bind.annotation.*; import side.onetime.dto.ScheduleDto; import side.onetime.global.common.ApiResponse; -import side.onetime.global.common.constant.SuccessStatus; +import side.onetime.global.common.status.SuccessStatus; import side.onetime.service.ScheduleService; import java.util.List; diff --git a/src/main/java/side/onetime/controller/TokenController.java b/src/main/java/side/onetime/controller/TokenController.java index 025ce41..5a2815a 100644 --- a/src/main/java/side/onetime/controller/TokenController.java +++ b/src/main/java/side/onetime/controller/TokenController.java @@ -8,7 +8,7 @@ import org.springframework.web.bind.annotation.RestController; import side.onetime.dto.TokenDto; import side.onetime.global.common.ApiResponse; -import side.onetime.global.common.constant.SuccessStatus; +import side.onetime.global.common.status.SuccessStatus; import side.onetime.service.TokenService; @RestController diff --git a/src/main/java/side/onetime/controller/UrlController.java b/src/main/java/side/onetime/controller/UrlController.java index 1979168..0a118f4 100644 --- a/src/main/java/side/onetime/controller/UrlController.java +++ b/src/main/java/side/onetime/controller/UrlController.java @@ -8,7 +8,7 @@ import org.springframework.web.bind.annotation.RestController; import side.onetime.dto.UrlDto; import side.onetime.global.common.ApiResponse; -import side.onetime.global.common.constant.SuccessStatus; +import side.onetime.global.common.status.SuccessStatus; import side.onetime.service.UrlService; @RestController diff --git a/src/main/java/side/onetime/controller/UserController.java b/src/main/java/side/onetime/controller/UserController.java index 7af1ffe..e91116b 100644 --- a/src/main/java/side/onetime/controller/UserController.java +++ b/src/main/java/side/onetime/controller/UserController.java @@ -5,7 +5,7 @@ import org.springframework.web.bind.annotation.*; import side.onetime.dto.UserDto; import side.onetime.global.common.ApiResponse; -import side.onetime.global.common.constant.SuccessStatus; +import side.onetime.global.common.status.SuccessStatus; import side.onetime.service.UserService; @RestController diff --git a/src/main/java/side/onetime/exception/GlobalExceptionHandler.java b/src/main/java/side/onetime/exception/GlobalExceptionHandler.java index fa2a7d6..dc63348 100644 --- a/src/main/java/side/onetime/exception/GlobalExceptionHandler.java +++ b/src/main/java/side/onetime/exception/GlobalExceptionHandler.java @@ -7,7 +7,7 @@ import org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler; import side.onetime.global.common.ApiResponse; import side.onetime.global.common.code.BaseErrorCode; -import side.onetime.global.common.constant.ErrorStatus; +import side.onetime.global.common.status.ErrorStatus; import side.onetime.global.common.dto.ErrorReasonDto; @RestControllerAdvice diff --git a/src/main/java/side/onetime/global/common/constant/ErrorStatus.java b/src/main/java/side/onetime/global/common/status/ErrorStatus.java similarity index 96% rename from src/main/java/side/onetime/global/common/constant/ErrorStatus.java rename to src/main/java/side/onetime/global/common/status/ErrorStatus.java index ba85721..3aefbf3 100644 --- a/src/main/java/side/onetime/global/common/constant/ErrorStatus.java +++ b/src/main/java/side/onetime/global/common/status/ErrorStatus.java @@ -1,4 +1,4 @@ -package side.onetime.global.common.constant; +package side.onetime.global.common.status; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/side/onetime/global/common/constant/SuccessStatus.java b/src/main/java/side/onetime/global/common/status/SuccessStatus.java similarity index 98% rename from src/main/java/side/onetime/global/common/constant/SuccessStatus.java rename to src/main/java/side/onetime/global/common/status/SuccessStatus.java index 8d03d01..57455bd 100644 --- a/src/main/java/side/onetime/global/common/constant/SuccessStatus.java +++ b/src/main/java/side/onetime/global/common/status/SuccessStatus.java @@ -1,4 +1,4 @@ -package side.onetime.global.common.constant; +package side.onetime.global.common.status; import lombok.AllArgsConstructor; import lombok.Getter;