diff --git a/smeem-api/src/main/java/com/smeem/api/auth/api/AuthApi.java b/smeem-api/src/main/java/com/smeem/api/auth/api/AuthApi.java new file mode 100644 index 00000000..36e3131d --- /dev/null +++ b/smeem-api/src/main/java/com/smeem/api/auth/api/AuthApi.java @@ -0,0 +1,60 @@ +package com.smeem.api.auth.api; + +import com.smeem.api.auth.api.dto.request.SignInRequest; +import com.smeem.api.common.BaseResponse; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.responses.ApiResponses; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; + +import java.security.Principal; + +import static io.swagger.v3.oas.annotations.enums.ParameterIn.HEADER; + +@Tag(name = "[Auth] 인증 관련 API (V2)") +public interface AuthApi { + + @Operation(summary = "소셜 로그인 API") + @Parameter(name = "Authorization", description = "Bearer ${Social Platform Access Token}", in = HEADER, required = true) + @ApiResponses(value = { + @ApiResponse(responseCode = "201", description = "소셜로그인 성공"), + @ApiResponse(responseCode = "4xx", description = "유효하지 않은 요청"), + @ApiResponse(responseCode = "401", description = "유효하지 않은 토큰입니다"), + @ApiResponse(responseCode = "500", description = "서버 내부 오류") + }) + ResponseEntity> signIn(@RequestHeader("Authorization") final String socialAccessToken, @RequestBody SignInRequest request); + + @Operation(summary = "토큰 재발급 API") + @Parameter(name = "Authorization", description = "Bearer ${Smeme Refresh Token}", in = HEADER, required = true) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "토큰 재발급 성공"), + @ApiResponse(responseCode = "401", description = "유효하지 않은 토큰입니다"), + @ApiResponse(responseCode = "500", description = "서버 내부 오류") + }) + ResponseEntity> reissueToken(Principal principal); + + + @Operation(summary = "사용자 로그아웃 API") + @Parameter(name = "Authorization", description = "Bearer ${Smeme Access Token}", in = HEADER, required = true) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "로그아웃 성공"), + @ApiResponse(responseCode = "401", description = "유효하지 않은 토큰입니다"), + @ApiResponse(responseCode = "500", description = "서버 내부 오류") + }) + ResponseEntity> signOut(Principal principal); + + + @Operation(summary = "회원 탈퇴 API") + @Parameter(name = "Authorization", description = "Bearer ${Smeme Access Token}", in = HEADER, required = true) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "회원 탈퇴 성공"), + @ApiResponse(responseCode = "401", description = "유효하지 않은 토큰입니다"), + @ApiResponse(responseCode = "500", description = "서버 내부 오류") + }) + ResponseEntity> withDrawl(Principal principal); + +} diff --git a/smeem-api/src/main/java/com/smeem/api/auth/controller/AuthController.java b/smeem-api/src/main/java/com/smeem/api/auth/api/AuthController.java similarity index 89% rename from smeem-api/src/main/java/com/smeem/api/auth/controller/AuthController.java rename to smeem-api/src/main/java/com/smeem/api/auth/api/AuthController.java index 4fc4ee7a..d0e544de 100644 --- a/smeem-api/src/main/java/com/smeem/api/auth/controller/AuthController.java +++ b/smeem-api/src/main/java/com/smeem/api/auth/api/AuthController.java @@ -1,8 +1,8 @@ -package com.smeem.api.auth.controller; +package com.smeem.api.auth.api; -import com.smeem.api.auth.controller.dto.request.SignInRequest; -import com.smeem.api.auth.controller.dto.response.SignInResponse; -import com.smeem.api.auth.controller.dto.response.token.TokenResponse; +import com.smeem.api.auth.api.dto.request.SignInRequest; +import com.smeem.api.auth.api.dto.response.SignInResponse; +import com.smeem.api.auth.api.dto.response.token.TokenResponse; import com.smeem.api.auth.service.AuthService; import com.smeem.api.auth.service.TokenService; import com.smeem.api.auth.service.dto.request.SignInServiceRequest; diff --git a/smeem-api/src/main/java/com/smeem/api/auth/controller/dto/request/SignInRequest.java b/smeem-api/src/main/java/com/smeem/api/auth/api/dto/request/SignInRequest.java similarity index 81% rename from smeem-api/src/main/java/com/smeem/api/auth/controller/dto/request/SignInRequest.java rename to smeem-api/src/main/java/com/smeem/api/auth/api/dto/request/SignInRequest.java index d05bd87c..a6fa217f 100644 --- a/smeem-api/src/main/java/com/smeem/api/auth/controller/dto/request/SignInRequest.java +++ b/smeem-api/src/main/java/com/smeem/api/auth/api/dto/request/SignInRequest.java @@ -1,4 +1,4 @@ -package com.smeem.api.auth.controller.dto.request; +package com.smeem.api.auth.api.dto.request; import com.fasterxml.jackson.annotation.JsonProperty; import com.smeem.domain.member.model.SocialType; diff --git a/smeem-api/src/main/java/com/smeem/api/auth/controller/dto/response/SignInResponse.java b/smeem-api/src/main/java/com/smeem/api/auth/api/dto/response/SignInResponse.java similarity index 93% rename from smeem-api/src/main/java/com/smeem/api/auth/controller/dto/response/SignInResponse.java rename to smeem-api/src/main/java/com/smeem/api/auth/api/dto/response/SignInResponse.java index a6436ca6..e86d7708 100644 --- a/smeem-api/src/main/java/com/smeem/api/auth/controller/dto/response/SignInResponse.java +++ b/smeem-api/src/main/java/com/smeem/api/auth/api/dto/response/SignInResponse.java @@ -1,4 +1,4 @@ -package com.smeem.api.auth.controller.dto.response; +package com.smeem.api.auth.api.dto.response; import com.smeem.api.auth.service.dto.response.SignInServiceResponse; diff --git a/smeem-api/src/main/java/com/smeem/api/auth/controller/dto/response/token/TokenResponse.java b/smeem-api/src/main/java/com/smeem/api/auth/api/dto/response/token/TokenResponse.java similarity index 89% rename from smeem-api/src/main/java/com/smeem/api/auth/controller/dto/response/token/TokenResponse.java rename to smeem-api/src/main/java/com/smeem/api/auth/api/dto/response/token/TokenResponse.java index d3fe80ae..e607be39 100644 --- a/smeem-api/src/main/java/com/smeem/api/auth/controller/dto/response/token/TokenResponse.java +++ b/smeem-api/src/main/java/com/smeem/api/auth/api/dto/response/token/TokenResponse.java @@ -1,4 +1,4 @@ -package com.smeem.api.auth.controller.dto.response.token; +package com.smeem.api.auth.api.dto.response.token; import com.smeem.api.auth.service.dto.response.TokenServiceResponse; import lombok.AccessLevel; diff --git a/smeem-api/src/main/java/com/smeem/api/auth/service/dto/request/SignInServiceRequest.java b/smeem-api/src/main/java/com/smeem/api/auth/service/dto/request/SignInServiceRequest.java index 7e39be58..33d89e4d 100644 --- a/smeem-api/src/main/java/com/smeem/api/auth/service/dto/request/SignInServiceRequest.java +++ b/smeem-api/src/main/java/com/smeem/api/auth/service/dto/request/SignInServiceRequest.java @@ -1,6 +1,6 @@ package com.smeem.api.auth.service.dto.request; -import com.smeem.api.auth.controller.dto.request.SignInRequest; +import com.smeem.api.auth.api.dto.request.SignInRequest; import com.smeem.domain.member.model.SocialType; import lombok.Builder; diff --git a/smeem-api/src/main/java/com/smeem/api/badge/api/BadgeApi.java b/smeem-api/src/main/java/com/smeem/api/badge/api/BadgeApi.java new file mode 100644 index 00000000..f30aed04 --- /dev/null +++ b/smeem-api/src/main/java/com/smeem/api/badge/api/BadgeApi.java @@ -0,0 +1,28 @@ +package com.smeem.api.badge.api; + +import com.smeem.api.common.BaseResponse; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.responses.ApiResponses; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.ResponseEntity; + +import java.security.Principal; + +import static io.swagger.v3.oas.annotations.enums.ParameterIn.HEADER; + + +@Tag(name = "[Badge] 뱃지 관련 API (V2)") +public interface BadgeApi { + + @Operation(summary = "뱃지 목록 조회 API") + @Parameter(name = "Authorization", description = "Bearer ${Smeme Access Token}", in = HEADER, required = true) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "뱃지 리스트 조회 성공"), + @ApiResponse(responseCode = "4011", description = "유효하지 않은 토큰입니다"), + @ApiResponse(responseCode = "500", description = "서버 내부 오류") + }) + ResponseEntity> getBadges(Principal principal); + +} diff --git a/smeem-api/src/main/java/com/smeem/api/badge/controller/BadgeController.java b/smeem-api/src/main/java/com/smeem/api/badge/api/BadgeController.java similarity index 85% rename from smeem-api/src/main/java/com/smeem/api/badge/controller/BadgeController.java rename to smeem-api/src/main/java/com/smeem/api/badge/api/BadgeController.java index 8b45deaf..d2aa7595 100644 --- a/smeem-api/src/main/java/com/smeem/api/badge/controller/BadgeController.java +++ b/smeem-api/src/main/java/com/smeem/api/badge/api/BadgeController.java @@ -1,6 +1,6 @@ -package com.smeem.api.badge.controller; +package com.smeem.api.badge.api; -import com.smeem.api.badge.controller.dto.response.BadgeListResponse; +import com.smeem.api.badge.api.dto.response.BadgeListResponse; import com.smeem.api.badge.service.BadgeService; import com.smeem.api.common.ApiResponseUtil; import com.smeem.api.common.BaseResponse; @@ -19,10 +19,11 @@ @RestController @RequiredArgsConstructor @RequestMapping("/api/v2/members/badges") -public class BadgeController { +public class BadgeController implements BadgeApi { private final BadgeService badgeService; + @Override @GetMapping public ResponseEntity> getBadges(Principal principal) { val response = BadgeListResponse.from(badgeService.getBadges(Util.getMemberId(principal))); diff --git a/smeem-api/src/main/java/com/smeem/api/badge/controller/dto/response/AcquiredBadgeResponse.java b/smeem-api/src/main/java/com/smeem/api/badge/api/dto/response/AcquiredBadgeResponse.java similarity index 92% rename from smeem-api/src/main/java/com/smeem/api/badge/controller/dto/response/AcquiredBadgeResponse.java rename to smeem-api/src/main/java/com/smeem/api/badge/api/dto/response/AcquiredBadgeResponse.java index 3550c176..adb84840 100644 --- a/smeem-api/src/main/java/com/smeem/api/badge/controller/dto/response/AcquiredBadgeResponse.java +++ b/smeem-api/src/main/java/com/smeem/api/badge/api/dto/response/AcquiredBadgeResponse.java @@ -1,4 +1,4 @@ -package com.smeem.api.badge.controller.dto.response; +package com.smeem.api.badge.api.dto.response; import com.smeem.api.badge.service.dto.response.AcquiredBadgeServiceResponse; import com.smeem.domain.badge.model.BadgeType; diff --git a/smeem-api/src/main/java/com/smeem/api/badge/controller/dto/response/BadgeBaseResponse.java b/smeem-api/src/main/java/com/smeem/api/badge/api/dto/response/BadgeBaseResponse.java similarity index 88% rename from smeem-api/src/main/java/com/smeem/api/badge/controller/dto/response/BadgeBaseResponse.java rename to smeem-api/src/main/java/com/smeem/api/badge/api/dto/response/BadgeBaseResponse.java index e2eca689..ec69911c 100644 --- a/smeem-api/src/main/java/com/smeem/api/badge/controller/dto/response/BadgeBaseResponse.java +++ b/smeem-api/src/main/java/com/smeem/api/badge/api/dto/response/BadgeBaseResponse.java @@ -1,8 +1,7 @@ -package com.smeem.api.badge.controller.dto.response; +package com.smeem.api.badge.api.dto.response; import com.smeem.api.badge.service.dto.response.BadgeBaseServiceResponse; import com.smeem.domain.badge.model.BadgeType; -import lombok.AccessLevel; import lombok.Builder; import static lombok.AccessLevel.PRIVATE; diff --git a/smeem-api/src/main/java/com/smeem/api/badge/controller/dto/response/BadgeListResponse.java b/smeem-api/src/main/java/com/smeem/api/badge/api/dto/response/BadgeListResponse.java similarity index 91% rename from smeem-api/src/main/java/com/smeem/api/badge/controller/dto/response/BadgeListResponse.java rename to smeem-api/src/main/java/com/smeem/api/badge/api/dto/response/BadgeListResponse.java index c4cdf4d4..5853ad7f 100644 --- a/smeem-api/src/main/java/com/smeem/api/badge/controller/dto/response/BadgeListResponse.java +++ b/smeem-api/src/main/java/com/smeem/api/badge/api/dto/response/BadgeListResponse.java @@ -1,4 +1,4 @@ -package com.smeem.api.badge.controller.dto.response; +package com.smeem.api.badge.api.dto.response; import com.smeem.api.badge.service.dto.response.BadgeListServiceResponse; import lombok.*; diff --git a/smeem-api/src/main/java/com/smeem/api/badge/controller/dto/response/BadgeResponse.java b/smeem-api/src/main/java/com/smeem/api/badge/api/dto/response/BadgeResponse.java similarity index 90% rename from smeem-api/src/main/java/com/smeem/api/badge/controller/dto/response/BadgeResponse.java rename to smeem-api/src/main/java/com/smeem/api/badge/api/dto/response/BadgeResponse.java index 597fc313..14620d48 100644 --- a/smeem-api/src/main/java/com/smeem/api/badge/controller/dto/response/BadgeResponse.java +++ b/smeem-api/src/main/java/com/smeem/api/badge/api/dto/response/BadgeResponse.java @@ -1,4 +1,4 @@ -package com.smeem.api.badge.controller.dto.response; +package com.smeem.api.badge.api.dto.response; import com.smeem.api.badge.service.dto.response.BadgeServiceResponse; import lombok.AccessLevel; diff --git a/smeem-api/src/main/java/com/smeem/api/badge/controller/dto/response/BadgeTypeResponse.java b/smeem-api/src/main/java/com/smeem/api/badge/api/dto/response/BadgeTypeResponse.java similarity index 77% rename from smeem-api/src/main/java/com/smeem/api/badge/controller/dto/response/BadgeTypeResponse.java rename to smeem-api/src/main/java/com/smeem/api/badge/api/dto/response/BadgeTypeResponse.java index 37f82495..3ffa1235 100644 --- a/smeem-api/src/main/java/com/smeem/api/badge/controller/dto/response/BadgeTypeResponse.java +++ b/smeem-api/src/main/java/com/smeem/api/badge/api/dto/response/BadgeTypeResponse.java @@ -1,10 +1,7 @@ -package com.smeem.api.badge.controller.dto.response; +package com.smeem.api.badge.api.dto.response; -import com.smeem.api.badge.service.dto.response.BadgeBaseServiceResponse; import com.smeem.api.badge.service.dto.response.BadgeTypeServiceResponse; -import com.smeem.domain.badge.model.Badge; import com.smeem.domain.badge.model.BadgeType; -import com.smeem.domain.member.model.MemberBadge; import lombok.Builder; import java.util.List; diff --git a/smeem-api/src/main/java/com/smeem/api/diary/api/dto/response/DiaryCreateResponse.java b/smeem-api/src/main/java/com/smeem/api/diary/api/dto/response/DiaryCreateResponse.java index dbbe5096..ef66d5cc 100644 --- a/smeem-api/src/main/java/com/smeem/api/diary/api/dto/response/DiaryCreateResponse.java +++ b/smeem-api/src/main/java/com/smeem/api/diary/api/dto/response/DiaryCreateResponse.java @@ -1,6 +1,6 @@ package com.smeem.api.diary.api.dto.response; -import com.smeem.api.badge.controller.dto.response.AcquiredBadgeResponse; +import com.smeem.api.badge.api.dto.response.AcquiredBadgeResponse; import com.smeem.api.diary.service.dto.response.DiaryCreateServiceResponse; import lombok.Builder; diff --git a/smeem-api/src/main/java/com/smeem/api/member/api/MemberApi.java b/smeem-api/src/main/java/com/smeem/api/member/api/MemberApi.java new file mode 100644 index 00000000..6761ca11 --- /dev/null +++ b/smeem-api/src/main/java/com/smeem/api/member/api/MemberApi.java @@ -0,0 +1,71 @@ +package com.smeem.api.member.api; + +import com.smeem.api.common.BaseResponse; +import com.smeem.api.member.api.dto.request.MemberPlanUpdateRequest; +import com.smeem.api.member.api.dto.request.MemberPushUpdateRequest; +import com.smeem.api.member.api.dto.request.MemberUpdateRequest; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.responses.ApiResponses; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.validation.Valid; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestParam; + +import java.security.Principal; + +import static io.swagger.v3.oas.annotations.enums.ParameterIn.HEADER; + +@Tag(name = "[Member] 사용자 관련 API (V2)") +public interface MemberApi { + @Operation(summary = "사용자 프로필 업데이트 API") + @Parameter(name = "Authorization", description = "Bearer ${Smeme Access Token}", in = HEADER, required = true) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "회원 정보 조회 성공"), + @ApiResponse(responseCode = "401", description = "유효하지 않은 토큰입니다"), + @ApiResponse(responseCode = "4xx", description = "유효하지 않은 요청"), + @ApiResponse(responseCode = "500", description = "서버 오류") + }) + ResponseEntity> updateProfile(Principal principal, @RequestBody MemberUpdateRequest request); + + + @Operation(summary = "사용자 프로필 조회 API") + @Parameter(name = "Authorization", description = "Bearer ${Smeme Access Token}", in = HEADER, required = true) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "회원 정보 조회 성공"), + @ApiResponse(responseCode = "401", description = "유효하지 않은 토큰입니다"), + @ApiResponse(responseCode = "500", description = "서버 내부 오류") + }) + ResponseEntity> getProfile(Principal principal); + + @Operation(summary = "사용자 학습 계획 수정 API") + @Parameter(name = "Authorization", description = "Bearer ${Smeme Access Token}", in = HEADER, required = true) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "회원 학습 계획 업데이트 성공"), + @ApiResponse(responseCode = "4xx", description = "유효하지 않은 요청"), + @ApiResponse(responseCode = "401", description = "유효하지 않은 토큰입니다"), + @ApiResponse(responseCode = "500", description = "서버 내부 오류") + }) + ResponseEntity> updateUserPlan(Principal principal, @Valid @RequestBody MemberPlanUpdateRequest request); + + @Operation(summary = "사용자 닉네임 중복체크 수정 API") + @Parameter(name = "Authorization", description = "Bearer ${Smeme Access Token}", in = HEADER, required = true) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "닉네임 중복 검사 성공"), + @ApiResponse(responseCode = "401", description = "유효하지 않은 토큰입니다"), + @ApiResponse(responseCode = "500", description = "서버 내부 오류") + }) + ResponseEntity> checkDuplicatedName(@Parameter(description = "유저 닉네임") @RequestParam String name); + + @Operation(summary = "사용자 학습 계획 수정 API") + @Parameter(name = "Authorization", description = "Bearer ${Smeme Access Token}", in = HEADER, required = true) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "회원 푸시알람 동의여부 업데이트 성공"), + @ApiResponse(responseCode = "401", description = "유효하지 않은 토큰입니다"), + @ApiResponse(responseCode = "500", description = "서버 내부 오류") + }) + ResponseEntity> updateUserPush(Principal principal, @RequestBody MemberPushUpdateRequest request); +} diff --git a/smeem-api/src/main/java/com/smeem/api/member/controller/MemberController.java b/smeem-api/src/main/java/com/smeem/api/member/api/MemberController.java similarity index 79% rename from smeem-api/src/main/java/com/smeem/api/member/controller/MemberController.java rename to smeem-api/src/main/java/com/smeem/api/member/api/MemberController.java index 21c7a276..f8bc4bf2 100644 --- a/smeem-api/src/main/java/com/smeem/api/member/controller/MemberController.java +++ b/smeem-api/src/main/java/com/smeem/api/member/api/MemberController.java @@ -1,13 +1,13 @@ -package com.smeem.api.member.controller; +package com.smeem.api.member.api; import com.smeem.api.common.ApiResponseUtil; import com.smeem.api.common.BaseResponse; -import com.smeem.api.member.controller.dto.request.MemberPlanUpdateRequest; -import com.smeem.api.member.controller.dto.request.MemberPushUpdateRequest; -import com.smeem.api.member.controller.dto.request.MemberUpdateRequest; -import com.smeem.api.member.controller.dto.response.MemberGetResponse; -import com.smeem.api.member.controller.dto.response.MemberNameResponse; -import com.smeem.api.member.controller.dto.response.MemberUpdateResponse; +import com.smeem.api.member.api.dto.request.MemberPlanUpdateRequest; +import com.smeem.api.member.api.dto.request.MemberPushUpdateRequest; +import com.smeem.api.member.api.dto.request.MemberUpdateRequest; +import com.smeem.api.member.api.dto.response.MemberGetResponse; +import com.smeem.api.member.api.dto.response.MemberNameResponse; +import com.smeem.api.member.api.dto.response.MemberUpdateResponse; import com.smeem.api.member.service.MemberService; import com.smeem.api.member.service.dto.request.MemberPushUpdateServiceRequest; import com.smeem.api.member.service.dto.request.MemberUpdatePlanServiceRequest; @@ -27,10 +27,11 @@ @RestController @RequiredArgsConstructor @RequestMapping("/api/v2/members") -public class MemberController { +public class MemberController implements MemberApi { private final MemberService memberService; + @Override @PatchMapping public ResponseEntity> updateProfile(Principal principal, @RequestBody MemberUpdateRequest request) { val response = MemberUpdateResponse.from(memberService.updateUserProfile( @@ -39,24 +40,28 @@ public ResponseEntity> updateProfile(Principal principal, @Reque return ApiResponseUtil.success(SUCCESS_UPDATE_USERNAME, response); } + @Override @GetMapping("/me") public ResponseEntity> getProfile(Principal principal) { val response = MemberGetResponse.from(memberService.getMemberProfile(Util.getMemberId(principal))); return ApiResponseUtil.success(SUCCESS_GET_USER, response); } + @Override @PatchMapping("/plan") public ResponseEntity> updateUserPlan(Principal principal, @Valid @RequestBody MemberPlanUpdateRequest request) { memberService.updateLearningPlan(Util.getMemberId(principal), MemberUpdatePlanServiceRequest.of(request)); return ApiResponseUtil.success(SUCCESS_UPDATE_USER_PLAN); } + @Override @GetMapping("/nickname/check") - public ResponseEntity> checkDuplicatedName(@Parameter(description = "유저 닉네임") @RequestParam String name) { + public ResponseEntity> checkDuplicatedName(@Parameter(description = "유저 닉네임", required = true) @RequestParam String name) { val response = MemberNameResponse.from(memberService.checkDuplicatedName(name)); return ApiResponseUtil.success(SUCCESS_CHECK_DUPLICATED_NAME, response); } + @Override @PatchMapping("/push") public ResponseEntity> updateUserPush(Principal principal, @RequestBody MemberPushUpdateRequest request) { memberService.updateHasAlarm(Util.getMemberId(principal), MemberPushUpdateServiceRequest.of(request)); diff --git a/smeem-api/src/main/java/com/smeem/api/member/controller/dto/UsernameValidator.java b/smeem-api/src/main/java/com/smeem/api/member/api/dto/UsernameValidator.java similarity index 92% rename from smeem-api/src/main/java/com/smeem/api/member/controller/dto/UsernameValidator.java rename to smeem-api/src/main/java/com/smeem/api/member/api/dto/UsernameValidator.java index 8b0418e5..4ecd3858 100644 --- a/smeem-api/src/main/java/com/smeem/api/member/controller/dto/UsernameValidator.java +++ b/smeem-api/src/main/java/com/smeem/api/member/api/dto/UsernameValidator.java @@ -1,4 +1,4 @@ -package com.smeem.api.member.controller.dto; +package com.smeem.api.member.api.dto; import jakarta.validation.ConstraintValidator; import jakarta.validation.ConstraintValidatorContext; diff --git a/smeem-api/src/main/java/com/smeem/api/member/controller/dto/ValidUsername.java b/smeem-api/src/main/java/com/smeem/api/member/api/dto/ValidUsername.java similarity index 87% rename from smeem-api/src/main/java/com/smeem/api/member/controller/dto/ValidUsername.java rename to smeem-api/src/main/java/com/smeem/api/member/api/dto/ValidUsername.java index 6ca432b1..000fcac6 100644 --- a/smeem-api/src/main/java/com/smeem/api/member/controller/dto/ValidUsername.java +++ b/smeem-api/src/main/java/com/smeem/api/member/api/dto/ValidUsername.java @@ -1,4 +1,4 @@ -package com.smeem.api.member.controller.dto; +package com.smeem.api.member.api.dto; import jakarta.validation.Constraint; diff --git a/smeem-api/src/main/java/com/smeem/api/member/controller/dto/request/MemberPlanUpdateRequest.java b/smeem-api/src/main/java/com/smeem/api/member/api/dto/request/MemberPlanUpdateRequest.java similarity index 77% rename from smeem-api/src/main/java/com/smeem/api/member/controller/dto/request/MemberPlanUpdateRequest.java rename to smeem-api/src/main/java/com/smeem/api/member/api/dto/request/MemberPlanUpdateRequest.java index abbc4ea0..a6579e5f 100644 --- a/smeem-api/src/main/java/com/smeem/api/member/controller/dto/request/MemberPlanUpdateRequest.java +++ b/smeem-api/src/main/java/com/smeem/api/member/api/dto/request/MemberPlanUpdateRequest.java @@ -1,4 +1,4 @@ -package com.smeem.api.member.controller.dto.request; +package com.smeem.api.member.api.dto.request; import com.smeem.domain.goal.model.GoalType; diff --git a/smeem-api/src/main/java/com/smeem/api/member/controller/dto/request/MemberPushUpdateRequest.java b/smeem-api/src/main/java/com/smeem/api/member/api/dto/request/MemberPushUpdateRequest.java similarity index 57% rename from smeem-api/src/main/java/com/smeem/api/member/controller/dto/request/MemberPushUpdateRequest.java rename to smeem-api/src/main/java/com/smeem/api/member/api/dto/request/MemberPushUpdateRequest.java index 4e7546ca..bbcf303a 100644 --- a/smeem-api/src/main/java/com/smeem/api/member/controller/dto/request/MemberPushUpdateRequest.java +++ b/smeem-api/src/main/java/com/smeem/api/member/api/dto/request/MemberPushUpdateRequest.java @@ -1,4 +1,4 @@ -package com.smeem.api.member.controller.dto.request; +package com.smeem.api.member.api.dto.request; public record MemberPushUpdateRequest( boolean hasAlarm diff --git a/smeem-api/src/main/java/com/smeem/api/member/controller/dto/request/MemberUpdateRequest.java b/smeem-api/src/main/java/com/smeem/api/member/api/dto/request/MemberUpdateRequest.java similarity index 52% rename from smeem-api/src/main/java/com/smeem/api/member/controller/dto/request/MemberUpdateRequest.java rename to smeem-api/src/main/java/com/smeem/api/member/api/dto/request/MemberUpdateRequest.java index 3870c229..b0469fe2 100644 --- a/smeem-api/src/main/java/com/smeem/api/member/controller/dto/request/MemberUpdateRequest.java +++ b/smeem-api/src/main/java/com/smeem/api/member/api/dto/request/MemberUpdateRequest.java @@ -1,7 +1,7 @@ -package com.smeem.api.member.controller.dto.request; +package com.smeem.api.member.api.dto.request; -import com.smeem.api.member.controller.dto.ValidUsername; +import com.smeem.api.member.api.dto.ValidUsername; public record MemberUpdateRequest( @ValidUsername diff --git a/smeem-api/src/main/java/com/smeem/api/member/controller/dto/request/TrainingTimeRequest.java b/smeem-api/src/main/java/com/smeem/api/member/api/dto/request/TrainingTimeRequest.java similarity index 67% rename from smeem-api/src/main/java/com/smeem/api/member/controller/dto/request/TrainingTimeRequest.java rename to smeem-api/src/main/java/com/smeem/api/member/api/dto/request/TrainingTimeRequest.java index d76e06f8..a126b5c1 100644 --- a/smeem-api/src/main/java/com/smeem/api/member/controller/dto/request/TrainingTimeRequest.java +++ b/smeem-api/src/main/java/com/smeem/api/member/api/dto/request/TrainingTimeRequest.java @@ -1,4 +1,4 @@ -package com.smeem.api.member.controller.dto.request; +package com.smeem.api.member.api.dto.request; public record TrainingTimeRequest( diff --git a/smeem-api/src/main/java/com/smeem/api/member/controller/dto/response/MemberGetResponse.java b/smeem-api/src/main/java/com/smeem/api/member/api/dto/response/MemberGetResponse.java similarity index 90% rename from smeem-api/src/main/java/com/smeem/api/member/controller/dto/response/MemberGetResponse.java rename to smeem-api/src/main/java/com/smeem/api/member/api/dto/response/MemberGetResponse.java index 79746858..6f646edd 100644 --- a/smeem-api/src/main/java/com/smeem/api/member/controller/dto/response/MemberGetResponse.java +++ b/smeem-api/src/main/java/com/smeem/api/member/api/dto/response/MemberGetResponse.java @@ -1,7 +1,7 @@ -package com.smeem.api.member.controller.dto.response; +package com.smeem.api.member.api.dto.response; -import com.smeem.api.badge.controller.dto.response.BadgeResponse; +import com.smeem.api.badge.api.dto.response.BadgeResponse; import com.smeem.api.member.service.dto.response.MemberGetServiceResponse; import lombok.AccessLevel; import lombok.Builder; diff --git a/smeem-api/src/main/java/com/smeem/api/member/controller/dto/response/MemberNameResponse.java b/smeem-api/src/main/java/com/smeem/api/member/api/dto/response/MemberNameResponse.java similarity index 84% rename from smeem-api/src/main/java/com/smeem/api/member/controller/dto/response/MemberNameResponse.java rename to smeem-api/src/main/java/com/smeem/api/member/api/dto/response/MemberNameResponse.java index 607c7942..6449c477 100644 --- a/smeem-api/src/main/java/com/smeem/api/member/controller/dto/response/MemberNameResponse.java +++ b/smeem-api/src/main/java/com/smeem/api/member/api/dto/response/MemberNameResponse.java @@ -1,7 +1,6 @@ -package com.smeem.api.member.controller.dto.response; +package com.smeem.api.member.api.dto.response; import com.smeem.api.member.service.dto.response.MemberNameServiceResponse; -import lombok.AccessLevel; import lombok.Builder; import static lombok.AccessLevel.PRIVATE; diff --git a/smeem-api/src/main/java/com/smeem/api/member/controller/dto/response/MemberUpdateResponse.java b/smeem-api/src/main/java/com/smeem/api/member/api/dto/response/MemberUpdateResponse.java similarity index 81% rename from smeem-api/src/main/java/com/smeem/api/member/controller/dto/response/MemberUpdateResponse.java rename to smeem-api/src/main/java/com/smeem/api/member/api/dto/response/MemberUpdateResponse.java index 4cf15c4c..db181df3 100644 --- a/smeem-api/src/main/java/com/smeem/api/member/controller/dto/response/MemberUpdateResponse.java +++ b/smeem-api/src/main/java/com/smeem/api/member/api/dto/response/MemberUpdateResponse.java @@ -1,7 +1,7 @@ -package com.smeem.api.member.controller.dto.response; +package com.smeem.api.member.api.dto.response; -import com.smeem.api.badge.controller.dto.response.AcquiredBadgeResponse; +import com.smeem.api.badge.api.dto.response.AcquiredBadgeResponse; import com.smeem.api.member.service.dto.response.MemberUpdateServiceResponse; import lombok.Builder; diff --git a/smeem-api/src/main/java/com/smeem/api/member/controller/dto/response/TrainingTimeResponse.java b/smeem-api/src/main/java/com/smeem/api/member/api/dto/response/TrainingTimeResponse.java similarity index 91% rename from smeem-api/src/main/java/com/smeem/api/member/controller/dto/response/TrainingTimeResponse.java rename to smeem-api/src/main/java/com/smeem/api/member/api/dto/response/TrainingTimeResponse.java index 259bc8b9..42feb827 100644 --- a/smeem-api/src/main/java/com/smeem/api/member/controller/dto/response/TrainingTimeResponse.java +++ b/smeem-api/src/main/java/com/smeem/api/member/api/dto/response/TrainingTimeResponse.java @@ -1,4 +1,4 @@ -package com.smeem.api.member.controller.dto.response; +package com.smeem.api.member.api.dto.response; import com.smeem.api.member.service.dto.response.TrainingTimeServiceResponse; import lombok.Builder; diff --git a/smeem-api/src/main/java/com/smeem/api/member/service/dto/request/MemberPushUpdateServiceRequest.java b/smeem-api/src/main/java/com/smeem/api/member/service/dto/request/MemberPushUpdateServiceRequest.java index b49f985d..17e52c92 100644 --- a/smeem-api/src/main/java/com/smeem/api/member/service/dto/request/MemberPushUpdateServiceRequest.java +++ b/smeem-api/src/main/java/com/smeem/api/member/service/dto/request/MemberPushUpdateServiceRequest.java @@ -1,6 +1,6 @@ package com.smeem.api.member.service.dto.request; -import com.smeem.api.member.controller.dto.request.MemberPushUpdateRequest; +import com.smeem.api.member.api.dto.request.MemberPushUpdateRequest; import lombok.Builder; import static lombok.AccessLevel.*; diff --git a/smeem-api/src/main/java/com/smeem/api/member/service/dto/request/MemberServiceUpdateUserProfileRequest.java b/smeem-api/src/main/java/com/smeem/api/member/service/dto/request/MemberServiceUpdateUserProfileRequest.java index aaa08d7d..69ba241d 100644 --- a/smeem-api/src/main/java/com/smeem/api/member/service/dto/request/MemberServiceUpdateUserProfileRequest.java +++ b/smeem-api/src/main/java/com/smeem/api/member/service/dto/request/MemberServiceUpdateUserProfileRequest.java @@ -1,7 +1,7 @@ package com.smeem.api.member.service.dto.request; -import com.smeem.api.member.controller.dto.request.MemberUpdateRequest; +import com.smeem.api.member.api.dto.request.MemberUpdateRequest; import lombok.AccessLevel; import lombok.Builder; diff --git a/smeem-api/src/main/java/com/smeem/api/member/service/dto/request/MemberUpdatePlanServiceRequest.java b/smeem-api/src/main/java/com/smeem/api/member/service/dto/request/MemberUpdatePlanServiceRequest.java index fbdd3190..7ae0ee5a 100644 --- a/smeem-api/src/main/java/com/smeem/api/member/service/dto/request/MemberUpdatePlanServiceRequest.java +++ b/smeem-api/src/main/java/com/smeem/api/member/service/dto/request/MemberUpdatePlanServiceRequest.java @@ -1,6 +1,6 @@ package com.smeem.api.member.service.dto.request; -import com.smeem.api.member.controller.dto.request.MemberPlanUpdateRequest; +import com.smeem.api.member.api.dto.request.MemberPlanUpdateRequest; import com.smeem.domain.goal.model.GoalType; import lombok.Builder; diff --git a/smeem-api/src/main/java/com/smeem/api/member/service/dto/request/TrainingTimeServiceRequest.java b/smeem-api/src/main/java/com/smeem/api/member/service/dto/request/TrainingTimeServiceRequest.java index 4d5b9b83..89fdbf96 100644 --- a/smeem-api/src/main/java/com/smeem/api/member/service/dto/request/TrainingTimeServiceRequest.java +++ b/smeem-api/src/main/java/com/smeem/api/member/service/dto/request/TrainingTimeServiceRequest.java @@ -1,7 +1,7 @@ package com.smeem.api.member.service.dto.request; -import com.smeem.api.member.controller.dto.request.TrainingTimeRequest; +import com.smeem.api.member.api.dto.request.TrainingTimeRequest; import lombok.Builder; import java.util.Objects;