업종 4번째를 관광체험 → 피부과·성형외과 로 바꾸고, 로그인 관문을 에디터 진입으로 되돌린다
## 업종 교체 (tour → clinic) PlaceCategory 코드 4번의 의미를 바꾼다. 아직 배포 전이라 데이터 마이그레이션은 없다. - category_schema: tour_activity.json → clinic.json. 체험 스키마(안전 유의사항·우천 시 운영·준비물)를 진료 스키마(진료과목·의료진·상담료·보험 적용·야간/주말진료)로 바꿨다. unit 은 프로그램 → 시술이다(마취 방식·회복 기간·권장 횟수·시술 후 주의사항). - 소개문 계열만 allow_llm 이다. 시술 효과·비용 같은 값은 LLM 이 못 쓴다 — 이 레포의 "검증 전에는 발행 금지" 규칙이 의료 문구에서 특히 중요하다. - jsonld: TouristAttraction → MedicalClinic. 프론트 AeoReadiness 의 같은 표도 맞췄다. - 색 팔레트를 병원 톤(클린 블루·세이지·누드·모노)으로, 아이콘을 Compass → Stethoscope 로. - mock_adapter 목데이터를 시술 기준으로 교체. 스키마에 없는 key 를 쓰면 수집이 죽는다. - site_payload 의 기본 섹션표를 에디터(industryData)와 같게 맞췄다 — test_site_theme 이 이 둘을 대조한다. ## 로그인 관문 되돌리기 (b94daa9·d6a6c8e revert) 두 커밋이 /builder 를 통째로 RequireAuth 뒤로 옮겨 `/` 가 곧바로 로그인 화면이 됐다. `/` 는 자기 화면 없이 /builder 로 넘기기만 하므로, 문 앞 가드는 곧 루트 가드다. 위저드를 열어 두고 에디터 진입에서 한 번 받는969fb67설계로 되돌린다.d6a6c8e가 스스로 "969fb67 과 정면으로 다른 설계"라고 적어 두었다. ## 그 밖 - test_site_theme 의 경로가 solution/front 로 남아 있었다(frontend 개명 누락). - .dockerignore: 이 머신에 buildx 가 없어 레거시 빌더가 돌고, 그러면 nginx/Dockerfile.dockerignore 가 무시된다. 루트 것 하나로 두 이미지를 다 커버한다. 검증: frontend·admin·site lint·build 0. 백엔드 534 passed / 4 failed — 그 4개(test_build_publish 3 · test_snapshot 1)는 이 변경 전부터 실패하던 것이다. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xa8ME5FQJy4VA8pPokTo1a
This commit is contained in:
1 parent
1bcee68432
commit
5ef3e5a7de
36 files changed
+368
-262
No files matched your search
@@ -39,7 +39,7 @@ common/category_schema/resources/
|
||||
├── lodging.json 숙박 필드 30 (critical 14)
|
||||
├── cafe.json 카페 필드 23 (critical 12)
|
||||
├── restaurant.json 음식점 필드 24 (critical 15)
|
||||
└── tour_activity.json 관광체험 필드 24 (critical 17)
|
||||
└── clinic.json 피부과·성형외과 필드 24 (critical 17)
|
||||
```
|
||||
|
||||
**업종 추가 = JSON 파일 1개 + `PlaceCategory` 코드 1줄.** 로직은 건드리지 않는다.
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"category": "clinic",
|
||||
"code": 4,
|
||||
"label": "피부과·성형외과",
|
||||
"fields": [
|
||||
{ "key": "operating_hours", "label": "진료시간", "type": "text", "scope": "place", "required": true, "critical": true, "allow_llm": false },
|
||||
{ "key": "closed_days", "label": "휴진일", "type": "text", "scope": "place", "required": true, "critical": true, "allow_llm": false },
|
||||
{ "key": "specialties", "label": "진료과목", "type": "text", "scope": "place", "required": true, "critical": true, "allow_llm": false },
|
||||
{ "key": "medical_staff", "label": "의료진", "type": "text", "scope": "place", "required": true, "critical": true, "allow_llm": false },
|
||||
{ "key": "reservation_required", "label": "예약 필수", "type": "bool", "scope": "place", "required": true, "critical": true, "allow_llm": false },
|
||||
{ "key": "reservation_channel", "label": "예약 방법", "type": "text", "scope": "place", "required": false, "critical": true, "allow_llm": false },
|
||||
{ "key": "consultation_fee", "label": "상담료", "type": "text", "scope": "place", "required": true, "critical": true, "allow_llm": false },
|
||||
{ "key": "insurance_covered", "label": "보험 적용 안내", "type": "text", "scope": "place", "required": true, "critical": true, "allow_llm": false },
|
||||
{ "key": "cancel_policy", "label": "예약 변경·취소", "type": "text", "scope": "place", "required": true, "critical": true, "allow_llm": false },
|
||||
{ "key": "night_clinic", "label": "야간진료", "type": "text", "scope": "place", "required": false, "critical": true, "allow_llm": false },
|
||||
{ "key": "weekend_clinic", "label": "주말진료", "type": "text", "scope": "place", "required": false, "critical": true, "allow_llm": false },
|
||||
{ "key": "guide_language", "label": "외국어 상담", "type": "text", "scope": "place", "required": false, "critical": false, "allow_llm": false },
|
||||
{ "key": "parking", "label": "주차 가능", "type": "bool", "scope": "place", "required": false, "critical": true, "allow_llm": false },
|
||||
{ "key": "wheelchair_accessible", "label": "휠체어 접근", "type": "bool", "scope": "place", "required": false, "critical": true, "allow_llm": false },
|
||||
{ "key": "intro", "label": "병원 소개", "type": "text", "scope": "place", "required": false, "critical": false, "allow_llm": true },
|
||||
|
||||
{ "key": "program_name", "label": "시술명", "type": "text", "scope": "unit", "required": true, "critical": false, "allow_llm": false },
|
||||
{ "key": "program_duration", "label": "소요 시간", "type": "number", "scope": "unit", "required": true, "critical": true, "allow_llm": false, "unit": "분" },
|
||||
{ "key": "price_adult", "label": "시술 비용", "type": "number", "scope": "unit", "required": false, "critical": true, "allow_llm": false, "unit": "원" },
|
||||
{ "key": "anesthesia", "label": "마취 방식", "type": "text", "scope": "unit", "required": false, "critical": true, "allow_llm": false },
|
||||
{ "key": "downtime", "label": "회복 기간", "type": "text", "scope": "unit", "required": false, "critical": true, "allow_llm": false },
|
||||
{ "key": "session_count", "label": "권장 횟수", "type": "text", "scope": "unit", "required": false, "critical": true, "allow_llm": false },
|
||||
{ "key": "aftercare", "label": "시술 후 주의사항", "type": "text", "scope": "unit", "required": false, "critical": true, "allow_llm": false },
|
||||
{ "key": "program_intro", "label": "시술 설명", "type": "text", "scope": "unit", "required": false, "critical": false, "allow_llm": true }
|
||||
]
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
{
|
||||
"category": "tour_activity",
|
||||
"code": 4,
|
||||
"label": "관광체험",
|
||||
"fields": [
|
||||
{ "key": "operating_hours", "label": "운영시간", "type": "text", "scope": "place", "required": true, "critical": true, "allow_llm": false },
|
||||
{ "key": "closed_days", "label": "휴무일", "type": "text", "scope": "place", "required": true, "critical": true, "allow_llm": false },
|
||||
{ "key": "reservation_required", "label": "예약 필수", "type": "bool", "scope": "place", "required": true, "critical": true, "allow_llm": false },
|
||||
{ "key": "reservation_channel", "label": "예약 방법", "type": "text", "scope": "place", "required": false, "critical": true, "allow_llm": false },
|
||||
{ "key": "cancel_policy", "label": "취소·환불 규정", "type": "text", "scope": "place", "required": true, "critical": true, "allow_llm": false },
|
||||
{ "key": "age_limit", "label": "연령 제한", "type": "text", "scope": "place", "required": true, "critical": true, "allow_llm": false },
|
||||
{ "key": "safety_notice", "label": "안전 유의사항", "type": "text", "scope": "place", "required": true, "critical": true, "allow_llm": false },
|
||||
{ "key": "weather_dependent", "label": "우천 시 운영", "type": "text", "scope": "place", "required": true, "critical": true, "allow_llm": false },
|
||||
{ "key": "what_to_bring", "label": "준비물", "type": "text", "scope": "place", "required": false, "critical": true, "allow_llm": false },
|
||||
{ "key": "session_times", "label": "회차 시간", "type": "text", "scope": "place", "required": false, "critical": true, "allow_llm": false },
|
||||
{ "key": "guide_language", "label": "안내 언어", "type": "text", "scope": "place", "required": false, "critical": false, "allow_llm": false },
|
||||
{ "key": "parking", "label": "주차 가능", "type": "bool", "scope": "place", "required": false, "critical": true, "allow_llm": false },
|
||||
{ "key": "wheelchair_accessible", "label": "휠체어 접근", "type": "bool", "scope": "place", "required": false, "critical": true, "allow_llm": false },
|
||||
{ "key": "locker_available", "label": "물품보관함", "type": "bool", "scope": "place", "required": false, "critical": false, "allow_llm": false },
|
||||
{ "key": "shower_available", "label": "샤워시설", "type": "bool", "scope": "place", "required": false, "critical": false, "allow_llm": false },
|
||||
{ "key": "intro", "label": "체험 소개", "type": "text", "scope": "place", "required": false, "critical": false, "allow_llm": true },
|
||||
|
||||
{ "key": "program_name", "label": "프로그램명", "type": "text", "scope": "unit", "required": true, "critical": false, "allow_llm": false },
|
||||
{ "key": "program_duration", "label": "소요 시간", "type": "number", "scope": "unit", "required": true, "critical": true, "allow_llm": false, "unit": "분" },
|
||||
{ "key": "program_capacity", "label": "회차당 정원", "type": "number", "scope": "unit", "required": false, "critical": true, "allow_llm": false, "unit": "명" },
|
||||
{ "key": "program_min_people", "label": "최소 출발 인원", "type": "number", "scope": "unit", "required": false, "critical": true, "allow_llm": false, "unit": "명" },
|
||||
{ "key": "price_adult", "label": "성인 요금", "type": "number", "scope": "unit", "required": false, "critical": true, "allow_llm": false, "unit": "원" },
|
||||
{ "key": "price_child", "label": "소인 요금", "type": "number", "scope": "unit", "required": false, "critical": true, "allow_llm": false, "unit": "원" },
|
||||
{ "key": "program_level", "label": "난이도", "type": "text", "scope": "unit", "required": false, "critical": false, "allow_llm": false },
|
||||
{ "key": "program_intro", "label": "프로그램 소개", "type": "text", "scope": "unit", "required": false, "critical": false, "allow_llm": true }
|
||||
]
|
||||
}
|
||||
@@ -169,7 +169,7 @@ class place_links(MainTableMixin, MAIN_BASE):
|
||||
|
||||
|
||||
class units(MainTableMixin, MAIN_BASE):
|
||||
"""업종별 하위 단위 — 숙박=객실, 카페·음식점=메뉴, 관광체험=프로그램.
|
||||
"""업종별 하위 단위 — 숙박=객실, 카페·음식점=메뉴, 피부과·성형외과=프로그램.
|
||||
가변 필드는 facts(scope=unit)로 들어가고, 여기에는 목록 렌더에 필요한 뼈대만 둔다."""
|
||||
|
||||
__tablename__ = "units"
|
||||
|
||||
@@ -181,7 +181,7 @@ class PlaceCategory(CodeEnum):
|
||||
LODGING = 1 # 숙박
|
||||
CAFE = 2 # 카페
|
||||
RESTAURANT = 3 # 음식점
|
||||
TOUR_ACTIVITY = 4 # 관광체험
|
||||
CLINIC = 4 # 피부과·성형외과
|
||||
|
||||
|
||||
class ExternalPlaceSource(CodeEnum):
|
||||
|
||||
@@ -29,7 +29,7 @@ _CATEGORY_BY_NAME = {
|
||||
"lodging": PlaceCategory.LODGING,
|
||||
"cafe": PlaceCategory.CAFE,
|
||||
"restaurant": PlaceCategory.RESTAURANT,
|
||||
"tour_activity": PlaceCategory.TOUR_ACTIVITY,
|
||||
"clinic": PlaceCategory.CLINIC,
|
||||
}
|
||||
|
||||
_CHANNEL_BY_NAME = {c.name.lower(): c for c in LinkChannel}
|
||||
@@ -86,16 +86,18 @@ _PLACE_FACTS = {
|
||||
("signature_menu", "한우 물회"),
|
||||
("price_range", "15,000~30,000원"),
|
||||
],
|
||||
PlaceCategory.TOUR_ACTIVITY: [
|
||||
("operating_hours", "09:00~18:00"),
|
||||
("closed_days", "매주 수요일"),
|
||||
PlaceCategory.CLINIC: [
|
||||
("operating_hours", "평일 10:00~19:00, 토 10:00~14:00"),
|
||||
("closed_days", "일요일·공휴일"),
|
||||
("specialties", "피부과, 성형외과"),
|
||||
("medical_staff", "피부과 전문의 2인, 성형외과 전문의 1인"),
|
||||
("reservation_required", "true"),
|
||||
("reservation_channel", "네이버 예약"),
|
||||
("cancel_policy", "체험 3일 전까지 100% 환불, 당일 취소 불가"),
|
||||
("age_limit", "만 7세 이상"),
|
||||
("safety_notice", "구명조끼 착용 필수, 음주 후 참여 불가"),
|
||||
("weather_dependent", "우천 시 당일 오전 8시에 개별 안내"),
|
||||
("what_to_bring", "여벌 옷, 수건"),
|
||||
("reservation_channel", "네이버 예약, 전화"),
|
||||
("consultation_fee", "초진 상담료 없음"),
|
||||
("insurance_covered", "질환 치료는 보험 적용, 미용 시술은 비급여"),
|
||||
("cancel_policy", "예약 1일 전까지 변경 가능, 당일 취소는 재예약 제한"),
|
||||
("night_clinic", "목요일 21:00까지"),
|
||||
("weekend_clinic", "토요일 14:00까지"),
|
||||
("parking", "true"),
|
||||
],
|
||||
}
|
||||
@@ -130,19 +132,21 @@ _UNIT_FACTS = {
|
||||
"한우 물회": [("menu_name", "한우 물회"), ("menu_price", "18000")],
|
||||
"성게 비빔밥": [("menu_name", "성게 비빔밥"), ("menu_price", "22000"), ("menu_min_order", "2")],
|
||||
},
|
||||
PlaceCategory.TOUR_ACTIVITY: {
|
||||
"서핑 입문 클래스": [
|
||||
("program_name", "서핑 입문 클래스"),
|
||||
("program_duration", "120"),
|
||||
("program_capacity", "8"),
|
||||
("price_adult", "70000"),
|
||||
("price_child", "50000"),
|
||||
PlaceCategory.CLINIC: {
|
||||
"레이저 토닝": [
|
||||
("program_name", "레이저 토닝"),
|
||||
("program_duration", "30"),
|
||||
("price_adult", "100000"),
|
||||
("anesthesia", "마취 없음"),
|
||||
("downtime", "당일 일상생활 가능"),
|
||||
("session_count", "5회 권장"),
|
||||
],
|
||||
"패들보드 체험": [
|
||||
("program_name", "패들보드 체험"),
|
||||
("program_duration", "90"),
|
||||
("program_capacity", "6"),
|
||||
("price_adult", "55000"),
|
||||
"보톡스": [
|
||||
("program_name", "보톡스"),
|
||||
("program_duration", "20"),
|
||||
("price_adult", "150000"),
|
||||
("anesthesia", "연고 마취"),
|
||||
("downtime", "1~2일 미세 부기"),
|
||||
],
|
||||
},
|
||||
}
|
||||
@@ -168,11 +172,11 @@ _MEDIA = {
|
||||
("한우 물회", "한우 물회"),
|
||||
("성게 비빔밥", "성게 비빔밥"),
|
||||
],
|
||||
PlaceCategory.TOUR_ACTIVITY: [
|
||||
("해변 전경", None),
|
||||
("장비 보관소", None),
|
||||
("서핑 강습", "서핑 입문 클래스"),
|
||||
("패들보드", "패들보드 체험"),
|
||||
PlaceCategory.CLINIC: [
|
||||
("병원 외관", None),
|
||||
("상담실", None),
|
||||
("레이저 장비", "레이저 토닝"),
|
||||
("시술실", "보톡스"),
|
||||
],
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ _CATEGORY_LABEL = {
|
||||
PlaceCategory.LODGING: "숙박업소",
|
||||
PlaceCategory.CAFE: "카페",
|
||||
PlaceCategory.RESTAURANT: "음식점",
|
||||
PlaceCategory.TOUR_ACTIVITY: "관광·체험 시설",
|
||||
PlaceCategory.CLINIC: "관광·체험 시설",
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ _LABELS = {
|
||||
PlaceCategory.LODGING: ["외관", "침실", "거실", "욕실", "주방", "수영장", "바비큐장", "주차장", "전망", "부대시설"],
|
||||
PlaceCategory.CAFE: ["외관", "내부", "좌석", "메뉴", "디저트", "음료", "테라스", "주차장"],
|
||||
PlaceCategory.RESTAURANT: ["외관", "내부", "좌석", "메뉴", "음식", "룸", "주차장"],
|
||||
PlaceCategory.TOUR_ACTIVITY: ["외관", "시설", "장비", "활동", "안전장비", "주차장", "매표소"],
|
||||
PlaceCategory.CLINIC: ["외관", "시설", "장비", "활동", "안전장비", "주차장", "매표소"],
|
||||
}
|
||||
_DEFAULT_LABELS = ["외관", "내부", "시설", "기타"]
|
||||
|
||||
|
||||
@@ -108,16 +108,16 @@ _DEFAULT_THEME = {
|
||||
("local", "주변 안내", False), ("faq", "자주 묻는 질문", False),
|
||||
],
|
||||
},
|
||||
PlaceCategory.TOUR_ACTIVITY.value: {
|
||||
"templateId": "tour-visual-tour",
|
||||
PlaceCategory.CLINIC.value: {
|
||||
"templateId": "clinic-visual-clinic",
|
||||
"fontStyle": "Visual Journey",
|
||||
"colors": {"primary": "#0f172a", "secondary": "#475569", "bg": "#ffffff",
|
||||
"card": "#f8fafc", "text": "#020617", "accent": "#0284c7"},
|
||||
"card": "#f8fafc", "text": "#020617", "accent": "#4A9DC4"},
|
||||
"sections": [
|
||||
("hero", "히어로", True), ("intro", "소개", False), ("programs", "체험 프로그램", False),
|
||||
("info", "기본 정보", True), ("exhibition", "관람 및 갤러리 안내", False), ("photos", "사진 갤러리", False),
|
||||
("inquiry", "단체 및 출강 문의", False), ("map", "오시는 길", True), ("weather", "날씨", False),
|
||||
("local", "주변 관광 코스", False), ("faq", "자주 묻는 질문", False),
|
||||
("hero", "히어로", True), ("intro", "병원 소개", False), ("programs", "시술 안내", False),
|
||||
("info", "기본 정보", True), ("exhibition", "진료 안내", False), ("photos", "사진 갤러리", False),
|
||||
("inquiry", "상담 문의", False), ("map", "오시는 길", True), ("weather", "날씨", False),
|
||||
("local", "주변 정보", False), ("faq", "자주 묻는 질문", False),
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ from common.enums import PlaceCategory
|
||||
|
||||
def test_all_categories_have_schema():
|
||||
"""검증: PlaceCategory 의 모든 업종에 스키마 파일이 있는지.
|
||||
기대결과: 4개 업종(숙박·카페·음식점·관광체험)이 모두 로드되고 code 가 1:1로 맞는다."""
|
||||
기대결과: 4개 업종(숙박·카페·음식점·피부과·성형외과)이 모두 로드되고 code 가 1:1로 맞는다."""
|
||||
schemas = all_schemas()
|
||||
assert set(schemas) == {c.value for c in PlaceCategory}
|
||||
for code, schema in schemas.items():
|
||||
|
||||
@@ -267,15 +267,15 @@ def test_saved_theme_does_not_override_chosen_template():
|
||||
# 여기에 없는 섹션은 사장님이 에디터에서 아무리 봐도 사이트에 나오지 않는다.
|
||||
# 실측으로 날씨·실시간 예약·대관 문의·관람 안내가 그렇게 빠져 있었다.
|
||||
_ADMIN_SECTIONS_TS = (
|
||||
pathlib.Path(__file__).resolve().parents[2] / "front/src/data/industryData.ts" # parents[2] = solution/
|
||||
pathlib.Path(__file__).resolve().parents[2] / "frontend/src/data/industryData.ts" # parents[2] = solution/
|
||||
)
|
||||
|
||||
# 에디터 업종 키 → PlaceCategory. 이름이 다른 건 두 층의 어휘가 달라서다(tour vs TOUR_ACTIVITY).
|
||||
# 에디터 업종 키 → PlaceCategory. 이름이 다른 건 두 층의 어휘가 달라서다(clinic vs CLINIC).
|
||||
_INDUSTRY_TO_CATEGORY = {
|
||||
"stay": PlaceCategory.LODGING.value,
|
||||
"cafe": PlaceCategory.CAFE.value,
|
||||
"restaurant": PlaceCategory.RESTAURANT.value,
|
||||
"tour": PlaceCategory.TOUR_ACTIVITY.value,
|
||||
"clinic": PlaceCategory.CLINIC.value,
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user