matcha

Tables (14)

blocks

  • id — INT — Primary key — NOT NULL
  • blocker_id — INT — NOT NULL
  • blocked_id — INT — NOT NULL
  • reason — VARCHAR(255)
  • blocked_at — DATETIME — NOT NULL
  • unblocked_at — DATETIME

conversation_messages

  • id — INT — Primary key — NOT NULL
  • conversation_id — INT — NOT NULL
  • sender_id — INT — NOT NULL
  • content — TEXT — NOT NULL
  • message_type — ENUM('text','image','emoji') — NOT NULL
  • sent_at — DATETIME — NOT NULL
  • read_at — DATETIME
  • is_deleted — TINYINT(1) — NOT NULL

conversations

  • id — INT — Primary key — NOT NULL
  • match_id — INT — NOT NULL
  • last_message_at — DATETIME
  • started_at — DATETIME — NOT NULL

match_likes

  • id — INT — Primary key — NOT NULL
  • liker_id — INT — NOT NULL
  • liked_id — INT — NOT NULL
  • liked_at — DATETIME — NOT NULL
  • withdrawn_at — DATETIME

match_views

  • id — INT — Primary key — NOT NULL
  • viewer_id — INT — NOT NULL
  • viewed_id — INT — NOT NULL
  • viewed_at — DATETIME — NOT NULL

matches

  • id — INT — Primary key — NOT NULL
  • user1_id — INT — NOT NULL
  • user2_id — INT — NOT NULL
  • u1 — INT
  • u2 — INT
  • matched_at — DATETIME — NOT NULL
  • dissolved_at — DATETIME

notifications

  • id — INT — Primary key — NOT NULL
  • recipient_id — INT — NOT NULL
  • notification_type — ENUM('like','match','message','view','system') — NOT NULL
  • actor_id — INT
  • reference_id — INT
  • title — VARCHAR(255) — NOT NULL
  • body — TEXT
  • is_read — TINYINT(1) — NOT NULL
  • created_at — DATETIME — NOT NULL
  • read_at — DATETIME

profile_locations

  • profile_id — INT — Primary key — NOT NULL
  • latitude — DECIMAL(9,6)
  • longitude — DECIMAL(9,6)
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

profile_photos

  • id — INT — Primary key — NOT NULL
  • profile_id — INT — NOT NULL
  • url — VARCHAR(500) — NOT NULL
  • display_order — INT — NOT NULL
  • is_primary — TINYINT(1) — NOT NULL
  • uploaded_at — DATETIME — NOT NULL

profile_preferences

  • profile_id — INT — Primary key — NOT NULL
  • max_distance — INT — NOT NULL
  • min_age — INT — NOT NULL
  • max_age — INT — NOT NULL
  • preferred_gender — ENUM('male','female','non-binary','any') — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

profile_tags

  • profile_id — INT — Primary key — NOT NULL
  • tag — VARCHAR(100) — Primary key — NOT NULL
  • added_at — DATETIME — NOT NULL

profiles

  • id — INT — Primary key — NOT NULL
  • user_id — INT — NOT NULL
  • gender — ENUM('male','female','non-binary','other')
  • orientation — ENUM('straight','gay','lesbian','bisexual','pansexual','other')
  • birth_date — DATE
  • biography — TEXT
  • is_active — TINYINT(1) — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

refresh_tokens

  • id — INT — Primary key — NOT NULL
  • user_id — INT — NOT NULL
  • token_hash — CHAR(64) — NOT NULL
  • issued_at — DATETIME — NOT NULL
  • expires_at — DATETIME — NOT NULL

reports

  • id — INT — Primary key — NOT NULL
  • reporter_id — INT — NOT NULL
  • reported_id — INT — NOT NULL
  • category — ENUM('inappropriate_content','harassment','fake_profile','spam','other') — NOT NULL
  • description — TEXT
  • status — ENUM('pending','reviewed','resolved','dismissed') — NOT NULL
  • priority — ENUM('low','medium','high','critical') — NOT NULL
  • reported_at — DATETIME — NOT NULL
  • reviewed_at — DATETIME
  • reviewed_by — INT