-
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.
- Loading branch information
Showing
3 changed files
with
107 additions
and
8 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
43 changes: 42 additions & 1 deletion
43
src/main/java/com/ripple/BE/user/domain/type/BusinessType.java
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,3 +1,44 @@ | ||
package com.ripple.BE.user.domain.type; | ||
|
||
public enum BusinessType {} | ||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import com.fasterxml.jackson.annotation.JsonValue; | ||
import java.util.Arrays; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
public enum BusinessType { | ||
FINANCE_INSURANCE("금융/보험"), | ||
IT_SOFTWARE("IT/소프트웨어"), | ||
ELECTRONICS_SEMICONDUCTOR("전자/반도체"), | ||
MANUFACTURING("제조업"), | ||
CONSTRUCTION_REAL_ESTATE("건설/부동산"), | ||
HEALTHCARE_PHARMACEUTICALS("의료/제약"), | ||
EDUCATION_PUBLISHING("교육/출판"), | ||
RETAIL_LOGISTICS("유통/물류"), | ||
ENERGY_ENVIRONMENT("에너지/환경"), | ||
AGRICULTURE_LIVESTOCK("농업/축산업"), | ||
MEDIA_ADVERTISING("미디어/광고"), | ||
TRAVEL_TOURISM("여행/관광"), | ||
GOVERNMENT_NPO("공공기관/비영리단체"), | ||
STARTUP_VENTURE("스타트업/벤처"), | ||
OTHER("기타"); | ||
|
||
private final String description; | ||
|
||
BusinessType(String description) { | ||
this.description = description; | ||
} | ||
|
||
@JsonValue // JSON 응답 시 한글 반환 | ||
public String getDescription() { | ||
return description; | ||
} | ||
|
||
@JsonCreator // JSON 요청 시 한글 값을 Enum으로 변환 | ||
public static BusinessType from(String value) { | ||
return Arrays.stream(BusinessType.values()) | ||
.filter(businessType -> businessType.description.equals(value)) | ||
.findFirst() | ||
.orElseThrow(() -> new IllegalArgumentException("존재하지 않는 업종: " + 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,65 @@ | ||
package com.ripple.BE.user.domain.type; | ||
|
||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import com.fasterxml.jackson.annotation.JsonValue; | ||
import java.util.Arrays; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
public enum Job { | ||
DEVELOPER, | ||
DESIGNER, | ||
ENGINEER | ||
// 전문직 | ||
DOCTOR_NURSE_HEALTHCARE("의사/간호사/보건의료"), | ||
LAWYER_LEGAL("변호사/법무사"), | ||
ACCOUNTANT_TAX_CONSULTANT("회계사/세무사"), | ||
TEACHER_INSTRUCTOR("교사/강사"), | ||
RESEARCHER_PROFESSOR("연구원/교수"), | ||
|
||
// 기업/사무직 | ||
PLANNING_STRATEGY("기획/전략"), | ||
MARKETING_ADVERTISING_PR("마케팅/광고/홍보"), | ||
SALES_BUSINESS_DEVELOPMENT("영업/판매"), | ||
FINANCE_ACCOUNTING("재무/회계"), | ||
HR_TRAINING("인사/교육"), | ||
CUSTOMER_SERVICE_SUPPORT("고객 서비스/상담"), | ||
LEGAL_AUDIT("법무/감사"), | ||
|
||
// IT/기술 | ||
DEVELOPER_FRONTEND_BACKEND("개발자(프론트엔드/백엔드)"), | ||
DATA_ANALYST_ENGINEER("데이터 분석/엔지니어"), | ||
UI_UX_DESIGNER("UI/UX 디자이너"), | ||
NETWORK_SECURITY_EXPERT("네트워크/보안 전문가"), | ||
IT_MANAGER("IT 관리자"), | ||
CONSTRUCTION_CIVIL_ENGINEERING("건설/토목/설계"), | ||
RESEARCH_DEVELOPMENT("연구개발(R&D)"), | ||
|
||
// 서비스/창업 | ||
FOOD_SERVICE_CHEF("외식업/요리사"), | ||
TRAVEL_PLANNER("관광/여행 플래너"), | ||
STARTUP_ENTREPRENEUR("창업/스타트업 운영자"), | ||
FREELANCER("프리랜서"), | ||
|
||
// 기타 | ||
PUBLIC_ADMINISTRATION_OFFICIAL("공공/행정직 공무원"), | ||
MILITARY_POLICE_FIRE_OFFICER("군인/경찰/소방관"), | ||
ENTERTAINER_ARTIST("엔터테이너/예술가"), | ||
OTHER("기타"); | ||
|
||
private final String description; | ||
|
||
Job(String description) { | ||
this.description = description; | ||
} | ||
|
||
@JsonValue | ||
public String getDescription() { | ||
return description; | ||
} | ||
|
||
@JsonCreator | ||
public static Job from(String value) { | ||
return Arrays.stream(Job.values()) | ||
.filter(job -> job.description.equals(value)) | ||
.findFirst() | ||
.orElseThrow(() -> new IllegalArgumentException("존재하지 않는 직무: " + value)); | ||
} | ||
} |