HouseHub
테이블 (14)
계약 (contracts)
- contract_id (계약 식별자) — bigint — 기본 키 — NOT NULL
- customer_id (임차인 또는 매수인 ID) — bigint — 외래 키 → 고객.customer_id — NOT NULL
- property_id (매물 고유 식별자) — bigint — 외래 키 → 매물.property_id — NOT NULL
- agent_id (회원 ID) — bigint — 외래 키 → 공인중개사.agent_id — NOT NULL
- sale_price (매매금) — bigint
- jeonse_price (전새 금액) — bigint
- contract_type (거래 유형(매매, 전세, 월세)) — ContractType
- monthly_rent_fee (월세 금액) — int
- monthly_rent_deposit (월세 보증금) — int
- status (상태(거래중, 거래완료)) — ContractStatus
- memo (참고 설명) — text
- expiredAt (계약 만료 일자) — date
- startedAt (계약 시작일)
- completedAt (계약 완료 일)
- active (Field3)
고객 (customers)
- customer_id (고객 ID) — bigint — 기본 키 — NOT NULL
- agent_id (회원 ID) — bigint — 외래 키 → 공인중개사.agent_id — NOT NULL
- name (고객 이름) — varchar
- age_group (연령대(ex. 20, 30)) — int
- contact (연락처) — varchar
- email (이메일) — varchar
- memo (참고 정보) — text
- gender (성별(남, 여)) — Gender
- created_at (등록일시) — DATETIME
- updated_at (수정일시) — DATETIME
- deleted_at (삭제일시) — DATETIME
고객 관심사 태그 (customer_interest_tags)
- customer_interest_tag_id (Key) — 기본 키 — NOT NULL
- customer_id (고객 고유 식별자) — bigint — 외래 키 → 고객.customer_id — NOT NULL
- tag_id (태그 고유 식별자) — bigint — 외래 키 → 전체 태그.tag_id — NOT NULL
공인중개사 (agents)
- agent_id (회원 ID) — bigint — 기본 키 — NOT NULL
- real_estate_id (소속 부동산 ID) — bigint — 외래 키 → 부동산.real_estate_id — NOT NULL
- license_number (공인중개사 등록 번호) — varchar
- email (이메일(로그인 시 사용)) — varchar
- password (비밀번호 (암호화해 저장)) — varchar
- name (이름) — varchar
- contact (연락처) — varchar
- role (역할 (관리자, 공인중개사)) — AgentRole
- status (현재 상태(승인 대기, 승인 완료, 비활성화, 탈퇴, 차단)) — AgentStatus
- created_at (가입일시) — DATETIME
- updated_at (수정일시) — DATETIME
- deleted_at (탈퇴일시) — DATETIME
매물 (properties)
- property_id (매물 고유 식별자) — bigint — 기본 키 — NOT NULL
- agent_id (담당 공인중개사 ID) — bigint — 외래 키 → 공인중개사.agent_id — NOT NULL
- customer_id (의뢰 고객(임대인 또는 매도인) ID) — bigint — 외래 키 → 고객.customer_id — NOT NULL
- property_type (아파트, 빌라, 오피스텔, 상가, 원룸, 투룸) — PropertyType
- province (도, 특별시, 광역시) — varchar
- city (시/군/구) — varchar
- dong (읍/면/동) — varchar
- detail_address (상세 주소) — varchar
- road_address (전체 도로명 주소) — varchar
- created_at (등록일시) — DATETIME
- updated_at (수정일시) — DATETIME
- deleted_at (삭제일시) — DATETIME
- memo (참고 설명) — text
- area (Field)
- floor (층수)
- all_floors (Field2)
- direction (방향)
- bath_room_cnt (욕실 개수)
- room_cnt (방 개수)
매물 태그 (property_tags)
- property_tag_id (Key) — 기본 키 — NOT NULL
- property_id (매물 고유 식별자) — bigint — 외래 키 → 매물.property_id — NOT NULL
- tag_id (태그 고유 식별자) — bigint — 외래 키 → 전체 태그.tag_id — NOT NULL
문의 (inquiries)
- inquiry_id (문의 ID) — bigint — 기본 키 — NOT NULL
- customer_id (고객 ID) — bigint — 외래 키 → 고객.customer_id — NOT NULL
- content (내용) — text
- answer (답변) — text
문자 발송 내역 (sms_logs)
- sms_log_id (문자 발송 내역 ID) — bigint — 기본 키 — NOT NULL
- receiver_phone_number (수신자 전화번호) — varchar
- content (발송 내용) — varchar
- send_time (발송 시간) — DATETIME
- status (발송 상태) — SmsStatus
- agent_id (회원 ID) — bigint — 외래 키 → 공인중개사.agent_id — NOT NULL
문자 템플릿 (sms_templates)
- sms_template_id (템플릿 ID) — bigint — 기본 키 — NOT NULL
- title (템플릿 제목) — varchar
- content (템플릿 내용) — varchar
- agent_id (회원 ID) — bigint — 외래 키 → 공인중개사.agent_id — NOT NULL
부동산 (real_estates)
- real_estate_id (부동산 고유 식별자) — bigint — 기본 키 — NOT NULL
- business_registration_number (사업자 등록 번호('-' 포함)) — varchar
- name (부동산 사무소명) — varchar
- road_address (전체 도로명 주소) — varchar
- address (전체 주소(시/군, 구, 동, 상세주소 포함)) — varchar
- contact (연락처) — varchar
- created_at (등록일시) — DATETIME
- updated_at (수정일시) — DATETIME
- deleted_at (삭제일시) — DATETIME
상담 (consultations)
- consultations_id (상담 ID) — bigint — 기본 키 — NOT NULL
- agent_id (공인중개사 ID) — bigint — 외래 키 → 공인중개사.agent_id — NOT NULL
- customer_id (고객 ID) — bigint — 외래 키 → 고객.customer_id — NOT NULL
- consultation_type (상담 유형) — ConsultationType
- content (상담 내용) — TEXT
- consultation_date (상담 일시) — DATETIME
- status (상담 상태) — ConsulatationStatus
- created_at (상담생성일시) — DATETIME
- updated_at (상담수정일시) — DATETIME
- deleted_at (상담삭제일시) — DATETIME
전체 태그 (tags)
- tag_id (태그 고유 식별자) — bigint — 기본 키 — NOT NULL
- name (태그명) — varchar
크롤링 매물 (crawling_properties)
- crawling_properties_id (크롤링 매물 ID) — bigint — 기본 키 — NOT NULL
- property_type (아파트, 빌라, 오피스텔, 상가, 원룸, 투룸) — PropertyType
- transaction_type (거래 유형(매매, 전세, 월세))) — TransactionType
- province (도/특별시/광역시) — varchar
- city (시/군/구) — varchar
- dong (읍/면/동) — varchar
- detail_address (상세 주소) — varchar
- area (Field) — float
- floor (층수) — varchar
- all_floors (Field2) — varchar
- sale_price (매매 금액) — int
- deposit (전세 금액) — int
- monthly_rent_fee (월세 금액) — int
- direction (방향(동, 서, 남, 북, 남동, 남서, 북동, 북서)) — PropertyDirection
- real_estate_agent_id (공인중개사 고유 ID) — varchar
- real_estate_agent_name (공인중개사 이름) — varchar
- real_estate_agent_contact (공인중개사 전화번호) — varchar
- real_estate_office_name (공인중개사 사무소 이름) — varchar
- real_estate_office_address (공인중개사 사무소 주소) — varchar
- bath_room_cnt (욕실 개수) — float
- room_cnt (방 개수) — float
크롤링 태그 매핑 테이블 (crawling_property_tag_map)
- id (매핑 id) — bigint — 기본 키 — NOT NULL
- crawling_properties_id (크롤링 매물 ID) — bigint — 외래 키 → 크롤링 매물.crawling_properties_id — NOT NULL
- tag_id (태그 고유 식별자) — bigint — 외래 키 → 전체 태그.tag_id — NOT NULL