project1

Tables (9)

Comments

  • id — INT
  • post_id — INT
  • user_id — INT
  • content — TEXT
  • created_at — TIMESTAMP

Followers

  • id — INT
  • follower_id — INT
  • following_id — INT
  • created_at — TIMESTAMP

Friends

  • id — INT
  • user_id — INT
  • friend_id — INT
  • created_at — TIMESTAMP

Likes

  • id — INT — Primary key — NOT NULL
  • post_id — INT — Foreign key → Posts.id — NOT NULL
  • created_at — TIMESTAMP

Messages

  • Key — Primary key — NOT NULL
  • id — INT
  • sender_id — INT
  • receiver_id — INT
  • content — TEXT
  • created_at — TIMESTAMP

Notifications

  • id — INT
  • user_id — INT
  • message — TEXT
  • created_at — TIMESTAMP

Posts

  • id — INT — Primary key — NOT NULL
  • user_id — INT — Foreign key → Users.id — NOT NULL
  • content — TEXT
  • image — VARCHAR(255)
  • created_at — TIMESTAMP

Products

  • id — INT
  • user_id — INT
  • name — VARCHAR(255)
  • description — TEXT
  • price — DECIMAL(10, 2)
  • image — VARCHAR(255)
  • created_at — TIMESTAMP

Users

  • id — int — Primary key — NOT NULL
  • username — VARCHAR(255) — NOT NULL
  • email — VARCHAR(255) — NOT NULL
  • password — VARCHAR(255) — NOT NULL
  • profile_image — VARCHAR(255)
  • bio — TEXT
  • created_at — TIMESTAMP