deokhugam_erd
Tables (9)
book
- id — uuid
- title — varchar(255) — NOT NULL
- author — varchar(255) — NOT NULL
- description — text — NOT NULL
- publisher — varchar(255) — NOT NULL
- published_date — date — NOT NULL
- isbn — varchar(255) — NOT NULL
- thunmbnail_url — varchar(255)
- review_count — int
- rating — decimal
- deleted_at — timestamp
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
comment
- id — uuid
- review_id — uuid — Foreign key → review.id — NOT NULL
- user_id — uuid — Foreign key → users.id — NOT NULL
- content — text — NOT NULL
- deleted_at — timestamp
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
notification
- id — uuid
- user_id — uuid — Foreign key → users.id — NOT NULL
- review_id — uuid — Foreign key → review.id — NOT NULL
- actor_user_id — uuid — Foreign key → users.id — NOT NULL
- content — text — NOT NULL
- confirmed — boolean
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
- confirmed_at — timestamp
popular_book
- id — uuid
- book_id — uuid — Foreign key → book.id — NOT NULL
- period — varchar(20) — NOT NULL — DAILY/WEEKLY/MONTHLY/ALL_TIME
- period_date — date — NOT NULL
- rank — bigint — NOT NULL
- score — decimal — NOT NULL
- review_count — bigint — NOT NULL
- rating — decimal — NOT NULL
- created_at — timestamp — NOT NULL
popular_review
- id — uuid
- review_id — uuid — Foreign key → review.id — NOT NULL
- period — varchar(20) — NOT NULL — DAILY/WEEKLY/MONTHLY/ALL_TIME
- period_date — date — NOT NULL
- rank — bigint — NOT NULL
- score — decimal — NOT NULL
- like_count — bigint — NOT NULL
- comment_count — bigint — NOT NULL
- created_at — timestamp — NOT NULL
power_user
- id — uuid
- user_id — uuid — Foreign key → users.id — NOT NULL
- period — varchar(20) — NOT NULL — DAILY/WEEKLY/MONTHLY/ALL_TIME
- period_date — date — NOT NULL
- rank — bigint — NOT NULL
- score — decimal — NOT NULL
- review_score_sum — decimal — NOT NULL
- like_count — bigint — NOT NULL
- comment_count — bigint — NOT NULL
- created_at — timestamp — NOT NULL
review
- id — uuid
- user_id — uuid — Foreign key → book.id — NOT NULL
- book_id — uuid — NOT NULL
- content — text — NOT NULL
- rating — int — NOT NULL — 평점 1-5
- like_count — int
- comment_count — int
- deleted_at — timestamp
- created_at — timestamp — NOT NULL
- updated_at — timestamp — NOT NULL
review_like
- id — uuid
- review_id — uuid — Foreign key → review.id — NOT NULL
- user_id — uuid — Foreign key → users.id — NOT NULL
- created_at — timestamp — NOT NULL
users
- id — uuid
- email — varchar(255) — NOT NULL
- nickname — varchar(20) — NOT NULL
- password — varchar(60)
- deleted_at — timestamp — NOT NULL
- created_at — timestamp — NOT NULL