From cabfebbc94134077540f01e2b40cd9671eed4abc Mon Sep 17 00:00:00 2001 From: NaMinhyeok Date: Thu, 6 Feb 2025 20:35:20 +0900 Subject: [PATCH] =?UTF-8?q?[#58]=20feat:=20=ED=82=A4=EC=9B=8C=EB=93=9C=20?= =?UTF-8?q?=EC=9E=AC=EC=A0=95=EC=9D=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [#58] feat: 키워드 재정의 --- ...0\352\264\200 \354\234\240\355\230\225.md" | 49 +++++++++++++++++++ .../domain/survey/model/Keyword.java | 11 ++--- .../survey/model/SurveySubscriptionsTest.java | 4 +- .../SurveySubmissionRepositoryTest.java | 6 +-- .../survey/service/SurveyServiceTest.java | 16 +++--- 5 files changed, 66 insertions(+), 20 deletions(-) create mode 100644 "docs/\352\260\200\354\271\230\352\264\200 \354\234\240\355\230\225.md" diff --git "a/docs/\352\260\200\354\271\230\352\264\200 \354\234\240\355\230\225.md" "b/docs/\352\260\200\354\271\230\352\264\200 \354\234\240\355\230\225.md" new file mode 100644 index 00000000..989ffabc --- /dev/null +++ "b/docs/\352\260\200\354\271\230\352\264\200 \354\234\240\355\230\225.md" @@ -0,0 +1,49 @@ +# 가치관 유형 + +## 기존 유형 +슈왈츠의 보편적 가치 이론에 따라 10가지 유형을 정의하였습니다. +1. 자기주도 +2. 자극 +3. 쾌락 +4. 성취 +5. 권력 +6. 안전 +7. 순응 +8. 전통 +9. 박애 +10. 보편주의 + +## 변경된 유형 +1. 자기주도 +2. 모험 +3. 안전 +4. 안정 +5. 성공 +6. 박애 +7. 보편주의 + +모험 : 쾌락 + 자극 +안정 : 전통 + 순응 +성공 : 권력 + 성취 + +### 해당 유형에 대한 ENUM +```java +public enum Keyword { + SELF_DIRECTION("자기주도"), + ADVENTURE("모험"), + SECURITY("안전"), + STABILITY("안정"), + SUCCESS("성공"), + BENEVOLENCE("박애"), + UNIVERSALISM("보편주의"); + + private final String description; + + Keyword(String description) { + this.description = description; + } +} +``` + +## 변경 사유 +기존의 슈왈츠 보편적 가치이론의 10가지 키워드를 가지고 진행하려고 하였으나 개발 및 디자인 측면에서 어려움이 있어서 다음과 같이 변경하였습니다. \ No newline at end of file diff --git a/jaknaeso-core/src/main/java/org/nexters/jaknaesocore/domain/survey/model/Keyword.java b/jaknaeso-core/src/main/java/org/nexters/jaknaesocore/domain/survey/model/Keyword.java index cba9d2ae..e3a365ef 100644 --- a/jaknaeso-core/src/main/java/org/nexters/jaknaesocore/domain/survey/model/Keyword.java +++ b/jaknaeso-core/src/main/java/org/nexters/jaknaesocore/domain/survey/model/Keyword.java @@ -2,15 +2,12 @@ public enum Keyword { SELF_DIRECTION("자기주도"), - STIMULATION("자극"), - HEDONISM("쾌락"), - ACHIEVEMENT("성취"), - POWER("권력"), + ADVENTURE("모험"), SECURITY("안전"), - CONFORMITY("순응"), - TRADITION("전통"), + STABILITY("안정"), + SUCCESS("성공"), BENEVOLENCE("박애"), - UNIVERSALISM("보편"); + UNIVERSALISM("보편주의"); private final String description; diff --git a/jaknaeso-core/src/test/java/org/nexters/jaknaesocore/domain/survey/model/SurveySubscriptionsTest.java b/jaknaeso-core/src/test/java/org/nexters/jaknaesocore/domain/survey/model/SurveySubscriptionsTest.java index 4d5d195c..e130056e 100644 --- a/jaknaeso-core/src/test/java/org/nexters/jaknaesocore/domain/survey/model/SurveySubscriptionsTest.java +++ b/jaknaeso-core/src/test/java/org/nexters/jaknaesocore/domain/survey/model/SurveySubscriptionsTest.java @@ -24,7 +24,7 @@ void getSubmittedSurvey() { List scores = List.of( - KeywordScore.builder().keyword(Keyword.ACHIEVEMENT).score(BigDecimal.ONE).build(), + KeywordScore.builder().keyword(Keyword.ADVENTURE).score(BigDecimal.ONE).build(), KeywordScore.builder().keyword(Keyword.BENEVOLENCE).score(BigDecimal.TWO).build()); SurveyOption option1 = @@ -63,7 +63,7 @@ void getSubmittedSurvey_OtherMember() { List scores = List.of( - KeywordScore.builder().keyword(Keyword.ACHIEVEMENT).score(BigDecimal.ONE).build(), + KeywordScore.builder().keyword(Keyword.ADVENTURE).score(BigDecimal.ONE).build(), KeywordScore.builder().keyword(Keyword.BENEVOLENCE).score(BigDecimal.TWO).build()); SurveyOption option1 = diff --git a/jaknaeso-core/src/test/java/org/nexters/jaknaesocore/domain/survey/repository/SurveySubmissionRepositoryTest.java b/jaknaeso-core/src/test/java/org/nexters/jaknaesocore/domain/survey/repository/SurveySubmissionRepositoryTest.java index 5e16ae72..a4d36d13 100644 --- a/jaknaeso-core/src/test/java/org/nexters/jaknaesocore/domain/survey/repository/SurveySubmissionRepositoryTest.java +++ b/jaknaeso-core/src/test/java/org/nexters/jaknaesocore/domain/survey/repository/SurveySubmissionRepositoryTest.java @@ -45,7 +45,7 @@ void findByMember_IdAndDeletedAtIsNull() { surveyRepository.save(balanceSurvey); List scores = List.of( - KeywordScore.builder().keyword(Keyword.ACHIEVEMENT).score(BigDecimal.ONE).build(), + KeywordScore.builder().keyword(Keyword.ADVENTURE).score(BigDecimal.ONE).build(), KeywordScore.builder().keyword(Keyword.BENEVOLENCE).score(BigDecimal.TWO).build()); SurveyOption option = SurveyOption.builder().survey(balanceSurvey).scores(scores).content("질문 옵션 내용").build(); @@ -83,7 +83,7 @@ void findByMember_IdAndDeletedAtIsNull() { surveyRepository.saveAll(List.of(survey1, survey2, survey3, survey4)); List scores = List.of( - KeywordScore.builder().keyword(Keyword.ACHIEVEMENT).score(BigDecimal.ONE).build(), + KeywordScore.builder().keyword(Keyword.ADVENTURE).score(BigDecimal.ONE).build(), KeywordScore.builder().keyword(Keyword.BENEVOLENCE).score(BigDecimal.TWO).build()); SurveyOption option1 = SurveyOption.builder().survey(survey1).scores(scores).content("한다.").build(); @@ -132,7 +132,7 @@ void findByMember_IdAndDeletedAtIsNull() { surveyRepository.saveAll(List.of(survey1, survey2, survey3, survey4)); List scores = List.of( - KeywordScore.builder().keyword(Keyword.ACHIEVEMENT).score(BigDecimal.ONE).build(), + KeywordScore.builder().keyword(Keyword.ADVENTURE).score(BigDecimal.ONE).build(), KeywordScore.builder().keyword(Keyword.BENEVOLENCE).score(BigDecimal.TWO).build()); SurveyOption option1 = SurveyOption.builder().survey(survey1).scores(scores).content("한다.").build(); diff --git a/jaknaeso-core/src/test/java/org/nexters/jaknaesocore/domain/survey/service/SurveyServiceTest.java b/jaknaeso-core/src/test/java/org/nexters/jaknaesocore/domain/survey/service/SurveyServiceTest.java index dacb7d27..6d73418f 100644 --- a/jaknaeso-core/src/test/java/org/nexters/jaknaesocore/domain/survey/service/SurveyServiceTest.java +++ b/jaknaeso-core/src/test/java/org/nexters/jaknaesocore/domain/survey/service/SurveyServiceTest.java @@ -58,7 +58,7 @@ void getNextSurvey() { surveyRepository.save(balanceSurvey); List scores = List.of( - KeywordScore.builder().keyword(Keyword.ACHIEVEMENT).score(BigDecimal.ONE).build(), + KeywordScore.builder().keyword(Keyword.ADVENTURE).score(BigDecimal.ONE).build(), KeywordScore.builder().keyword(Keyword.BENEVOLENCE).score(BigDecimal.TWO).build()); SurveyOption option = SurveyOption.builder().survey(balanceSurvey).scores(scores).content("질문 옵션 내용").build(); @@ -94,7 +94,7 @@ void throwMemberNotFoundException() { surveyRepository.save(balanceSurvey); List scores = List.of( - KeywordScore.builder().keyword(Keyword.ACHIEVEMENT).score(BigDecimal.ONE).build(), + KeywordScore.builder().keyword(Keyword.ADVENTURE).score(BigDecimal.ONE).build(), KeywordScore.builder().keyword(Keyword.BENEVOLENCE).score(BigDecimal.TWO).build()); SurveyOption option = SurveyOption.builder().survey(balanceSurvey).scores(scores).content("질문 옵션 내용").build(); @@ -124,7 +124,7 @@ class shouldSubmitted { surveyRepository.save(balanceSurvey); List scores = List.of( - KeywordScore.builder().keyword(Keyword.ACHIEVEMENT).score(BigDecimal.ONE).build(), + KeywordScore.builder().keyword(Keyword.ADVENTURE).score(BigDecimal.ONE).build(), KeywordScore.builder().keyword(Keyword.BENEVOLENCE).score(BigDecimal.TWO).build()); SurveyOption option = SurveyOption.builder().survey(balanceSurvey).scores(scores).content("질문 옵션 내용").build(); @@ -159,7 +159,7 @@ void throwSurveyNotFoundException() { surveyRepository.save(balanceSurvey); List scores = List.of( - KeywordScore.builder().keyword(Keyword.ACHIEVEMENT).score(BigDecimal.ONE).build(), + KeywordScore.builder().keyword(Keyword.ADVENTURE).score(BigDecimal.ONE).build(), KeywordScore.builder().keyword(Keyword.BENEVOLENCE).score(BigDecimal.TWO).build()); SurveyOption option = SurveyOption.builder().survey(balanceSurvey).scores(scores).content("질문 옵션 내용").build(); @@ -191,7 +191,7 @@ void throwSurveyNotFoundException() { surveyRepository.saveAll(List.of(survey1, survey2, survey3, survey4)); List scores = List.of( - KeywordScore.builder().keyword(Keyword.ACHIEVEMENT).score(BigDecimal.ONE).build(), + KeywordScore.builder().keyword(Keyword.ADVENTURE).score(BigDecimal.ONE).build(), KeywordScore.builder().keyword(Keyword.BENEVOLENCE).score(BigDecimal.TWO).build()); SurveyOption option1 = SurveyOption.builder().survey(survey1).scores(scores).content("한다.").build(); @@ -230,7 +230,7 @@ void throwSurveyNotFoundException() { surveyRepository.saveAll(List.of(survey1, survey2, survey3, survey4)); List scores = List.of( - KeywordScore.builder().keyword(Keyword.ACHIEVEMENT).score(BigDecimal.ONE).build(), + KeywordScore.builder().keyword(Keyword.ADVENTURE).score(BigDecimal.ONE).build(), KeywordScore.builder().keyword(Keyword.BENEVOLENCE).score(BigDecimal.TWO).build()); SurveyOption option1 = SurveyOption.builder().survey(survey1).scores(scores).content("한다.").build(); @@ -283,7 +283,7 @@ void throwSurveyNotFoundException() { List scores = List.of( - KeywordScore.builder().keyword(Keyword.ACHIEVEMENT).score(BigDecimal.ONE).build(), + KeywordScore.builder().keyword(Keyword.ADVENTURE).score(BigDecimal.ONE).build(), KeywordScore.builder().keyword(Keyword.BENEVOLENCE).score(BigDecimal.TWO).build()); SurveyOption option1 = @@ -335,7 +335,7 @@ void throwSurveyNotFoundException() { List scores = List.of( - KeywordScore.builder().keyword(Keyword.ACHIEVEMENT).score(BigDecimal.ONE).build(), + KeywordScore.builder().keyword(Keyword.ADVENTURE).score(BigDecimal.ONE).build(), KeywordScore.builder().keyword(Keyword.BENEVOLENCE).score(BigDecimal.TWO).build()); SurveyOption option1 =