Knock Service Tables
Tables (44)
affiliate (제휴사)
- affiliate_index (테이블 인덱스) — SMALL SERIAL PRIMANRY KEY — Primary key — NOT NULL
- company (제휴사명) — VARCHAR(50), NOT NULL, UNIQUE
- manager (담당자) — VARCHAR(10), NOT NULL
- created_at (생성일) — TIMESTAMP, NOT NULL
affiliate_code (제휴사 코드)
- affiliate_index (테이블 인덱스) — SMALL INT, NOT NULL — Foreign key → affiliate.affiliate_index — NOT NULL
- user_index (유저 인덱스) — SMALL INT — Foreign key → users.user_index — NOT NULL
- code (제휴사 인증코드) — VARCHAR(255), NOT NULL
agree_terms_of_service (동의받은 거 저장하는 테이블)
- terms_of_service_index (terms_of_service 테이블 PK) — SMALL INT, NOT NULL — Foreign key → terms_of_service.terms_of_service_index — NOT NULL
- user_index (user 테이블 PK) — BIG INT, NOT NULL — Foreign key → users.user_index — NOT NULL
- created_at (약관 동의 일시) — TIMESTAMP, NOT NULL
alarm (알람)
- alarm_index (알람 인덱스) — BIG SERIAL, PRIMARY KEY — Primary key — NOT NULL
- user_index (user table 인덱스) — BIG INT, NOT NULL — Foreign key → users.user_index — NOT NULL
- payment_key (결제 정보 인덱스) — VARCHAR(80), NOT NULL — Foreign key → payment_info.payment_key — NOT NULL
- is_checked (확인여부) — BOOLEAN, NOT NULL
- title (제목) — VARCHAR(100), NOT NULL
- content (내용) — TEXT, NOT NULL
- created_at (생성일자) — TIMESTAMP, NOT NULL
allotted_test (전문가에게 배정된 검사)
- expert_index (전문가 인덱스) — BIG INT, NOT NULL — Foreign key → expert.expert_index — NOT NULL
- payment_key (결제 정보 인덱스) — VARCHAR(80), NOT NULL, UNIQUE — Foreign key → test_payment.payment_key — NOT NULL
- counseling_start_time (상담시간) — TIMESTAMP
- counseling_end_time (상담종료시간) — TIMESTAMP
available_counseling_time (상담가능시간)
- expert_index (전문가 인덱스) — BIG INT, NOT NULL — Foreign key → expert.expert_index — NOT NULL
- available_time (상담 가능 시간) — JSONB
banner (배너)
- banner_index (테이블 인덱스) — SMALL SERIAL, PRIMARY KEY — Primary key — NOT NULL
- title_img_url (대표 이미지 url) — VARCHAR(255), NOT NULL
- content_img_url (내용 이미지 url) — VARCHAR(255), NOT NULL
- title (제목) — VARCHAR(30), NOT NULL
- is_opened (공개여부) — BOOLEAN, NOT NULL
- banner_order (배너 순서) — SMALL INT, NOT NULL
- created_at (배너 생성일) — TIMESTAMP, NOT NULL
chatting (보낸 채팅)
- chatting_index (채팅 인덱스) — BIG SERIAL, PRIMARY KEY — Primary key — NOT NULL
- room_index (방 인덱스) — BIG INT, NOT NULL — Foreign key → room.room_index — NOT NULL
- sender_index (보낸사람 참가자 인덱스 (participant_index)) — BIG INT, NOT NULL — NOT NULL
- message (내용) — TEXT, NOT NULL
- is_alarm (알람여부) — BOOLEAN, NOT NULL
- created_at (생성일) — TIMESTAMP, NOT NULL
- voice_call_info (음성채널과 관련된 정보) — JSONB
- '' ({voice_call_type, agora_token, channel_id,})
- alarm_index (알람 유형 인덱스) — INT
- link (영상채팅 링크) — VARCHAR(300)
counseling_method_1st (상담방식 1차분류)
- counseling_method_1st_index (상담방식 인덱스) — SMALL SERIAL, PRIMARY KEY — Primary key — NOT NULL
- counseling_method (상담방식) — VARCHAR(20)
counseling_method_2nd (상담방식 2차분류)
- counseling_method_2nd_index (상담방식 인덱스) — SMALL SERIAL, PRIMARY KEY — Primary key — NOT NULL
- counseling_method (상담방식) — VARCHAR(20)
counseling_method_3rd (상담방식 3차분류)
- counseling_method_3rd_index (상담방식 인덱스) — SMALL SERIAL, PRIMARY KEY — Primary key — NOT NULL
- counseling_method (상담방식) — VARCHAR(20)
counseling_type (상담유형)
- counseling_type_index (상담유형 인덱스) — SMALL SERIAL, PRIMARY KEY — Primary key — NOT NULL
- type (상담유형) — VARCHAR(10)
coupon (쿠폰)
- coupon_index (테이블 인덱스) — BIG SERIAL, PRIMARY KEY — Primary key — NOT NULL
- name (쿠폰명) — VARCHAR(30), NOT NULL
- description (쿠폰 설명) — VARCHAR(50), NOT NULL
- type (적용 가능한 상담 종류) — VARCHAR(20), NOT NULL
- available_period (유효기간) — small int, NOT NULL
- active_status (활성/비활성) — BOOLEAN, NOT NULL
- affiliates (제휴사) — VARCHAR(50), NOT NULL
- available_count (사용가능회수) — smallint, NOT NULL
- discount_amount (할인금액 / 할인율) — VARCHAR(20), NOT NULL
- created_at (생성일자) — TIMESTAMP, NOT NULL
emoticon (이모티콘)
- emoticon_index (이모티콘 인덱스) — SMALLINT PRIMARY KEY — Primary key — NOT NULL
- emoticon (이모티콘) — VARCHAR(30) NOT NULL
expert (심리전문가)
- expert_index (전문가 인덱스) — BIG SERIAL, PRIMARY KEY — Primary key — NOT NULL
- expert_status (전문가 처리상태 (wait / apply / reject / done)) — VARCHAR(10), NOT NULL
- name (이름) — VARCHAR(50), NOT NULL
- email (이메일) — VARCHAR(50), NOT NULL
- password (비밀번호) — VARCHAR(255), NOT NULL
- phone_number (전화번호) — VARCHAR(20), NOT NULL
- safety_number (안심번호) — VARCHAR(20)
- profile_img_url (프로필 이미지 url) — VARCHAR(255), NOT NULL
- id_card_img_url (신분증 이미지 url) — VARCHAR(255), NOT NULL
- bankbook_copy_img_url (통장사본 이미지 url) — VARCHAR(255), NOT NULL
- education (학력정보) — JSONB[]
- qualification (주요 자격) — JSONB[]
- career (주요 경력) — JSONB[]
- introduction_title (소개글 제목) — TEXT
- introduction_contents (소개글 내용) — TEXT
- bank (은행) — VARCHAR(20)
- account_number (계좌번호) — VARCHAR(30)
- account_holder (예금주) — VARCHAR(15)
- account_memo (계좌 관련 메모) — TEXT
- created_at (생성일) — TIMESTAMP
- is_inactivated (휴면여부) — BOOLEAN, NOT NULL
- is_blocked (차단여부) — BOOLEAN, NOT NULL
- remark (비고) — TEXT
- address (상담사 주소) — TEXT
expert_counseling_method_1st (전문가의 상담방식 1차분류)
- expert_index (전문가 인덱스) — BIG INT, NOT NULL — Foreign key → expert.expert_index — NOT NULL
- counseling_method_1st_index (상담방식 인덱스) — INT, NOT NULL — Foreign key → counseling_method_1st.counseling_method_1st_index — NOT NULL
expert_counseling_method_2nd (전문가의 상담방식 2차분류)
- expert_index (전문가 인덱스) — BIG INT, NOT NULL — Foreign key → expert.expert_index — NOT NULL
- counseling_method_2nd_index (상담방식 인덱스) — INT, NOT NULL — Foreign key → counseling_method_2nd.counseling_method_2nd_index — NOT NULL
expert_counseling_method_3rd (전문가의 상담방식 3차분류)
- expert_index (전문가 인덱스) — BIG INT, NOT NULL — Foreign key → expert.expert_index — NOT NULL
- counseling_method_3rd_index (상담방식 인덱스) — INT, NOT NULL — Foreign key → counseling_method_3rd.counseling_method_3rd_index — NOT NULL
expert_counseling_type (전문가의 상담유형(영상, 음성))
- counseling_type_index (상담유형 인덱스) — INT, NOT NULL — Foreign key → counseling_type.counseling_type_index — NOT NULL
- expert_index (전문가 인덱스) — BIG INT, NOT NULL — Foreign key → expert.expert_index — NOT NULL
expert_review (상담 후기)
- expert_reviews_index (테이블 인덱스) — BIG SERIAL, PRIMARY KEY — Primary key — NOT NULL
- user_index (유저 인덱스) — BIG INT, NOT NULL — Foreign key → users.user_index — NOT NULL
- expert_index (전문가 인덱스) — BIG INT, NOT NULL — Foreign key → expert.expert_index — NOT NULL
- payment_key (결제 정보 인덱스) — VARCHAR(80), NOT NULL, UNIQUE — Foreign key → payment_info.payment_key — NOT NULL
- reviews (리뷰 내용) — TEXT, NOT NULL
- gpa (평점) — REAL, NOT NULL
- is_best (베스트리뷰여부) — BOOLEAN, NOT NULL
- is_opened (공개여부) — BOOLEAN, NOT NULL
- writed_at (작성일) — TIMESTAMP, NOT NULL
expert_safety_number_reason (안심번호 변경 사유 테이블)
- reason_index (변경 사유 인덱스) — BIG SERIAL, PRIMARY KEY — Primary key — NOT NULL
- expert_index (전문가 인덱스) — BIG INT, NOT NULL — Foreign key → expert.expert_index — NOT NULL
- reason (변경사유) — TEXT
- after_number (변경 후 안심번호) — VARCHAR(20), NOT NULL
- phone_number (전화번호) — VARCHAR(20), NOT NULL
- is_valid (유효여부) — BOOLEAN, NOT NULL
- issue_type (발급구분 (신규 / 변경)) — CHAR(2), NOT NULL
- created_at (발급일자) — TIMESTAMP, NOT NULL
expert_type (전문가 종류)
- expert_type_index (상담가 종류 인덱스) — SMALL SERIAL, PRIMARY KEY — Primary key — NOT NULL
- expert_type (상담가 종류) — VARCHAR(30), NOT NULL
favorite_expert (찜한 상담사)
- user_index (사용자 인덱스) — BIG INT, NOT NULL — Foreign key → users.user_index — NOT NULL
- expert_index (전문가 인덱스) — BIG INT, NOT NULL — Foreign key → expert.expert_index — NOT NULL
gomin_knock (고민노크)
- gomin_knock_index (테이블 인덱스) — BIG SERIAL, PRIMARY KEY — Primary key — NOT NULL
- user_index (user 테이블 PK) — BIG INT NOT NULL — Foreign key → users.user_index — NOT NULL
- content (고민내용) — TEXT NOT NULL
- writed_at (작성일시) — TIMESTAMP, NOT NULL
gomin_knock_reply (고민노트 댓글)
- gomin_knock_reply_index (테이블 인덱스) — BIG SERIAL, PRIMARY KEY — Primary key — NOT NULL
- gomin_knock_index (gomin_knock 테이블 PK) — BIG INT NOT NULL — Foreign key → gomin_knock.gomin_knock_index — NOT NULL
- expert_index (전문가 인덱스) — BIG INT NOT NULL — Foreign key → expert.expert_index — NOT NULL
- reply (고민노크 댓글) — TEXT, NOT NULL
- purpose (목적) — VARCHAR(10) NOT NULL
- subject (주제) — VARCHAR(10) NOT NULL
- depression (우울) — VARCHAR(2)
- anxiety (불안) — VARCHAR(2)
- symptom (증상) — TEXT[]
- writed_at (작성일시) — TIMESTAMP, NOT NULL
have_coupon (쿠폰 소유 여부)
- have_coupon_index (테이블 인덱스) — BIGSERIAL PRIMARY KEY — Primary key — NOT NULL
- user_index (user 테이블 PK) — BIG INT, NOT NULL — Foreign key → users.user_index — NOT NULL
- coupon_index (coupon 테이블 PK) — BIG INT, NOT NULL — Foreign key → coupon.coupon_index — NOT NULL
- payment_key (쿠폰이 사용된 결제번호) — VARCHAR(80)
- available_period (유효기간) — TIMESTAMP, NOT NULL
have_expert_type (어떤 전문가인지를 나타냄)
- expert_index (전문가 인덱스) — BIG INT, NOT NULL — Foreign key → expert.expert_index — NOT NULL
- expert_type_index (상담가 종류 인덱스) — INT, NOT NULL — Foreign key → expert_type.expert_type_index — NOT NULL
macro_message (자주 쓰는 메시지)
- macro_message_index (매크로 인덱스) — BIG SERIAL, PRIMARY KEY — Primary key — NOT NULL
- expert_index (전문가 인덱스) — BIG INT , NOT NULL — Foreign key → expert.expert_index — NOT NULL
- message (메시지 내용) — TEXT
monthly_pay_memo (정산처리 메모)
- monthly_pay_memo_index (메모 인덱스) — BIG SERIAL, PRIMARY KEY — Primary key — NOT NULL
- expert_index (전문가 인덱스) — BIG INT,, NOT NULL — Foreign key → expert.expert_index — NOT NULL
- date (정산월) — DATE, NOT NULL
- memo (정산처리 메모) — TEXT
participant (해당 room에 배치된 참가자 각각의 정보(user / expert))
- participant_index (참가자 인덱스) — BIG SERIAL, PRIMARY KEY — Primary key
- room_index (방 인덱스) — BIG INT, NOT NULL — Foreign key → room.room_index — NOT NULL
- user_index (유저 인덱스) — BIG INT — Foreign key → room.user_index — NOT NULL
- expert_index (전문가 인덱스) — BIG INT — Foreign key → room.expert_index — NOT NULL
- not_read_chat — SMALL INT, NOT NULL
- last_read_chat_id — SMALL INT
payment_info (결제정보)
- payment_key (결제 정보 인덱스) — VARCHAR(80), PRIMARY KEY — Primary key — NOT NULL
- order_id (주문번호) — CHAR(12), NOT NULL
- user_index (유저 인덱스) — BIG INT, NOT NULL
- product_name (상품명) — VARCHAR(30), NOT NULL
- status (결제상태 (done, cancel, refund)) — VARCHAR(10), NOT NULL
- price (결제금액) — INT, NOT NULL
- original_price (할인 받기 전 금액) — INT, NOT NULL
- payment_method (결제방식) — VARCHAR(10), NOT NULL
- payment_date (결제일) — TIMESTAMP, NOT NULL
- counseling_type (상담방식 (음성 / 영상 / 미정)) — CHAR(2), NOT NULL
- counseling_status (상담진행현황 (일정조율, 일정확정,상담중,상담종료,배정취소, 환불됨)) — VARCHAR(10), NOT NULL
- ... (검사의 경우 '검사대기' 상태가 배정되기 전에 존재)
- cancel_amount (취소금액) — INT, NOT NULL
- cancel_date (결제취소일) — TIMESTAMP
- is_counseling_time_changed (상담 일정 변경 여부) — BOOLEAN, NOT NULL
pre_question_answer (사전질문답변)
- payment_key (결제 정보 인덱스) — VARCHAR(80), NOT NULL — Foreign key → psychology_payment.payment_key — NOT NULL
- sex (성별) — CHAR(2), NOT NULL
- birth_date (생년월일) — TIMESTAMP, NOT NULL
- job (직업) — VARCHAR(20), NOT NULL
- education (학력) — VARCHAR(10), NOT NULL
- subject (상담받고 싶은 주제) — text[], NOT NULL
- offlinecounseling (대면상담경험 여부) — BOOLEAN, NOT NULL
- onlinecounseling (비대면상담경험 여부) — BOOLEAN, NOT NULL
- medicinetherapy (약물치료경험 여부) — BOOLEAN, NOT NULL
- personality (성격표현 형용사 3가지) — TEXT, NOT NULL
- counselingmotive (상담 신청 동기) — TEXT, NOT NULL
- hope (검사를 통해 바라는 점) — TEXT, NOT NULL
psychology_payment (상담 결제)
- payment_key (결제 정보 인덱스) — VARCHAR(80), NOT NULL, UNIQUE — Foreign key → payment_info.payment_key — NOT NULL
- expert_index (전문가 인덱스) — BIG INT, NOT NULL — Foreign key → expert.expert_index — NOT NULL
- user_index (유저 인덱스) — BIG INT, NOT NULL — Foreign key → users.user_index — NOT NULL
- counseling_start_time (상담시작시간) — TIMESTAMP
- counseling_end_time (상담종료시간) — TIMESTAMP
register_wait (전문가 등록 대기 테이블)
- expert_index (전문가 인덱스) — BIG INT, NOT NULL — Foreign key → expert.expert_index — NOT NULL
- registered (등록완료) — BOOLEAN, NOT NULL
reject_reason (반려 사유 테이블)
- reason_index (반려 사유 인덱스) — BIG SERIAL, PRIMARY KEY — Primary key — NOT NULL
- expert_index (전문가 인덱스) — BIG INT, NOT NULL — Foreign key → expert.expert_index — NOT NULL
- reason (반려 사유) — TEXT, NOT NULL
- created_at (반려 사유 생성일) — TIMESTAMP, NOT NULL
reply_emoticon (댓글에 대한 반응)
- gomin_knock_reply_index (gomin_knock_reply 테이블 PK) — BIG INT NOT NULL — Foreign key → gomin_knock_reply.gomin_knock_reply_index — NOT NULL
- emoticon_index (이모티콘 인덱스) — BIG INT NOT NULL — Foreign key → emoticon.emoticon_index — NOT NULL
room (room 자체의 정보)
- room_index (방 인덱스) — BIG SERIAL, PRIMARY KEY — Primary key — NOT NULL
- user_index (유저 인덱스) — BIG INT, NOT NULL — Foreign key → users.user_index — NOT NULL
- expert_index (전문가 인덱스) — BIG INT, NOT NULL — Foreign key → expert.expert_index — NOT NULL
- last_chat_index (마지막 채팅 인덱스) — BIG INT
- is_terminated (종료여부) — BOOLEAN, NOT NULL
- created_at (생성일) — TIMESTAMP, NOT NULL
- end_at (종료일) — TIMESTAMP
room_payment_history (방-결제이력 테이블)
- payment_key (결제 정보 인덱스) — VARCHAR(80), NOT NULL — Foreign key → payment_info.payment_key — NOT NULL
- room_index (방 인덱스) — BIG INT, NOT NULL — Foreign key → room.room_index — NOT NULL
service_progress (서비스 이용내역)
- payment_key (결제 정보 인덱스) — VARCHAR(80), NOT NULL — Foreign key → payment_info.payment_key — NOT NULL
- title (메시지 제목) — VARCHAR(100), NOT NULL
- content (메시지 내용) — TEXT, NOT NULL
- created_at (알람 생성일) — TIMESTAMP, NOT NULL
super_admin (관리자계정)
- admin_index (관리자 인덱스) — small serial, PRIMARY KEY — Primary key — NOT NULL
- email (이메일) — VARCHAR(100)
- password (비밀번호) — VARCHAR(255)
- name (이름) — VARCHAR(10)
terms_of_service (이용약관)
- terms_of_service_index (테이블 인덱스) — SMALL SERIAL, PRIMARY KEY — Primary key — NOT NULL
- title (약관 제목) — VARCHAR(30), NOT NULL
- contents (약관 내용) — TEXT, NOT NULL
- is_activated (활성화여부) — BOOLEAN, NOT NULL
test_payment (검사 결제)
- payment_key (결제 정보 인덱스) — VARCHAR(80),, NOT NULL, UNIQUE — Foreign key → payment_info.payment_key — NOT NULL
- user_index (user 테이블 PK) — BIG INT, NOT NULL — Foreign key → users.user_index — NOT NULL
- expiration_date (만료일) — TIMESTAMP, NOT NULL
test_result (검사결과)
- payment_key (결제 정보 인덱스) — VARCHAR(80), NOT NULL, UNIQUE — Foreign key → test_payment.payment_key — NOT NULL
- result (검사결과) — JSON
- is_opened (검사결과 오픈여부) — BOOLEAN, NOT NULL
- testing_date (검사일시) — TIMESTAMP
users (서비스 이용자)
- user_index (유저 인덱스) — BIG SERIAL, PRIMARY KEY — Primary key — NOT NULL
- id (아이디(이메일)) — VARCHAR(50), NOT NULL, UNIQUE
- password (비밀번호) — VARCHAR(255)
- platform (로그인 플랫폼) — VARCHAR(15), NOT NULL
- nickname (닉네임) — VARCHAR(20), NOT NULL — NOT NULL
- is_left (탈퇴여부) — BOOLEAN, NOT NULL
- is_blocked (차단여부) — BOOLEAN, NOT NULL
- email_certification (이메일 인증) — BOOLEAN, NOT NULL
- affiliate (제휴사) — VARCHAR(20)
- sns_identifier (소셜로그인 식별자) — VARCHAR(100)
- created_at (계정 생성일) — TIMESTAMP, NOT NULL
- device_token (디바이스 토큰) — VARCHAR(200)