BizSprout

Tables (13)

USERS

  • user_id — INT — Primary key — NOT NULL — 회원고유번호
  • email — VARCHAR(100) — NOT NULL — 이메일계정
  • password — VARCHAR(255) — NOT NULL — 암호화비밀번호
  • name — VARCHAR(50) — NOT NULL — 사용자명
  • role — VARCHAR(20) — NOT NULL — 권한구분(USER/MENTOR/ADMIN)
  • status — VARCHAR(20) — NOT NULL — 계정상태(ACTIVE/SLEEP/LEAVE)
  • created_at — DATETIME — NOT NULL — 최초가입일시
  • updated_at — DATETIME — NOT NULL — 최종수정일시

idea_reviews

  • review_id — BIGINT — Primary key — NOT NULL — 리뷰 고유 ID
  • idea_id — BIGINT — Foreign key → ideas.idea_id — NOT NULL — ideas 참조
  • reviewer_id — BIGINT — Foreign key → users.user_id — NOT NULL — 리뷰어 users.user_id
  • rating — TINYINT — NOT NULL — 별점 (1~5)
  • comment — TEXT — NOT NULL — 피드백 본문
  • is_anonymous — TINYINT(1) — NOT NULL — 익명 리뷰 여부
  • created_at — DATETIME — NOT NULL — 작성 일시

ideas

  • idea_id — BIGINT — Primary key — NOT NULL — 아이디어 고유 ID
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL — 작성자 users.user_id
  • title — VARCHAR(200) — NOT NULL — 제목
  • content — TEXT — NOT NULL — 본문
  • category — VARCHAR(50) — 분야 카테고리
  • is_anonymous — TINYINT(1) — NOT NULL — 익명 여부
  • view_count — INT — NOT NULL — 조회 수
  • status — ENUM('active', 'closed', 'deleted') — NOT NULL — 게시 상태
  • created_at — DATETIME — NOT NULL — 작성 일시
  • updated_at — DATETIME — NOT NULL — 수정 일시

mentor_profiles

  • profile_id — BIGINT — Primary key — NOT NULL — 멘토 프로필 ID
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL — users.user_id 참조
  • bio — TEXT — 자기소개
  • field — VARCHAR(100) — NOT NULL — 전문 분야
  • career_years — TINYINT — NOT NULL — 경력 연수
  • hourly_rate — DECIMAL(10, 2) — NOT NULL — 세션 시간당 단가(원)
  • avg_rating — DECIMAL(3, 2) — NOT NULL — 평균 별점
  • session_count — INT — NOT NULL — 누적 세션 수
  • is_verified — TINYINT(1) — NOT NULL — 멘토 자격 인증 여부
  • created_at — DATETIME — NOT NULL — 등록 일시
  • updated_at — DATETIME — NOT NULL — 수정 일시

mentor_schedules

  • schedule_id — BIGINT — Primary key — NOT NULL — 일정 고유 ID
  • profile_id — BIGINT — Foreign key → mentor_profiles.profile_id — NOT NULL — mentor_profiles 참조
  • available_at — DATETIME — NOT NULL — 예약 가능 시작 일시
  • duration_min — SMALLINT — NOT NULL — 가용 시간(분)
  • is_booked — TINYINT(1) — NOT NULL — 예약 완료 여부

milestone_tasks

  • task_id — BIGINT — Primary key — NOT NULL — 태스크 고유 ID
  • milestone_id — BIGINT — Foreign key → milestones.milestone_id — NOT NULL — milestones 참조
  • content — VARCHAR(300) — NOT NULL — 할 일 내용
  • is_done — TINYINT(1) — NOT NULL — 완료 여부
  • due_date — DATE — 태스크 기한
  • sort_order — SMALLINT — NOT NULL — 정렬 순서

milestones

  • milestone_id — BIGINT — Primary key — NOT NULL — 마일스톤 고유 ID
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL — users.user_id 참조
  • title — VARCHAR(200) — NOT NULL — 목표 제목
  • description — TEXT — 목표 상세 설명
  • due_date — DATE — 목표 기한
  • status — ENUM('todo', 'in_progress', 'done') — NOT NULL — 진행 상태
  • progress_pct — TINYINT — NOT NULL — 달성률 0~100
  • created_at — DATETIME — NOT NULL — 생성 일시
  • updated_at — DATETIME — NOT NULL — 수정 일시

notifications

  • noti_id — BIGINT — Primary key — NOT NULL — 알림 고유 ID
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL — 수신자 users.user_id
  • type — ENUM('session_confirm', 'session_cancel', 'review_received', 'milestone_due', 'payment_done', 'system') — NOT NULL — 알림 유형
  • title — VARCHAR(200) — NOT NULL — 알림 제목
  • body — TEXT — 알림 본문
  • ref_id — BIGINT — 관련 리소스 ID
  • is_read — TINYINT(1) — NOT NULL — 읽음 여부
  • created_at — DATETIME — NOT NULL — 생성 일시

payments

  • payment_id — BIGINT — Primary key — NOT NULL — 결제 고유 ID
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL — 결제자 users.user_id
  • session_id — BIGINT — Foreign key → sessions.session_id — 세션 결제인 경우 sessions 참조
  • sub_id — BIGINT — Foreign key → subscriptions.sub_id — 구독 결제인 경우 subscriptions 참조
  • amount — DECIMAL(10, 2) — NOT NULL — 결제 금액(원)
  • method — ENUM('card', 'kakao_pay', 'naver_pay', 'toss') — NOT NULL — 결제 수단
  • status — ENUM('pending', 'paid', 'refunded', 'failed') — NOT NULL — 결제 상태
  • pg_tx_id — VARCHAR(200) — PG사 거래 ID
  • paid_at — DATETIME — 결제 완료 일시
  • created_at — DATETIME — NOT NULL — 생성 일시

session_reviews

  • review_id — BIGINT — Primary key — NOT NULL — 리뷰 고유 ID
  • session_id — BIGINT — Foreign key → sessions.session_id — NOT NULL — sessions 참조
  • reviewer_id — BIGINT — Foreign key → users.user_id — NOT NULL — 작성자 users.user_id
  • rating — TINYINT — NOT NULL — 별점 (1~5)
  • comment — TEXT — 리뷰 본문
  • created_at — DATETIME — NOT NULL — 작성 일시

sessions

  • session_id — BIGINT — Primary key — NOT NULL — 세션 고유 ID
  • mentor_id — BIGINT — Foreign key → mentor_profiles.profile_id — NOT NULL — mentor_profiles 참조
  • mentee_id — BIGINT — Foreign key → users.user_id — NOT NULL — users.user_id 참조 (멘티)
  • schedule_id — BIGINT — Foreign key → mentor_schedules.schedule_id — NOT NULL — mentor_schedules 참조
  • scheduled_at — DATETIME — NOT NULL — 세션 예약 일시
  • duration_min — SMALLINT — NOT NULL — 세션 시간(분)
  • status — ENUM('pending', 'confirmed', 'in_progress', 'done', 'cancelled') — NOT NULL — 진행 상태
  • price — DECIMAL(10, 2) — NOT NULL — 결제 금액(원)
  • cancel_reason — VARCHAR(500) — 취소 사유
  • created_at — DATETIME — NOT NULL — 예약 생성 일시
  • updated_at — DATETIME — NOT NULL — 수정 일시

subscriptions

  • sub_id — BIGINT — Primary key — NOT NULL — 구독 고유 ID
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL — users.user_id 참조
  • plan — ENUM('free', 'monthly', 'yearly') — NOT NULL — 구독 플랜
  • started_at — DATE — NOT NULL — 구독 시작일
  • expires_at — DATE — 구독 만료일
  • is_active — TINYINT(1) — NOT NULL — 활성 구독 여부
  • created_at — DATETIME — NOT NULL — 생성 일시

users

  • user_id — BIGINT — Primary key — NOT NULL — 회원 고유 ID
  • email — VARCHAR(255) — NOT NULL — 로그인 이메일
  • password_hash — VARCHAR(255) — NOT NULL — bcrypt 해시 비밀번호
  • name — VARCHAR(100) — NOT NULL — 실명
  • role — ENUM('mentee', 'mentor', 'admin') — NOT NULL — 역할
  • provider — ENUM('local', 'google', 'kakao') — NOT NULL — 소셜 로그인 제공사
  • profile_image — VARCHAR(500) — 프로필 이미지 URL
  • is_active — TINYINT(1) — NOT NULL — 활성 여부
  • created_at — DATETIME — NOT NULL — 가입 일시
  • updated_at — DATETIME — NOT NULL — 수정 일시