communtiy_ERD_
Tables (7)
comments
- comment_id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
- post_id — BIGINT — Foreign key → posts.post_id — NOT NULL — AUTO_INCREMENT
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL — AUTO_INCREMENT
- comment_content — TEXT — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
post_files
- file_id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
- post_id — BIGINT — Foreign key → posts.post_id — NOT NULL — AUTO_INCREMENT
- file_path — VARCHAR(500) — NOT NULL
post_likes
- like_id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL — AUTO_INCREMENT
- post_id — BIGINT — Foreign key → posts.post_id — NOT NULL — AUTO_INCREMENT
posts
- post_id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL — AUTO_INCREMENT
- post_title — VARCHAR(255) — NOT NULL
- post_content — TEXT — NOT NULL
- hits — INT — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
- deleted_at — TIMESTAMP
profile_images
- profile_image_id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL — AUTO_INCREMENT
- file_path — VARCHAR(500) — NOT NULL
users
- user_id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
- email — VARCHAR(255) — NOT NULL
- password — VARCHAR(255) — NOT NULL
- nickname — VARCHAR(50) — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
- deleted_at — TIMESTAMP
verification_codes
- verification_code_id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
- email — VARCHAR(255) — NOT NULL
- code — VARCHAR(10) — NOT NULL
- expires_at — TIMESTAMP — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL