User-Post-Comment ERD

Tables (3)

Comment (comment_entity)

  • id (Key) — BIGINT — Primary key — NOT NULL
  • parent_id (Field5) — BIGINT
  • content (Field) — TEXT
  • created_at (Field2) — DATETIME
  • user_id (Field3) — BIGINT
  • post_id (Field4) — BIGINT

Post (post_entity)

  • id (Key2) — BIGINT — Foreign key → Comment.id — NOT NULL
  • name (Field) — VARCHAR
  • email (Field2) — VARCHAR
  • password (Field3) — VARCHAR
  • user_id (Field4) — BIGINT

User (user_entity)

  • id (Key) — BIGINT — Foreign key → Comment.id — NOT NULL
  • username (Field) — VARCHAR
  • email (Field2) — VARCHAR
  • password (Field3) — VARCHAR