reportlens
Tables (14)
entries
- id — uuid — Primary key — NOT NULL
- user_id — uuid — Foreign key → users.id — NOT NULL
- report_id — uuid — Foreign key → reports.id — NOT NULL
- industry_id — uuid — Foreign key → industries.id
- lens_key — text — Foreign key → lenses.key — NOT NULL
- entry_date — date — NOT NULL
- frame — jsonb
- status — enum('draft','saved') — NOT NULL
- provider — enum('gemini','claude','mcp')
- model — text
- created_at — timestamp — NOT NULL
- updated_at — timestamp
entry_numbers
- id — uuid — Primary key — NOT NULL
- entry_id — uuid — Foreign key → entries.id — NOT NULL
- label — text
- value — text
- page_no — integer
- verified — boolean
- created_at — timestamp — NOT NULL
export_jobs
- id — uuid — Primary key — NOT NULL
- user_id — uuid — Foreign key → users.id — NOT NULL
- scope — enum('entry','rollup') — NOT NULL
- ref_id — uuid
- status — enum('pending','done','failed') — NOT NULL
- file_key — text
- created_at — timestamp — NOT NULL
industries
- id — uuid — Primary key — NOT NULL
- user_id — uuid — Foreign key → users.id
- name — text — NOT NULL
- slug — text — NOT NULL
- icon_color — text
- sort — integer
lenses
- key — text — Primary key — NOT NULL
- label — text — NOT NULL
- description — text
- is_preset — boolean — NOT NULL
- sort — integer
report_pages
- id — uuid — Primary key — NOT NULL
- report_id — uuid — Foreign key → reports.id — NOT NULL
- page_no — integer — NOT NULL
- text — text
reports
- id — uuid — Primary key — NOT NULL
- user_id — uuid — Foreign key → users.id — NOT NULL
- industry_id — uuid — Foreign key → industries.id
- title — text
- broker — text
- analyst — text
- pub_date — date
- source_type — enum('broker','public')
- file_key — text
- file_size — integer
- page_count — integer
- parse_status — enum('pending','parsing','parsed','failed') — NOT NULL
- created_at — timestamp — NOT NULL
rollup_facts
- id — uuid — Primary key — NOT NULL
- rollup_id — uuid — Foreign key → rollups.id — NOT NULL
- fact_type — enum('common','conflict') — NOT NULL
- content — text
- sort — integer
rollup_sources
- rollup_id — uuid — Foreign key → rollups.id — NOT NULL
- entry_id — uuid — Foreign key → entries.id — NOT NULL
rollups
- id — uuid — Primary key — NOT NULL
- user_id — uuid — Foreign key → users.id — NOT NULL
- industry_id — uuid — Foreign key → industries.id
- lens_key — text — Foreign key → lenses.key — NOT NULL
- period_type — enum('month','year') — NOT NULL
- period_key — text — NOT NULL
- one_liner — text
- created_at — timestamp — NOT NULL
- updated_at — timestamp
user_industries
- user_id — uuid — Foreign key → users.id — NOT NULL
- industry_id — uuid — Foreign key → industries.id — NOT NULL
- sort — integer
- created_at — timestamp — NOT NULL
user_lenses
- user_id — uuid — Foreign key → users.id — NOT NULL
- lens_key — text — Foreign key → lenses.key — NOT NULL
- enabled — boolean — NOT NULL
user_llm_settings
- user_id — uuid — Foreign key → users.id — NOT NULL
- tier — enum('default','byo','mcp') — NOT NULL
- claude_key_enc — bytea
- created_at — timestamp — NOT NULL
- updated_at — timestamp
users
- id — uuid — Primary key — NOT NULL
- cognito_sub — text — NOT NULL
- email — text
- provider — enum('google','kakao')
- display_name — text
- avatar_url — text
- created_at — timestamp — NOT NULL