start_example

Tables (9)

Matching

  • matching_id — BIGINT — Primary key
  • mentor_id — BIGINT — NOT NULL
  • mentee_id — BIGINT — NOT NULL
  • status — VARCHAR(20)
  • request_date — DATETIME
  • mentor_id (mentor_id2) — BIGINT — Foreign key → MentorProfile.mentor_id
  • user_id — BIGINT — Foreign key → MentorProfile.user_id
  • user_id (user_id2) — BIGINT — Foreign key → MenteeProfile.user_id

MenteeProfile

  • user_id — BIGINT — Foreign key → User.user_id
  • mentee_id — BIGINT
  • interest_field — VARCHAR(100)
  • goal — TEXT

MentorProfile

  • mentor_id — BIGINT — Primary key
  • user_id — BIGINT — Foreign key → User.user_id
  • specialty — VARCHAR(100)
  • experience — TEXT
  • introduction — TEXT

Message

  • message_id — BIGINT
  • sender_id — BIGINT — NOT NULL
  • receiver_id — BIGINT — NOT NULL
  • content — TEXT — NOT NULL
  • sent_at — DATETIME
  • user_id — BIGINT — Foreign key → User.user_id

Review

  • review_id — BIGINT
  • matching_id — BIGINT — NOT NULL
  • reviewer_id — BIGINT — NOT NULL
  • rating — INT
  • content — TEXT
  • created_at — DATETIME
  • matching_id (matching_id2) — BIGINT — Foreign key → Matching.matching_id
  • user_id — BIGINT — Foreign key → User.user_id

Role

  • role_id — INT — Primary key
  • role_name — VARCHAR(20) — NOT NULL

Schedule

  • matching_id (matching_id2) — BIGINT — Foreign key → Matching.matching_id
  • schedule_id — BIGINT
  • matching_id — BIGINT — NOT NULL
  • schedule_time — DATETIME — NOT NULL
  • location — VARCHAR(255)

User

  • user_id — BIGINT — Primary key
  • email — VARCHAR(100) — NOT NULL
  • password — VARCHAR(255) — NOT NULL
  • name — VARCHAR(50) — NOT NULL
  • phone — VARCHAR(20)
  • created_at — DATETIME

UserRole

  • user_id (user_id2) — BIGINT — Foreign key → User.user_id
  • role_id (role_id2) — INT — Foreign key → Role.role_id