Basecamp team
Tables (11)
Bookmarks
- bookmark_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → Users.user_id
- campsite_id — BIGINT — Foreign key → Campsites.campsite_id
- created_at — TIMESTAMP
Campsites
- campsite_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → Users.user_id — 등록한 파트너(업체) 회원 ID
- api_content_id — BIGINT — 고캠핑 API 고유 ID (contentId)
- name — VARCHAR(255) — 캠핑장 이름 (facltNm)
- intro — TEXT — 캠핑장 한줄/상세소개 (lineIntro, intro)
- address — VARCHAR(255) — 주소 (addr1)
- latitude — DOUBLE — 위도 (mapY)
- longitude — DOUBLE — 경도 (mapX)
- phone — VARCHAR(50) — 연락처 (tel)
- camp_type — VARCHAR(100) — 업종 (induty - 예: 일반야영장,글램핑)
- facility_info — TEXT — 부대시설 정보 (sbrsCl 등)
- image_url — VARCHAR(255) — 대표 이미지 URL (firstImageUrl)
- homepage_url — VARCHAR(255) — 홈페이지 (homepage)
- price — INT — 1박당 가격 (우리 DB 전용 추가 정보)
- status — VARCHAR(50) — ACTIVE, PENDING 등
- created_at — TIMESTAMP
Comments
- comment_id — BIGINT — Primary key — NOT NULL
- post_id — BIGINT — Foreign key → Posts.post_id
- user_id — BIGINT — Foreign key → Users.user_id
- content — TEXT
- created_at — TIMESTAMP
Notifications
- notification_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → Users.user_id — 알림 수신자
- type — VARCHAR(50) — RESERVATION_CONFIRMED, D_MINUS_1 등
- message — VARCHAR(255)
- is_read — BOOLEAN
- created_at — TIMESTAMP
Payments
- payment_id — BIGINT — Primary key — NOT NULL
- reservation_id — BIGINT — Foreign key → Reservations.reservation_id
- amount — INT — 결제 금액
- status — VARCHAR(50) — COMPLETED, REFUNDED
- created_at — TIMESTAMP
Posts
- post_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → Users.user_id
- category — VARCHAR(50) — GENERAL, COMPANION, TRANSFER
- title — VARCHAR(255)
- content — TEXT
- view_count — INT
- is_blinded — BOOLEAN — 관리자 블라인드 처리
- created_at — TIMESTAMP
Reports
- report_id — BIGINT — Primary key — NOT NULL
- post_id — BIGINT — Foreign key → Posts.post_id
- reporter_id — BIGINT — Foreign key → Users.user_id
- reason — VARCHAR(255) — 신고 사유
- status — VARCHAR(50) — PENDING, ACCEPTED, REJECTED
- created_at — TIMESTAMP
Reservations
- reservation_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → Users.user_id — 예약한 고객 ID
- campsite_id — BIGINT — Foreign key → Campsites.campsite_id — 예약할 캠핑장 ID
- check_in_date — DATE
- check_out_date — DATE
- guest_count — INT — 예약 인원
- status — VARCHAR(50) — PENDING, CONFIRMED, REJECTED, CANCELLED
- rejected_reason — VARCHAR(255) — 거절/반려 사유
- expired_at — TIMESTAMP — PENDING 후 24시간 만료 시점
- cancelled_at — TIMESTAMP — 고객이 취소한 시점
- created_at — TIMESTAMP
Reviews
- review_id — BIGINT — Primary key — NOT NULL
- reservation_id — BIGINT — Foreign key → Reservations.reservation_id — 이용한 예약 건
- user_id — BIGINT — Foreign key → Users.user_id — 작성자
- campsite_id — BIGINT — Foreign key → Campsites.campsite_id — 대상 캠핑장
- rating — INT — 평점 (1~5)
- content — TEXT
- created_at — TIMESTAMP
Transfers
- transfer_id — BIGINT — Primary key — NOT NULL
- reservation_id — BIGINT — Foreign key → Reservations.reservation_id
- transferor_id — BIGINT — Foreign key → Users.user_id — 양도자
- transferee_id — BIGINT — Foreign key → Users.user_id — 양수자 (초기엔 NULL)
- transfer_code — VARCHAR(255) — 양도 키값
Users
- user_id — BIGINT — Primary key — NOT NULL
- provider — VARCHAR(50) — KAKAO, GOOGLE, NAVER
- email — VARCHAR(255)
- nickname — VARCHAR(100)
- profile_image — VARCHAR(255) — 프로필 이미지 URL
- role — VARCHAR(50) — CUSTOMER, PARTNER, ADMIN
- is_blacklisted — BOOLEAN
- created_at — TIMESTAMP
- deleted_at — TIMESTAMP — 소프트 딜리트