erd
Tables (13)
articles
- id — BIGSERIAL
- source_url — TEXT — NOT NULL
- source_site — VARCHAR(100)
- title — TEXT — NOT NULL
- hook_title — TEXT
- summary_json — JSONB
- content — TEXT
- thumbnail_url — TEXT
- estimated_read_time — INT
- published_at — TIMESTAMP
- collected_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
event_logs
- id — BIGSERIAL
- user_id — BIGINT — Foreign key → users.id
- article_id — BIGINT — Foreign key → articles.id
- recommendation_id — UUID — Foreign key → recommendations.id
- event_type — VARCHAR(30) — NOT NULL
- position — INT
- metadata — JSONB
- created_at — TIMESTAMP — NOT NULL
insight_candidates
- id — BIGSERIAL
- article_id — BIGINT — Foreign key → articles.id — NOT NULL
- candidate_order — INT — NOT NULL
- content — TEXT — NOT NULL
- created_at — TIMESTAMP — NOT NULL
insight_cards
- id — BIGSERIAL
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- article_id — BIGINT — Foreign key → articles.id — NOT NULL
- content — TEXT — NOT NULL
- source_type — VARCHAR(20) — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
- deleted_at — TIMESTAMP
keywords
- id — BIGSERIAL
- name — VARCHAR(50) — NOT NULL
- created_at — TIMESTAMP — NOT NULL
quiz_choices
- id — BIGSERIAL
- quiz_id — BIGINT — Foreign key → quizzes.id — NOT NULL
- choice_order — INT — NOT NULL
- choice_text — TEXT — NOT NULL
- is_correct — BOOLEAN — NOT NULL
quiz_submissions
- id — BIGSERIAL
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- quiz_id — BIGINT — Foreign key → quizzes.id — NOT NULL
- selected_order — INT — NOT NULL
- is_correct — BOOLEAN — NOT NULL
- created_at — TIMESTAMP — NOT NULL
quizzes
- id — BIGSERIAL
- article_id — BIGINT — Foreign key → articles.id — NOT NULL
- question — TEXT — NOT NULL
- explanation — TEXT
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
recommendation_items
- id — BIGSERIAL
- recommendation_id — UUID — Foreign key → recommendations.id — NOT NULL
- article_id — BIGINT — Foreign key → articles.id — NOT NULL
- position — INT — NOT NULL
- score — DOUBLE
recommendations
- id — UUID
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- generated_at — TIMESTAMP — NOT NULL
scraps
- id — BIGSERIAL
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- article_id — BIGINT — Foreign key → articles.id — NOT NULL
- created_at — TIMESTAMP — NOT NULL
user_keywords
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- keyword_id — BIGINT — Foreign key → keywords.id — NOT NULL
- created_at — TIMESTAMP — NOT NULL
users
- id — BIGSERIAL
- email — VARCHAR(255) — NOT NULL
- password_hash — VARCHAR(255)
- nickname — VARCHAR(50) — NOT NULL
- provider — VARCHAR(20) — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL