commumity
Tables (9)
comments
- id — BIGINT — Primary key — NOT NULL
- post_id — BIGINT — Foreign key → post.id — NOT NULL
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- parent_comment_id — BIGINT
- comment — varchar(255) — NOT NULL
- deleted — boolean — NOT NULL
- comment_time — datetime
notification
- id — BIGINT — Primary key — NOT NULL
- recipient_id — BIGINT — Foreign key → users.id — NOT NULL
- actor_id — BIGINT — Foreign key → users.id — NOT NULL
- type — varchar(20) — NOT NULL
- post_id — BIGINT — Foreign key → post.id — NOT NULL
- comment_id — BIGINT — Foreign key → comments.id
- is_read — boolean — NOT NULL
- deleted — boolean — NOT NULL
- created_at — datetime
post
- id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- title — varchar(26)
- body — text
- category — varchar(20)
- temp — boolean — NOT NULL
- blind — boolean — NOT NULL
- edited — boolean — NOT NULL
- deleted — boolean — NOT NULL
- views — BIGINT — NOT NULL
- reports — int — NOT NULL
- post_time — datetime
post_image
- post_id — BIGINT — Foreign key → post.id — NOT NULL
- file_id — BIGINT — Foreign key → upload_file.id — NOT NULL
post_like
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- post_id — BIGINT — Foreign key → post.id — NOT NULL
post_report
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- post_id — BIGINT — Foreign key → post.id — NOT NULL
post_view
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- post_id — BIGINT — Foreign key → post.id — NOT NULL
- view_time — datetime — NOT NULL
upload_file
- id — BIGINT — Primary key — NOT NULL
- file_name — varchar(255) — NOT NULL
- file_path — varchar(500) — NOT NULL
- file_type — varchar(20) — NOT NULL
- file_size — BIGINT — NOT NULL
users
- id — BIGINT — Primary key — NOT NULL
- email — varchar(320) — NOT NULL
- password — varchar(100) — NOT NULL
- nickname — varchar(10) — NOT NULL
- role — varchar(20) — NOT NULL
- deleted — boolean — NOT NULL
- file_id — BIGINT — Foreign key → upload_file.id