-
Notifications
You must be signed in to change notification settings - Fork 1
[Feat] 기획 변경에 따른 온보딩 API 수정 #196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
d472511
[feat] #186 Member 엔티티에 산업필드, 준비상태 필드 추가 및 수정 메서드 변경
eraser502 78c587b
[feat] #186 온보딩 v2 API 구현 및 관련 DTO 추가
eraser502 cccad4b
[feat] #186 산업필드 및 대학 리스트 조회 API 구현
eraser502 c0aedf6
[feat] #186 대학 리스트 중 오타 수정
eraser502 e74f0ac
[feat] #186 온보딩 V2 API 필터 허용 리스트에 추가
eraser502 1d5b1ce
[feat] #186 온보딩 DTO에 관심 분야 제약 조건 추가
eraser502 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
34 changes: 34 additions & 0 deletions
34
src/main/java/org/sopt/kareer/domain/member/controller/MemberControllerV2.java
This file contains hidden or 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,34 @@ | ||
| package org.sopt.kareer.domain.member.controller; | ||
|
|
||
| import io.swagger.v3.oas.annotations.Operation; | ||
| import io.swagger.v3.oas.annotations.tags.Tag; | ||
| import jakarta.validation.Valid; | ||
| import lombok.RequiredArgsConstructor; | ||
| import org.sopt.kareer.domain.member.dto.request.*; | ||
| import org.sopt.kareer.domain.member.service.MemberService; | ||
| import org.sopt.kareer.global.annotation.CustomExceptionDescription; | ||
| import org.sopt.kareer.global.config.swagger.SwaggerResponseDescription; | ||
| import org.sopt.kareer.global.response.BaseResponse; | ||
| import org.springframework.http.*; | ||
| import org.springframework.security.core.annotation.AuthenticationPrincipal; | ||
| import org.springframework.web.bind.annotation.*; | ||
|
|
||
| @RestController | ||
| @RequiredArgsConstructor | ||
| @RequestMapping("/api/v2/members") | ||
| @Tag(name = "Member API V2", description = "회원 API 버전 2") | ||
| public class MemberControllerV2 { | ||
|
|
||
| private final MemberService memberService; | ||
|
|
||
| @PostMapping("/onboard") | ||
| @Operation(summary = "회원 온보딩 V2", description = "PENDING 상태의 회원의 온보딩 결과를 저장합니다.") | ||
| @CustomExceptionDescription(SwaggerResponseDescription.MEMBER_ONBOARD) | ||
| public ResponseEntity<BaseResponse<Void>> onboardMember(@AuthenticationPrincipal Long memberId, | ||
| @Valid @RequestBody MemberOnboardV2Request request) { | ||
| memberService.onboardMemberV2(request, memberId); | ||
| return ResponseEntity | ||
| .status(HttpStatus.OK) | ||
| .body(BaseResponse.ok("회원 온보딩이 완료되었습니다.")); | ||
| } | ||
| } | ||
77 changes: 77 additions & 0 deletions
77
src/main/java/org/sopt/kareer/domain/member/dto/request/MemberOnboardV2Request.java
This file contains hidden or 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,77 @@ | ||
| package org.sopt.kareer.domain.member.dto.request; | ||
|
|
||
| import io.swagger.v3.oas.annotations.media.Schema; | ||
| import jakarta.validation.constraints.*; | ||
| import java.time.LocalDate; | ||
| import java.util.List; | ||
| import org.sopt.kareer.domain.member.entity.enums.*; | ||
|
|
||
| public record MemberOnboardV2Request( | ||
| @NotBlank(message = "이름은 필수 입력값입니다.") | ||
| String name, | ||
|
|
||
| @NotNull(message = "생년월일은 필수 입력값입니다.") | ||
| LocalDate birthDate, | ||
|
|
||
| @NotNull(message = "대학교는 필수 입력값입니다.") | ||
| String university, | ||
|
|
||
| @NotNull(message = "국가는 필수 입력값입니다.") | ||
| Country country, | ||
|
|
||
| @NotNull(message = "언어 능력은 필수 입력값입니다.") | ||
| LanguageLevel languageLevel, | ||
|
|
||
| @NotNull(message = "영어 능력은 필수 입력값입니다.") | ||
| EnglishLevel englishLevel, | ||
|
|
||
| @NotNull(message = "학위는 필수 입력값입니다.") | ||
| Degree degree, | ||
|
|
||
| @NotNull(message = "비자 유형은 필수 입력값입니다.") | ||
| VisaType visaType, | ||
|
|
||
| @Schema(description = "예상 졸업일, D2 비자인 경우만", type = "string", format = "date", example = "2025-08-31") | ||
| LocalDate expectedGraduationDate, | ||
|
|
||
| @NotNull(message = "비자 시작일은 필수 입력값입니다.") | ||
| LocalDate visaStartDate, | ||
|
|
||
| @NotNull(message = "비자 만료일은 필수 입력값입니다.") | ||
| LocalDate visaExpiredAt, | ||
|
|
||
| @Schema(description = "비자 점수, D10 비자인 경우만", example = "50") | ||
| Integer visaPoint, | ||
|
|
||
| @NotBlank(message = "제1전공은 필수 입력값입니다.") | ||
| String primaryMajor, | ||
|
|
||
| String secondaryMajor, | ||
|
|
||
| @NotNull(message = "관심 분야는 필수 입력값입니다.") | ||
| @Size(min = 1, max = 5, message = "관심 분야는 최소 1개, 최대 5개까지 선택할 수 있습니다.") | ||
| List<String> fieldsOfInterests, | ||
|
|
||
| List<String> preparationStatuses, | ||
|
|
||
| @NotBlank(message = "희망 직무는 필수 입력값입니다.") | ||
| String targetJob, | ||
|
|
||
| String targetJobSkill, | ||
|
|
||
| @NotBlank(message = "개인 배경은 필수 입력값입니다.") | ||
| @Size(max = 1000, message = "개인 배경은 최대 1000자까지 입력할 수 있습니다.") | ||
| String personalBackground | ||
| ) { | ||
| @AssertTrue(message = "visaPoint는 D10 비자인 경우에만 입력할 수 있습니다.") | ||
| @Schema(hidden = true) | ||
| public boolean isVisaPointValid() { | ||
| if (visaType == null) { | ||
| return visaPoint == null; | ||
| } | ||
| if (visaType == VisaType.D10) { | ||
| return visaPoint != null; | ||
| } | ||
| return visaPoint == null; | ||
| } | ||
| } |
11 changes: 11 additions & 0 deletions
11
src/main/java/org/sopt/kareer/domain/member/dto/response/OnboardFieldsResponse.java
This file contains hidden or 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,11 @@ | ||
| package org.sopt.kareer.domain.member.dto.response; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| public record OnboardFieldsResponse( | ||
| List<String> fields | ||
| ) { | ||
| public static OnboardFieldsResponse from(List<String> fields) { | ||
| return new OnboardFieldsResponse(fields); | ||
| } | ||
| } |
11 changes: 11 additions & 0 deletions
11
src/main/java/org/sopt/kareer/domain/member/dto/response/OnboardUniversitiesResponse.java
This file contains hidden or 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,11 @@ | ||
| package org.sopt.kareer.domain.member.dto.response; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| public record OnboardUniversitiesResponse( | ||
| List<String> universities | ||
| ) { | ||
| public static OnboardUniversitiesResponse from(List<String> universities) { | ||
| return new OnboardUniversitiesResponse(universities); | ||
| } | ||
| } |
This file contains hidden or 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
72 changes: 72 additions & 0 deletions
72
src/main/java/org/sopt/kareer/domain/member/entity/constants/Field.java
This file contains hidden or 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,72 @@ | ||
| package org.sopt.kareer.domain.member.entity.constants; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| public class Field { | ||
|
|
||
| private Field() { | ||
| } | ||
|
|
||
| public static final List<String> FIELD_LIST = List.of( | ||
| "Automotive", | ||
| "Aerospace", | ||
| "Energy", | ||
| "Oil & Gas", | ||
| "Renewable Energy", | ||
| "Manufacturing", | ||
| "Construction", | ||
| "Engineering", | ||
| "Healthcare", | ||
| "Pharmaceuticals", | ||
| "Biotechnology", | ||
| "Medical Devices", | ||
| "Education", | ||
| "EdTech", | ||
| "Finance", | ||
| "Banking", | ||
| "Insurance", | ||
| "FinTech", | ||
| "Investment & Asset Management", | ||
| "Retail", | ||
| "E-commerce", | ||
| "Consumer Goods", | ||
| "Telecommunications", | ||
| "Media", | ||
| "Entertainment", | ||
| "Gaming", | ||
| "Agriculture", | ||
| "Food & Beverage", | ||
| "Hospitality", | ||
| "Travel & Tourism", | ||
| "Logistics", | ||
| "Supply Chain", | ||
| "Real Estate", | ||
| "Consulting", | ||
| "Legal", | ||
| "Government & Public Sector", | ||
| "Nonprofit & NGO", | ||
| "Information Technology", | ||
| "Software Development", | ||
| "Artificial Intelligence", | ||
| "Data & Analytics", | ||
| "Cybersecurity", | ||
| "Cloud Computing", | ||
| "Blockchain", | ||
| "Internet of Things (IoT)", | ||
| "Robotics", | ||
| "Semiconductors", | ||
| "Electronics", | ||
| "Hardware", | ||
| "Design", | ||
| "Marketing & Advertising", | ||
| "Human Resources", | ||
| "Sports", | ||
| "Fashion & Apparel", | ||
| "Beauty & Cosmetics", | ||
| "Environment", | ||
| "Sustainability", | ||
| "Smart City", | ||
| "Defense", | ||
| "Space Industry" | ||
| ); | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.