amumal_community
Tables (9)
comments
- comment_id — INT — Primary key — NOT NULL
- post_id — INT — Foreign key → posts.post_id — NOT NULL
- user_id — INT — Foreign key → users.user_id — NOT NULL
- comment_content — TEXT — NOT NULL
- created_at — TIMESTAMP(6) — NOT NULL
- updated_at — TIMESTAMP(6) — NOT NULL
- INDEX — idx_comments_post_created
- INDEX — idx_comments_user_created
post_files
- file_id — INT — Primary key — NOT NULL
- post_id — INT — Foreign key → posts.post_id — NOT NULL
- file_path — VARCHAR(500) — NOT NULL
- file_order — SMALLINT — NOT NULL
- is_representative — BOOLEAN — NOT NULL
- representative_post_id — INT
- thumbnail_path — VARCHAR(500)
- created_at — TIMESTAMP(6) — NOT NULL
- INDEX — idx_post_files_post_representative
post_likes
- like_id — INT — Primary key — NOT NULL
- user_id — INT — Foreign key → users.user_id — NOT NULL
- post_id — INT — Foreign key → posts.post_id — NOT NULL
- created_at — TIMESTAMP(6) — NOT NULL
- INDEX — idx_post_likes_user_created
post_stats
- post_id — INT — Foreign key → posts.post_id — NOT NULL
- view_count — BIGINT — NOT NULL
- like_count — BIGINT — NOT NULL
- comment_count — BIGINT — NOT NULL
- dirty — BOOLEAN — NOT NULL
- updated_at — TIMESTAMP(6) — NOT NULL
- INDEX — idx_post_stats_dirty
posts
- post_id — INT — Primary key — NOT NULL
- user_id — INT — Foreign key → users.user_id — NOT NULL
- post_title — VARCHAR(255) — NOT NULL
- post_content — TEXT — NOT NULL
- hits — BIGINT — NOT NULL
- created_at — TIMESTAMP(6) — NOT NULL
- updated_at — TIMESTAMP(6) — NOT NULL
- deleted_at — TIMESTAMP(6)
profile_images
- profile_image_id — INT — Primary key — NOT NULL
- user_id — INT — Foreign key → users.user_id — NOT NULL
- file_path — VARCHAR(500) — NOT NULL
- created_at — TIMESTAMP(6) — NOT NULL
- INDEX — idx_profile_images_user_latest
refresh_tokens
- refresh_token_id — INT — Primary key — NOT NULL
- user_id — INT — Foreign key → users.user_id — NOT NULL
- token_hash — CHAR(64) — NOT NULL
- expires_at — TIMESTAMP(6) — NOT NULL
- revoked_at — TIMESTAMP(6)
- created_at — TIMESTAMP(6) — NOT NULL
- updated_at — TIMESTAMP(6) — NOT NULL
- INDEX — idx_refresh_tokens_user_active
- INDEX — idx_refresh_tokens_expires_at
users
- user_id — INT — Primary key — NOT NULL
- email — VARCHAR(255) — NOT NULL
- password — VARCHAR(255) — NOT NULL
- nickname — VARCHAR(50) — NOT NULL
- created_at — TIMESTAMP(6) — NOT NULL
- updated_at — TIMESTAMP(6) — NOT NULL
- deleted_at — TIMESTAMP(6)
verification_codes
- verification_code_id — INT — Primary key — NOT NULL
- email — VARCHAR(255) — NOT NULL
- code — VARCHAR(10) — NOT NULL
- expires_at — TIMESTAMP(6) — NOT NULL
- created_at — TIMESTAMP(6) — NOT NULL
- updated_at — TIMESTAMP(6) — NOT NULL
- INDEX — idx_verification_codes_email_latest
- INDEX — idx_verification_codes_expires_at