Sportify

Tables (9)

follows

  • id — uuid — Primary key — NOT NULL
  • user_id — uuid
  • follow_type — text — NOT NULL
  • follow_name — text — NOT NULL
  • follow_avatar — text
  • created_at — timestamp

highlights

  • id — uuid — Primary key — NOT NULL
  • user_id — uuid
  • title — text — NOT NULL
  • description — text
  • video_url — text — NOT NULL
  • thumbnail_url — text
  • match_date — timestamp
  • home_team — text
  • away_team — text
  • home_score — integer
  • away_score — integer
  • league — text
  • type — text
  • views — integer
  • created_at — timestamp
  • id (id2) — uuid — Foreign key → likes.id — NOT NULL

likes

  • id — uuid — Primary key — NOT NULL
  • user_id — uuid
  • highlight_id — uuid
  • created_at — timestamp

notifications

  • id — uuid — Primary key — NOT NULL
  • user_id — uuid
  • type — text — NOT NULL
  • title — text — NOT NULL
  • message — text
  • is_read — boolean
  • created_at — timestamp

players

  • id — uuid — Primary key — NOT NULL
  • name — text — NOT NULL
  • avatar_url — text
  • team_id — uuid
  • position — text
  • created_at — timestamp

profiles

  • id — uuid — Primary key — NOT NULL
  • username — text
  • avatar_url — text
  • bio — text
  • created_at — timestamp
  • updated_at — timestamp

saved_highlights

  • id — uuid — Primary key — NOT NULL
  • user_id — uuid
  • highlight_id — uuid
  • created_at — timestamp
  • id (id2) — uuid — Foreign key → saved_highlights.id — NOT NULL

teams

  • id — uuid — Primary key — NOT NULL
  • name — text — NOT NULL
  • logo_url — text
  • league — text
  • created_at — timestamp

watch_history

  • id — uuid — Primary key — NOT NULL
  • user_id — uuid
  • highlight_id — uuid
  • watched_at — timestamp
  • watch_duration — integer