feat(subscription): DEFAULT_PROFILE 신규 3필드 + extractTier 헬퍼

This commit is contained in:
2026-04-28 10:51:45 +09:00
parent a9d9540f61
commit 3b3e4a1ee1

View File

@@ -30,9 +30,24 @@ const DEFAULT_PROFILE = {
has_newborn: false, is_first_home: false, income_level: '', has_newborn: false, is_first_home: false, income_level: '',
preferred_regions: '', preferred_types: '', preferred_regions: '', preferred_types: '',
min_area: '', max_area: '', max_price: '', min_area: '', max_area: '', max_price: '',
// 신규 (자치구 5티어 + 알림 설정)
preferred_districts: {},
min_match_score: 70,
notify_enabled: true,
}; };
// ── 유틸 ────────────────────────────────────────────────────────────────────── // ── 유틸 ──────────────────────────────────────────────────────────────────────
// 매칭 reasons에서 자치구 티어를 추출 ("자치구 S티어: 강남구 (+25)" → "S")
// eslint-disable-next-line no-unused-vars
function extractTier(reasons) {
for (const r of reasons || []) {
const m = r.match(/자치구 ([SABCD])티어/);
if (m) return m[1];
}
return null;
}
const fmt = (d) => { const fmt = (d) => {
if (!d) return '-'; if (!d) return '-';
return new Date(d).toLocaleDateString('ko-KR', { month: 'short', day: 'numeric' }); return new Date(d).toLocaleDateString('ko-KR', { month: 'short', day: 'numeric' });