diff --git a/src/main/kotlin/codel/question/domain/QuestionCategory.kt b/src/main/kotlin/codel/question/domain/QuestionCategory.kt
index d9a7a8c..76a59a7 100644
--- a/src/main/kotlin/codel/question/domain/QuestionCategory.kt
+++ b/src/main/kotlin/codel/question/domain/QuestionCategory.kt
@@ -15,14 +15,14 @@ enum class QuestionCategory(
@Schema(description = "채팅방 그룹 정책")
val chatGroupPolicy: GroupPolicy
) {
- // 회원가입 + 채팅방 양쪽 사용
- @Schema(description = "가치관 관련 질문 (회원가입 + 채팅방)")
+ // 회원가입 전용
+ @Schema(description = "가치관 관련 질문 (회원가입 전용)")
VALUES(
displayName = "가치관",
description = "인생 가치관·성향",
usedInSignup = true,
- usedInChat = true,
- chatGroupPolicy = GroupPolicy.A_THEN_B
+ usedInChat = false,
+ chatGroupPolicy = GroupPolicy.NONE
),
// 회원가입 전용
@@ -35,11 +35,11 @@ enum class QuestionCategory(
chatGroupPolicy = GroupPolicy.NONE
),
- @Schema(description = "현재 상태 관련 질문 (레거시)")
+ @Schema(description = "현재 상태 관련 질문")
CURRENT_ME(
displayName = "요즘 나",
description = "최근 상태·몰입한 것",
- usedInSignup = false,
+ usedInSignup = true,
usedInChat = false,
chatGroupPolicy = GroupPolicy.NONE
),
@@ -81,6 +81,15 @@ enum class QuestionCategory(
),
// 채팅방 전용
+ @Schema(description = "가치관 코드 - 가치관으로 서로의 성격 코드 알아가기")
+ VALUES_CODE(
+ displayName = "가치관 코드",
+ description = "가치관으로 서로의 성격 코드 알아가기",
+ usedInSignup = false,
+ usedInChat = true,
+ chatGroupPolicy = GroupPolicy.A_THEN_B
+ ),
+
@Schema(description = "텐션업 코드 - 가벼운 선택 질문")
TENSION_UP(
displayName = "텐션업 코드",
diff --git a/src/main/resources/db/migration/V22__add_values_code_category.sql b/src/main/resources/db/migration/V22__add_values_code_category.sql
new file mode 100644
index 0000000..19539fe
--- /dev/null
+++ b/src/main/resources/db/migration/V22__add_values_code_category.sql
@@ -0,0 +1,19 @@
+-- VALUES_CODE 카테고리 추가 (채팅방 전용 가치관 코드)
+-- Issue: #397
+
+-- category ENUM에 VALUES_CODE 추가
+ALTER TABLE question
+MODIFY COLUMN category
+ENUM(
+ 'VALUES',
+ 'VALUES_CODE',
+ 'FAVORITE',
+ 'CURRENT_ME',
+ 'DATE',
+ 'MEMORY',
+ 'WANT_TALK',
+ 'BALANCE_ONE',
+ 'IF',
+ 'TENSION_UP',
+ 'SECRET'
+) NOT NULL;
diff --git a/src/main/resources/templates/questionEditForm.html b/src/main/resources/templates/questionEditForm.html
index 5165a18..ed8cf28 100644
--- a/src/main/resources/templates/questionEditForm.html
+++ b/src/main/resources/templates/questionEditForm.html
@@ -167,7 +167,7 @@
질문 수정
// 용도별 카테고리 옵션
const categoryOptions = {
chatroom: [
- { value: 'VALUES', label: '가치관 코드' },
+ { value: 'VALUES_CODE', label: '가치관 코드' },
{ value: 'TENSION_UP', label: '텐션업 코드' },
{ value: 'IF', label: '만약에 코드' },
{ value: 'SECRET', label: '비밀 코드 (19+)' }
@@ -175,6 +175,7 @@ 질문 수정
profile: [
{ value: 'VALUES', label: '가치관' },
{ value: 'FAVORITE', label: 'favorite' },
+ { value: 'CURRENT_ME', label: '요즘 나' },
{ value: 'DATE', label: '데이트' },
{ value: 'MEMORY', label: '추억' },
{ value: 'WANT_TALK', label: '이런대화해보고싶어' }
@@ -183,18 +184,20 @@ 질문 수정
// 카테고리별 용도 매핑
const categoryToPurpose = {
- 'VALUES': 'both', // 양쪽 모두 가능
+ 'VALUES': 'profile',
+ 'VALUES_CODE': 'chatroom',
'TENSION_UP': 'chatroom',
'IF': 'chatroom',
'SECRET': 'chatroom',
'FAVORITE': 'profile',
+ 'CURRENT_ME': 'profile',
'DATE': 'profile',
'MEMORY': 'profile',
'WANT_TALK': 'profile'
};
// 회원가입 전용 카테고리 (그룹 자동 RANDOM)
- const signupOnlyCategories = ['FAVORITE', 'DATE', 'MEMORY', 'WANT_TALK'];
+ const signupOnlyCategories = ['FAVORITE', 'CURRENT_ME', 'DATE', 'MEMORY', 'WANT_TALK'];
const purposeSelect = document.getElementById('purpose');
const categorySelect = document.getElementById('category');
@@ -251,15 +254,7 @@ 질문 수정
// 기존 카테고리로 용도 결정
const purpose = categoryToPurpose[currentCategory];
- if (purpose === 'both') {
- // VALUES는 채팅방 용도로 기본 설정 (채팅방에서 사용되는 경우가 더 흔함)
- // 그룹이 RANDOM이면 profile, 아니면 chatroom으로 추정
- if (currentGroup === 'RANDOM') {
- purposeSelect.value = 'profile';
- } else {
- purposeSelect.value = 'chatroom';
- }
- } else if (purpose === 'chatroom') {
+ if (purpose === 'chatroom') {
purposeSelect.value = 'chatroom';
} else {
purposeSelect.value = 'profile';
diff --git a/src/main/resources/templates/questionForm.html b/src/main/resources/templates/questionForm.html
index 6eed7c3..776292a 100644
--- a/src/main/resources/templates/questionForm.html
+++ b/src/main/resources/templates/questionForm.html
@@ -151,7 +151,7 @@ 새 질문 등록
// 용도별 카테고리 옵션
const categoryOptions = {
chatroom: [
- { value: 'VALUES', label: '가치관 코드' },
+ { value: 'VALUES_CODE', label: '가치관 코드' },
{ value: 'TENSION_UP', label: '텐션업 코드' },
{ value: 'IF', label: '만약에 코드' },
{ value: 'SECRET', label: '비밀 코드 (19+)' }
@@ -159,6 +159,7 @@ 새 질문 등록
profile: [
{ value: 'VALUES', label: '가치관' },
{ value: 'FAVORITE', label: 'favorite' },
+ { value: 'CURRENT_ME', label: '요즘 나' },
{ value: 'DATE', label: '데이트' },
{ value: 'MEMORY', label: '추억' },
{ value: 'WANT_TALK', label: '이런대화해보고싶어' }
@@ -166,7 +167,7 @@ 새 질문 등록
};
// 회원가입 전용 카테고리 (그룹 자동 RANDOM)
- const signupOnlyCategories = ['FAVORITE', 'DATE', 'MEMORY', 'WANT_TALK'];
+ const signupOnlyCategories = ['FAVORITE', 'CURRENT_ME', 'DATE', 'MEMORY', 'WANT_TALK'];
const purposeSelect = document.getElementById('purpose');
const categorySelect = document.getElementById('category');
diff --git a/src/main/resources/templates/questionList.html b/src/main/resources/templates/questionList.html
index d3abb51..03a8732 100644
--- a/src/main/resources/templates/questionList.html
+++ b/src/main/resources/templates/questionList.html
@@ -194,7 +194,7 @@ 질문 관리
// 용도별 카테고리 옵션
const categoryOptions = {
chatroom: [
- { value: 'VALUES', label: '가치관 코드' },
+ { value: 'VALUES_CODE', label: '가치관 코드' },
{ value: 'TENSION_UP', label: '텐션업 코드' },
{ value: 'IF', label: '만약에 코드' },
{ value: 'SECRET', label: '비밀 코드 (19+)' }
@@ -202,6 +202,7 @@ 질문 관리
profile: [
{ value: 'VALUES', label: '가치관' },
{ value: 'FAVORITE', label: 'favorite' },
+ { value: 'CURRENT_ME', label: '요즘 나' },
{ value: 'DATE', label: '데이트' },
{ value: 'MEMORY', label: '추억' },
{ value: 'WANT_TALK', label: '이런대화해보고싶어' }
@@ -225,8 +226,6 @@ 질문 관리
html += '