From eac2050921cc27522f86d787e4260039a0fabbb7 Mon Sep 17 00:00:00 2001 From: hellozo0 Date: Wed, 31 Jan 2024 01:09:02 +0900 Subject: [PATCH 1/7] =?UTF-8?q?#198=20[refactor]=20=EB=AA=A8=EB=8D=B8=20?= =?UTF-8?q?=ED=9A=8C=EC=9B=90=EA=B0=80=EC=9E=85=20Controller=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/auth/AuthController.java | 20 ----------- .../controller/model/ModelController.java | 35 ++++++++++++++----- 2 files changed, 27 insertions(+), 28 deletions(-) diff --git a/src/main/java/com/moddy/server/controller/auth/AuthController.java b/src/main/java/com/moddy/server/controller/auth/AuthController.java index 4c9d8a90..0f62e9fc 100644 --- a/src/main/java/com/moddy/server/controller/auth/AuthController.java +++ b/src/main/java/com/moddy/server/controller/auth/AuthController.java @@ -5,7 +5,6 @@ import com.moddy.server.common.dto.SuccessNonDataResponse; import com.moddy.server.common.dto.SuccessResponse; import com.moddy.server.common.exception.enums.SuccessCode; -import com.moddy.server.common.util.SmsUtil; import com.moddy.server.config.resolver.kakao.KakaoCode; import com.moddy.server.config.resolver.user.UserId; import com.moddy.server.controller.auth.dto.request.PhoneNumberRequestDto; @@ -14,10 +13,8 @@ import com.moddy.server.controller.auth.dto.response.RegionResponse; import com.moddy.server.controller.designer.dto.request.DesignerCreateRequest; import com.moddy.server.controller.designer.dto.response.UserCreateResponse; -import com.moddy.server.controller.model.dto.request.ModelCreateRequest; import com.moddy.server.service.auth.AuthService; import com.moddy.server.service.designer.DesignerService; -import com.moddy.server.service.model.ModelService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.media.Content; @@ -55,8 +52,6 @@ public class AuthController { private static final String ORIGIN = "origin"; private final AuthService authService; private final DesignerService designerService; - private final ModelService modelService; - private final SmsUtil smsUtil; @Operation(summary = "[KAKAO CODE] 로그인 API") @ApiResponses(value = { @@ -97,21 +92,6 @@ SuccessResponse createDesigner( return SuccessResponse.success(SuccessCode.DESIGNER_CREATE_SUCCESS, designerService.createDesigner(userId, designerInfo, profileImg)); } - @Operation(summary = "[JWT] 모델 회원가입 API", description = "모델 회원가입 API입니다.") - @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "모델 회원가입 성공"), - @ApiResponse(responseCode = "401", description = "인증오류 입니다.", content = @Content(schema = @Schema(implementation = ErrorResponse.class))), - @ApiResponse(responseCode = "404", description = "유효하지 않은 값을 입력했습니다.", content = @Content(schema = @Schema(implementation = ErrorResponse.class))), - @ApiResponse(responseCode = "500", description = "서버 내부 오류", content = @Content(schema = @Schema(implementation = ErrorResponse.class))) - }) - @PostMapping(value = "/signup/model") - @SecurityRequirement(name = "JWT Auth") - public SuccessResponse createModel( - @Parameter(hidden = true) @UserId Long userId, - @Valid @RequestBody ModelCreateRequest modelCreateRequest) { - return SuccessResponse.success(SuccessCode.MODEL_CREATE_SUCCESS, modelService.createModel(userId, modelCreateRequest)); - } - @Operation(summary = "인증번호 요청 API", description = "인증번호 요청 API입니다.") @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "전화번호 인증 요청 성공입니다."), diff --git a/src/main/java/com/moddy/server/controller/model/ModelController.java b/src/main/java/com/moddy/server/controller/model/ModelController.java index 07a771ce..cd1bb283 100644 --- a/src/main/java/com/moddy/server/controller/model/ModelController.java +++ b/src/main/java/com/moddy/server/controller/model/ModelController.java @@ -5,11 +5,14 @@ import com.moddy.server.common.dto.SuccessResponse; import com.moddy.server.common.exception.enums.SuccessCode; import com.moddy.server.config.resolver.user.UserId; +import com.moddy.server.controller.designer.dto.response.UserCreateResponse; import com.moddy.server.controller.model.dto.request.ModelApplicationRequest; +import com.moddy.server.controller.model.dto.request.ModelCreateRequest; import com.moddy.server.controller.model.dto.response.ApplicationUserDetailResponse; import com.moddy.server.controller.model.dto.response.DetailOfferResponse; import com.moddy.server.controller.model.dto.response.ModelMainResponse; import com.moddy.server.controller.model.dto.response.OpenChatResponse; +import com.moddy.server.service.model.ModelRegisterService; import com.moddy.server.service.model.ModelService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; @@ -26,7 +29,7 @@ import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; import org.springframework.web.bind.annotation.RestController; @@ -34,11 +37,27 @@ @RestController @Tag(name = "ModelController") -@RequestMapping("/model") @RequiredArgsConstructor public class ModelController { private final ModelService modelService; + private final ModelRegisterService modelRegisterService; + + @Tag(name = "Auth Controller", description = "로그인 및 회원 가입 관련 API 입니다.") + @Operation(summary = "[JWT] 모델 회원가입 API", description = "모델 회원가입 API입니다.") + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "모델 회원가입 성공"), + @ApiResponse(responseCode = "401", description = "인증오류 입니다.", content = @Content(schema = @Schema(implementation = ErrorResponse.class))), + @ApiResponse(responseCode = "404", description = "유효하지 않은 값을 입력했습니다.", content = @Content(schema = @Schema(implementation = ErrorResponse.class))), + @ApiResponse(responseCode = "500", description = "서버 내부 오류", content = @Content(schema = @Schema(implementation = ErrorResponse.class))) + }) + @PostMapping(value = "/auth/signup/model") + @SecurityRequirement(name = "JWT Auth") + public SuccessResponse createModel( + @Parameter(hidden = true) @UserId Long userId, + @Valid @RequestBody ModelCreateRequest modelCreateRequest) { + return SuccessResponse.success(SuccessCode.MODEL_CREATE_SUCCESS, modelRegisterService.createModel(userId, modelCreateRequest)); + } @Operation(summary = "[JWT] 모델 메인 뷰 조회", description = "모델 메인 뷰 조회 API입니다.") @ApiResponses({ @@ -46,7 +65,7 @@ public class ModelController { @ApiResponse(responseCode = "401", description = "인증 오류 입니다.", content = @Content(schema = @Schema(implementation = ErrorResponse.class))), @ApiResponse(responseCode = "500", description = "서버 내부 오류 입니다.", content = @Content(schema = @Schema(implementation = ErrorResponse.class))), }) - @GetMapping + @GetMapping("/model") @SecurityRequirement(name = "JWT Auth") public SuccessResponse getModelMainInfo( @Parameter(hidden = true) @UserId Long userId, @@ -62,7 +81,7 @@ public SuccessResponse getModelMainInfo( @ApiResponse(responseCode = "404", description = "제안서 아이디가 존재하지 않습니다.", content = @Content(schema = @Schema(implementation = ErrorResponse.class))), @ApiResponse(responseCode = "500", description = "서버 내부 오류 입니다.", content = @Content(schema = @Schema(implementation = ErrorResponse.class))), }) - @GetMapping("/offer/{offerId}") + @GetMapping("/model/offer/{offerId}") @SecurityRequirement(name = "JWT Auth") public SuccessResponse getModelDetailOfferInfo( @Parameter(hidden = true) @UserId Long userId, @@ -76,7 +95,7 @@ public SuccessResponse getModelDetailOfferInfo( @ApiResponse(responseCode = "401", description = "인증 오류 입니다.", content = @Content(schema = @Schema(implementation = ErrorResponse.class))), @ApiResponse(responseCode = "500", description = "서버 내부 오류 입니다.", content = @Content(schema = @Schema(implementation = ErrorResponse.class))), }) - @GetMapping("/{offerId}/agree") + @GetMapping("/model/{offerId}/agree") @SecurityRequirement(name = "JWT Auth") public SuccessResponse getOpenChat( @Parameter(hidden = true) @UserId Long userId, @@ -91,7 +110,7 @@ public SuccessResponse getOpenChat( @ApiResponse(responseCode = "404", description = "제안서 아이디가 존재하지 않습니다.", content = @Content(schema = @Schema(implementation = ErrorResponse.class))), @ApiResponse(responseCode = "500", description = "서버 내부 오류 입니다.", content = @Content(schema = @Schema(implementation = ErrorResponse.class))), }) - @PutMapping("/offer/{offerId}") + @PutMapping("/model/offer/{offerId}") @SecurityRequirement(name = "JWT Auth") public SuccessNonDataResponse acceptOffer( @Parameter(hidden = true) @UserId Long userId, @@ -107,7 +126,7 @@ public SuccessNonDataResponse acceptOffer( @ApiResponse(responseCode = "500", description = "서버 내부 오류 입니다.", content = @Content(schema = @Schema(implementation = ErrorResponse.class))), }) @SecurityRequirement(name = "JWT Auth") - @PostMapping(value = "/application", consumes = {MediaType.APPLICATION_JSON_VALUE, MediaType.MULTIPART_FORM_DATA_VALUE}) + @PostMapping(value = "/model/application", consumes = {MediaType.APPLICATION_JSON_VALUE, MediaType.MULTIPART_FORM_DATA_VALUE}) public SuccessNonDataResponse submitModelApplication( @Parameter(hidden = true) @UserId Long userId, @RequestPart(value = "modelImgUrl", required = false) MultipartFile modelImgUrl, @@ -125,7 +144,7 @@ public SuccessNonDataResponse submitModelApplication( @ApiResponse(responseCode = "500", description = "서버 내부 오류 입니다.", content = @Content(schema = @Schema(implementation = ErrorResponse.class))), }) @SecurityRequirement(name = "JWT Auth") - @GetMapping(value = "/application/user") + @GetMapping(value = "/model/application/user") public SuccessResponse getUserDetailInApplication(@Parameter(hidden = true) @UserId Long userId) { return SuccessResponse.success(SuccessCode.CREATE_MODEL_APPLICATION_SUCCESS, modelService.getUserDetailInApplication(userId)); } From 989a1b588b54bb36811097d86f28efd8863a2f2e Mon Sep 17 00:00:00 2001 From: hellozo0 Date: Wed, 31 Jan 2024 01:10:39 +0900 Subject: [PATCH 2/7] =?UTF-8?q?#198=20[refactor]=20=EC=9C=A0=EC=A0=80?= =?UTF-8?q?=EC=A0=95=EB=B3=B4=20=EC=97=85=EB=8D=B0=EC=9D=B4=ED=8A=B8=20Dto?= =?UTF-8?q?=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../model/dto/request/ModelCreateRequest.java | 10 ++++++++++ .../server/controller/user/dto/UserUpdateDto.java | 13 +++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 src/main/java/com/moddy/server/controller/user/dto/UserUpdateDto.java diff --git a/src/main/java/com/moddy/server/controller/model/dto/request/ModelCreateRequest.java b/src/main/java/com/moddy/server/controller/model/dto/request/ModelCreateRequest.java index 427a3840..0338a9a4 100644 --- a/src/main/java/com/moddy/server/controller/model/dto/request/ModelCreateRequest.java +++ b/src/main/java/com/moddy/server/controller/model/dto/request/ModelCreateRequest.java @@ -2,6 +2,7 @@ import com.moddy.server.common.validation.year.ValidYear; import com.moddy.server.common.validation.prefer_regions.ValidPreferRegions; +import com.moddy.server.controller.user.dto.UserUpdateDto; import com.moddy.server.domain.user.Gender; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.persistence.EnumType; @@ -35,4 +36,13 @@ public record ModelCreateRequest( @ValidPreferRegions List preferRegions ) { + public UserUpdateDto userInfoUpdate() { + return new UserUpdateDto( + this.name(), + this.gender(), + this.phoneNumber(), + this.isMarketingAgree() + ); + } + } diff --git a/src/main/java/com/moddy/server/controller/user/dto/UserUpdateDto.java b/src/main/java/com/moddy/server/controller/user/dto/UserUpdateDto.java new file mode 100644 index 00000000..eb325361 --- /dev/null +++ b/src/main/java/com/moddy/server/controller/user/dto/UserUpdateDto.java @@ -0,0 +1,13 @@ +package com.moddy.server.controller.user.dto; + +import com.moddy.server.domain.user.Gender; +import jakarta.validation.constraints.NotNull; + +@NotNull +public record UserUpdateDto( + String name, + Gender gender, + String phoneNumber, + boolean isMarketingAgree +) { +} From b366f3acc3e5c49a702fabfc3003050169103105 Mon Sep 17 00:00:00 2001 From: hellozo0 Date: Wed, 31 Jan 2024 01:11:28 +0900 Subject: [PATCH 3/7] =?UTF-8?q?#198=20[feat]=20=20ErrorCode=EC=97=90=20?= =?UTF-8?q?=EB=AA=A8=EB=8D=B8=EC=9D=B4=20=EC=9D=B4=EB=AF=B8=20=EC=9E=88?= =?UTF-8?q?=EC=9D=84=20=EA=B2=BD=EC=9A=B0=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/moddy/server/common/exception/enums/ErrorCode.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/moddy/server/common/exception/enums/ErrorCode.java b/src/main/java/com/moddy/server/common/exception/enums/ErrorCode.java index 8a777ca2..91f26dde 100644 --- a/src/main/java/com/moddy/server/common/exception/enums/ErrorCode.java +++ b/src/main/java/com/moddy/server/common/exception/enums/ErrorCode.java @@ -63,6 +63,7 @@ public enum ErrorCode { // 409 Conflict ALREADY_EXIST_USER_EXCEPTION(HttpStatus.CONFLICT, "이미 존재하는 유저입니다."), + ALREADY_EXIST_MODEL_EXCEPTION(HttpStatus.CONFLICT, "이미 존재하는 모델입니다."), ALREADY_EXIST_OFFER_EXCEPTION(HttpStatus.CONFLICT, "이미 존재하는 제안서입니다"), // 500 From d9ce7708f3dc9687e96959ebbb4c5b66699194a0 Mon Sep 17 00:00:00 2001 From: hellozo0 Date: Wed, 31 Jan 2024 01:12:03 +0900 Subject: [PATCH 4/7] =?UTF-8?q?#198=20[refactor]=20PreferRegion=EC=97=90?= =?UTF-8?q?=20Builder=20=EC=82=AC=EC=9A=A9=20=EC=95=88=ED=95=98=EA=B3=A0?= =?UTF-8?q?=20=EC=83=9D=EC=84=B1=EC=9E=90=20=EB=A7=8C=EB=93=A4=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/moddy/server/domain/prefer_region/PreferRegion.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/moddy/server/domain/prefer_region/PreferRegion.java b/src/main/java/com/moddy/server/domain/prefer_region/PreferRegion.java index 338cb86a..befa32cf 100644 --- a/src/main/java/com/moddy/server/domain/prefer_region/PreferRegion.java +++ b/src/main/java/com/moddy/server/domain/prefer_region/PreferRegion.java @@ -37,4 +37,8 @@ public class PreferRegion extends BaseTimeEntity { @NotNull private Region region; + public PreferRegion(Model model, Region region) { + this.model = model; + this.region = region; + } } From d6fa80fad76322a207eed918c433fe4e2fe0160d Mon Sep 17 00:00:00 2001 From: hellozo0 Date: Wed, 31 Jan 2024 01:12:30 +0900 Subject: [PATCH 5/7] =?UTF-8?q?#198=20[refactor]=20=EB=AA=A8=EB=8D=B8=20?= =?UTF-8?q?=ED=9A=8C=EC=9B=90=EA=B0=80=EC=9E=85=20Service=20=EC=98=AE?= =?UTF-8?q?=EA=B8=B0=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 1 + .../service/model/ModelRegisterService.java | 49 +++++++++++++++++++ .../server/service/model/ModelService.java | 24 --------- 3 files changed, 50 insertions(+), 24 deletions(-) diff --git a/build.gradle b/build.gradle index 96a57085..1edc6fe7 100644 --- a/build.gradle +++ b/build.gradle @@ -25,6 +25,7 @@ repositories { } dependencies { + implementation 'org.springframework.boot:spring-boot-starter-data-redis' implementation 'com.squareup.okhttp3:okhttp:4.9.3' diff --git a/src/main/java/com/moddy/server/service/model/ModelRegisterService.java b/src/main/java/com/moddy/server/service/model/ModelRegisterService.java index 3d98a0dc..1938a57e 100644 --- a/src/main/java/com/moddy/server/service/model/ModelRegisterService.java +++ b/src/main/java/com/moddy/server/service/model/ModelRegisterService.java @@ -1,15 +1,64 @@ package com.moddy.server.service.model; +import com.moddy.server.common.exception.enums.ErrorCode; +import com.moddy.server.common.exception.model.ConflictException; +import com.moddy.server.common.exception.model.NotFoundException; +import com.moddy.server.controller.designer.dto.response.UserCreateResponse; +import com.moddy.server.controller.model.dto.request.ModelCreateRequest; +import com.moddy.server.controller.user.dto.UserUpdateDto; +import com.moddy.server.domain.model.Model; import com.moddy.server.domain.model.repository.ModelJpaRepository; +import com.moddy.server.domain.prefer_region.PreferRegion; import com.moddy.server.domain.prefer_region.repository.PreferRegionJpaRepository; +import com.moddy.server.domain.region.Region; +import com.moddy.server.domain.region.repository.RegionJpaRepository; +import com.moddy.server.domain.user.Role; +import com.moddy.server.domain.user.User; +import com.moddy.server.domain.user.repository.UserRepository; +import com.moddy.server.external.s3.S3Service; +import com.moddy.server.service.auth.AuthService; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; + +import static com.moddy.server.common.exception.enums.ErrorCode.USER_NOT_FOUND_EXCEPTION; @Service @RequiredArgsConstructor public class ModelRegisterService { private final PreferRegionJpaRepository preferRegionJpaRepository; private final ModelJpaRepository modelJpaRepository; + private final RegionJpaRepository regionJpaRepository; + private final UserRepository userRepository; + private final S3Service s3Service; + private final AuthService authService; + + @Transactional + public UserCreateResponse createModel(final Long userId, ModelCreateRequest request) { + if (modelJpaRepository.existsById(userId)) throw new ConflictException(ErrorCode.ALREADY_EXIST_MODEL_EXCEPTION); + updateUserInfos(userId, request.userInfoUpdate()); + modelJpaRepository.modelRegister(userId, request.year()); + createModelPreferRegions(userId, request.preferRegions()); + + return authService.createUserToken(userId.toString()); + } + + private void updateUserInfos(final Long userId, final UserUpdateDto userUpdateDto) { + final User user = userRepository.findById(userId).orElseThrow(() -> new NotFoundException(USER_NOT_FOUND_EXCEPTION)); + user.update(userUpdateDto.name(), userUpdateDto.gender(), userUpdateDto.phoneNumber(), userUpdateDto.isMarketingAgree(), s3Service.getDefaultProfileImageUrl(), Role.MODEL); + } + + private void createModelPreferRegions(final Long modelId, final List preferRegions) { + Model model = modelJpaRepository.findById(modelId).orElseThrow(() -> new NotFoundException(ErrorCode.MODEL_NOT_FOUND_EXCEPTION)); + + preferRegions.forEach(preferRegionId -> { + Region region = regionJpaRepository.findById(preferRegionId).orElseThrow(() -> new NotFoundException(ErrorCode.NOT_FOUND_REGION_EXCEPTION)); + PreferRegion preferRegion = new PreferRegion(model, region); + preferRegionJpaRepository.save(preferRegion); + }); + } public void deleteModelInfo(final Long modelId) { deleteModelPreferRegions(modelId); diff --git a/src/main/java/com/moddy/server/service/model/ModelService.java b/src/main/java/com/moddy/server/service/model/ModelService.java index a9b121ae..b9b8fb4a 100644 --- a/src/main/java/com/moddy/server/service/model/ModelService.java +++ b/src/main/java/com/moddy/server/service/model/ModelService.java @@ -61,7 +61,6 @@ public class ModelService { private final ModelJpaRepository modelJpaRepository; - private final UserRepository userRepository; private final DesignerJpaRepository designerJpaRepository; private final HairModelApplicationJpaRepository hairModelApplicationJpaRepository; private final HairServiceOfferJpaRepository hairServiceOfferJpaRepository; @@ -69,9 +68,7 @@ public class ModelService { private final DayOffJpaRepository dayOffJpaRepository; private final PreferHairStyleJpaRepository preferHairStyleJpaRepository; private final PreferRegionJpaRepository preferRegionJpaRepository; - private final RegionJpaRepository regionJpaRepository; private final HairServiceRecordJpaRepository hairServiceRecordJpaRepository; - private final AuthService authService; private final S3Service s3Service; @@ -104,27 +101,6 @@ public ModelMainResponse getModelMainInfo(Long userId, int page, int size) { return new ModelMainResponse(page, size, totalElements, modelApplyStatus, user.getName(), offerResponseList); } - @Transactional - public UserCreateResponse createModel(long userId, ModelCreateRequest request) { - - User user = userRepository.findById(userId).orElseThrow(() -> new NotFoundException(ErrorCode.USER_NOT_FOUND_EXCEPTION)); - - if (modelJpaRepository.existsById(userId)) throw new ConflictException(ErrorCode.ALREADY_EXIST_USER_EXCEPTION); - - user.update(request.name(), request.gender(), request.phoneNumber(), request.isMarketingAgree(), s3Service.getDefaultProfileImageUrl(), Role.MODEL); - - modelJpaRepository.modelRegister(userId, request.year()); - Model model = modelJpaRepository.findById(userId).orElseThrow(() -> new NotFoundException(ErrorCode.MODEL_NOT_FOUND_EXCEPTION)); - - request.preferRegions().stream().forEach(preferRegionId -> { - Region region = regionJpaRepository.findById(preferRegionId).orElseThrow(() -> new NotFoundException(ErrorCode.NOT_FOUND_REGION_EXCEPTION)); - PreferRegion preferRegion = PreferRegion.builder().model(model).region(region).build(); - preferRegionJpaRepository.save(preferRegion); - }); - - return authService.createUserToken(model.getId().toString()); - } - @Transactional public void postApplication(Long userId, MultipartFile modelImgUrl, MultipartFile applicationCaptureImgUrl, ModelApplicationRequest applicationInfo) { From e2d528cb81d38941e0d599ae24183535823116f7 Mon Sep 17 00:00:00 2001 From: hellozo0 Date: Wed, 31 Jan 2024 02:00:41 +0900 Subject: [PATCH 6/7] =?UTF-8?q?#198=20[refactor]=20Swagger=20tag=20?= =?UTF-8?q?=EB=B6=84=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/moddy/server/controller/model/ModelController.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/moddy/server/controller/model/ModelController.java b/src/main/java/com/moddy/server/controller/model/ModelController.java index cd1bb283..de802ea1 100644 --- a/src/main/java/com/moddy/server/controller/model/ModelController.java +++ b/src/main/java/com/moddy/server/controller/model/ModelController.java @@ -36,7 +36,6 @@ import org.springframework.web.multipart.MultipartFile; @RestController -@Tag(name = "ModelController") @RequiredArgsConstructor public class ModelController { @@ -59,6 +58,7 @@ public SuccessResponse createModel( return SuccessResponse.success(SuccessCode.MODEL_CREATE_SUCCESS, modelRegisterService.createModel(userId, modelCreateRequest)); } + @Tag(name = "ModelController") @Operation(summary = "[JWT] 모델 메인 뷰 조회", description = "모델 메인 뷰 조회 API입니다.") @ApiResponses({ @ApiResponse(responseCode = "200", description = "모델 메인뷰 조회 성공", content = @Content(schema = @Schema(implementation = ModelMainResponse.class))), @@ -74,6 +74,7 @@ public SuccessResponse getModelMainInfo( return SuccessResponse.success(SuccessCode.FIND_MODEL_MAIN_INFO_SUCCESS, modelService.getModelMainInfo(userId, page, size)); } + @Tag(name = "ModelController") @Operation(summary = "[JWT] 제안서 상세보기 뷰 조회", description = "제안서 상세보기 API입니다.") @ApiResponses({ @ApiResponse(responseCode = "200", description = "제안서 상세보기 조회 성공", content = @Content(schema = @Schema(implementation = DetailOfferResponse.class))), @@ -89,6 +90,7 @@ public SuccessResponse getModelDetailOfferInfo( return SuccessResponse.success(SuccessCode.FIND_MODEL_DETAIL_OFFER_SUCCESS, modelService.getOfferDetail(userId, offerId)); } + @Tag(name = "ModelController") @Operation(summary = "[JWT] 카카오톡 오픈채팅", description = "지원서 캡처 이미지 및 디자이너 정보 조회입니다") @ApiResponses({ @ApiResponse(responseCode = "200", description = "모델 메인뷰 조회 성공", content = @Content(schema = @Schema(implementation = OpenChatResponse.class))), @@ -103,6 +105,7 @@ public SuccessResponse getOpenChat( return SuccessResponse.success(SuccessCode.OPEN_CHAT_GET_SUCCESS, modelService.getOpenChatInfo(userId, offerId)); } + @Tag(name = "ModelController") @Operation(summary = "[JWT] 디자이너 제안서 승낙하기", description = "디자이너 제안서 승낙하기 API입니다.") @ApiResponses({ @ApiResponse(responseCode = "200", description = "디자이너 제안서 승낙하기"), @@ -119,6 +122,7 @@ public SuccessNonDataResponse acceptOffer( return SuccessNonDataResponse.success(SuccessCode.OFFER_ACCEPT_SUCCESS); } + @Tag(name = "ModelController") @Operation(summary = "[JWT] 모델 지원서 작성", description = "모델 지원서 작성 API입니다.") @ApiResponses({ @ApiResponse(responseCode = "200", description = "모델 지원서 작성 성공"), @@ -136,6 +140,7 @@ public SuccessNonDataResponse submitModelApplication( return SuccessNonDataResponse.success(SuccessCode.CREATE_MODEL_APPLICATION_SUCCESS); } + @Tag(name = "ModelController") @Operation(summary = "[JWT] 모델 지원서 최종 확인 시 유저 정보 조회 API", description = "[모델 뷰] 모델 지원서 최종 확인 시 유저 정보 조회 API 입니다.") @ApiResponses({ @ApiResponse(responseCode = "200", description = "모델 지원서 작성 성공"), From dc279e53f7b72025642eb7fed8898ecfef185392 Mon Sep 17 00:00:00 2001 From: hellozo0 Date: Wed, 31 Jan 2024 15:27:57 +0900 Subject: [PATCH 7/7] =?UTF-8?q?#198=20[refactor]=20=EC=82=AC=EC=9A=A9?= =?UTF-8?q?=ED=95=98=EC=A7=80=20=EC=95=8A=EB=8A=94=20builder=20=EC=96=B4?= =?UTF-8?q?=EB=85=B8=ED=85=8C=EC=9D=B4=EC=85=98=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/moddy/server/domain/prefer_region/PreferRegion.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/com/moddy/server/domain/prefer_region/PreferRegion.java b/src/main/java/com/moddy/server/domain/prefer_region/PreferRegion.java index befa32cf..dde72080 100644 --- a/src/main/java/com/moddy/server/domain/prefer_region/PreferRegion.java +++ b/src/main/java/com/moddy/server/domain/prefer_region/PreferRegion.java @@ -21,7 +21,6 @@ @Getter @NoArgsConstructor @AllArgsConstructor -@SuperBuilder public class PreferRegion extends BaseTimeEntity { @Id @GeneratedValue(strategy = GenerationType.IDENTITY)