ㅁㅇㄹ
Tables (9)
book_hashtags
- book_id — BIGINT — Foreign key → books.id — NOT NULL
- hashtag_id — BIGINT — Foreign key → hashtags.id — NOT NULL
- created_at — DATETIME — NOT NULL
book_likes
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- book_id — BIGINT — Foreign key → books.id — NOT NULL
- created_at — DATETIME — NOT NULL
books
- id — BIGINT — Primary key — NOT NULL
- category_id — BIGINT — Foreign key → categories.id — NOT NULL
- title — VARCHAR(200) — NOT NULL
- description — TEXT
- cover_image_url — VARCHAR(512)
- like_count — INT — NOT NULL
- status — VARCHAR(20) — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
categories
- id — BIGINT — Primary key — NOT NULL
- name — VARCHAR(50) — NOT NULL
- book_count — INT — NOT NULL
- sort_order — SMALLINT — NOT NULL
hashtags
- id — BIGINT — Primary key — NOT NULL
- name — VARCHAR(50) — NOT NULL
- created_at — DATETIME — NOT NULL
notifications
- id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- rental_id — BIGINT — Foreign key → rentals.id
- type — VARCHAR(20) — NOT NULL
- title — VARCHAR(100) — NOT NULL
- content — VARCHAR(500)
- is_read — TINYINT — NOT NULL
- read_at — DATETIME
- created_at — DATETIME — NOT NULL
rentals
- id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- book_id — BIGINT — Foreign key → books.id — NOT NULL
- status — VARCHAR(20) — NOT NULL
- rented_at — DATETIME — NOT NULL
- due_at — DATETIME — NOT NULL
- returned_at — DATETIME
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
user_social_accounts
- id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- provider — VARCHAR(20) — NOT NULL
- provider_user_id — VARCHAR(191) — NOT NULL
- connected_at — DATETIME — NOT NULL
users
- id — BIGINT — Primary key — NOT NULL
- name — VARCHAR(50) — NOT NULL
- nickname — VARCHAR(30) — NOT NULL
- phone — VARCHAR(20)
- gender — VARCHAR(10) — NOT NULL
- status — VARCHAR(20) — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
- withdrawn_at — DATETIME