MCL

Tables (10)

banned_words

  • id — SERIAL
  • word — VARCHAR(100) — NOT NULL
  • created_at — TIMESTAMP

courses

  • id — SERIAL
  • university_id — INT — Foreign key → universities.id — NOT NULL
  • name — VARCHAR(255) — NOT NULL
  • status — approval_status — NOT NULL
  • submitted_by — INT — Foreign key → users.id
  • created_at — TIMESTAMP

likes

  • user_id — INT — Foreign key → users.id — NOT NULL
  • material_id — INT — Foreign key → materials.id — NOT NULL
  • liked_at — TIMESTAMP

materials

  • id — SERIAL
  • title — VARCHAR(255) — NOT NULL
  • description — TEXT
  • university_id — INT — Foreign key → universities.id — NOT NULL
  • course_id — INT — Foreign key → courses.id — NOT NULL
  • type — material_type — NOT NULL
  • file_or_link_url — TEXT — NOT NULL
  • uploaded_by — INT — Foreign key → users.id — NOT NULL
  • status — material_status — NOT NULL
  • created_at — TIMESTAMP

personal_lists

  • user_id — INT — Foreign key → users.id — NOT NULL
  • material_id — INT — Foreign key → materials.id — NOT NULL
  • status — bookmark_status — NOT NULL
  • bookmarked_at — TIMESTAMP

platform_feedback

  • id — SERIAL
  • sender_id — INT — Foreign key → users.id — NOT NULL
  • type — feedback_type — NOT NULL
  • message — TEXT — NOT NULL
  • created_at — TIMESTAMP

reports

  • id — SERIAL
  • material_id — INT — Foreign key → materials.id — NOT NULL
  • reported_by — INT — Foreign key → users.id — NOT NULL
  • reason — TEXT — NOT NULL
  • status — report_status — NOT NULL
  • created_at — TIMESTAMP

universities

  • id — SERIAL
  • name — VARCHAR(255) — NOT NULL
  • details — TEXT
  • status — approval_status — NOT NULL
  • submitted_by — INT — Foreign key → users.id
  • created_at — TIMESTAMP

user_academic_profiles

  • id — SERIAL
  • user_id — INT — Foreign key → users.id — NOT NULL
  • university_id — INT — Foreign key → universities.id — NOT NULL
  • major_name — VARCHAR(150) — NOT NULL
  • is_primary — BOOLEAN — NOT NULL
  • created_at — TIMESTAMP

users

  • id — SERIAL
  • email — VARCHAR(255) — NOT NULL
  • password_hash — VARCHAR(255)
  • display_name — VARCHAR(100) — NOT NULL
  • profile_photo_url — TEXT
  • role — user_role — NOT NULL
  • is_banned — BOOLEAN — NOT NULL
  • created_at — TIMESTAMP