SAJU-CHAT_v1

Tables (30)

astro_error_log

  • id — uuid — Primary key — NOT NULL
  • request_id — uuid
  • error_message — text — NOT NULL
  • stack — text
  • created_at — timestamp — NOT NULL

astro_request

  • id — uuid — Primary key — NOT NULL
  • input_json — jsonb — NOT NULL
  • created_at — timestamp — NOT NULL

astro_result

  • id — uuid — Primary key — NOT NULL
  • request_id — uuid — NOT NULL
  • output_json — jsonb — NOT NULL
  • engine_type — text — NOT NULL
  • created_at — timestamp — NOT NULL

bazi_saved_results

  • id — uuid — Primary key — NOT NULL
  • clerk_id — text — NOT NULL
  • source_action — text — NOT NULL
  • payload — jsonb — NOT NULL
  • created_at — timestamp — NOT NULL

chart_analysis_results

  • id — uuid — Primary key — NOT NULL
  • chart_id — uuid — NOT NULL
  • owner_id — text — NOT NULL
  • logic_keys — ARRAY — NOT NULL
  • summary — jsonb — NOT NULL
  • ruleset_version — text — NOT NULL
  • created_at — timestamp — NOT NULL
  • updated_at — timestamp — NOT NULL

chat_messages

  • id — uuid — Primary key — NOT NULL
  • session_id — uuid
  • role — text — NOT NULL
  • content — text — NOT NULL
  • meta — jsonb
  • idempotency_key — text
  • created_at — timestamp

chat_sessions

  • id — uuid — Primary key — NOT NULL
  • owner_id — text
  • entitlement_id — uuid
  • session_summary — text
  • created_at — timestamp
  • updated_at — timestamp

chat_summaries

  • id — uuid — Primary key — NOT NULL
  • session_id — uuid — NOT NULL
  • summary_json — jsonb — NOT NULL
  • embedding — USER-DEFINED
  • created_at — timestamp

conversation_script

  • id — text — Primary key — NOT NULL
  • logic_key — text — NOT NULL
  • domain — text — NOT NULL
  • subdomain — text
  • layer — text
  • variant_type — text
  • title — text — NOT NULL
  • content_sections — jsonb — NOT NULL
  • free_sections — ARRAY
  • free_preview — text
  • timing_signals — ARRAY
  • timing_window_hint — text
  • requires_disclaimer — boolean
  • disclaimer_type — text
  • safety_tags — ARRAY
  • access_tier — text
  • is_active — boolean
  • version — integer
  • lang — text
  • source_ref — text
  • created_at — timestamp
  • updated_at — timestamp

coupon_redemptions

  • id — uuid — Primary key — NOT NULL
  • coupon_id — uuid — NOT NULL
  • owner_id — text — NOT NULL
  • idempotency_key — text — NOT NULL
  • redeemed_at — timestamp — NOT NULL

coupons

  • id — uuid — Primary key — NOT NULL
  • code — text — NOT NULL
  • credit_amount — integer — NOT NULL
  • is_active — boolean — NOT NULL
  • total_limit — integer
  • used_count — integer — NOT NULL
  • starts_at — timestamp
  • ends_at — timestamp
  • created_at — timestamp — NOT NULL
  • updated_at — timestamp — NOT NULL

credit_logs

  • id — uuid — Primary key — NOT NULL
  • owner_id — text
  • amount — integer — NOT NULL
  • reason — text — NOT NULL
  • related_ref_id — text
  • created_at — timestamp

entitlements

  • id — uuid — Primary key — NOT NULL
  • owner_id — text
  • product_type — text — NOT NULL
  • status — text
  • bound_chart_id — uuid
  • created_at — timestamp
  • updated_at — timestamp
  • linked_payment_id — uuid
  • parent_entitlement_id — uuid

events

  • id — uuid — Primary key — NOT NULL
  • slug — text — NOT NULL
  • title — text — NOT NULL
  • body_md — text — NOT NULL
  • is_active — boolean — NOT NULL
  • starts_at — timestamp
  • ends_at — timestamp
  • coupon_code — text
  • created_at — timestamp — NOT NULL
  • updated_at — timestamp — NOT NULL

faq_items

  • id — uuid — Primary key — NOT NULL
  • category — text — NOT NULL
  • question — text — NOT NULL
  • answer — text — NOT NULL
  • sort_order — integer — NOT NULL
  • is_active — boolean — NOT NULL
  • created_at — timestamp — NOT NULL
  • updated_at — timestamp — NOT NULL

interpretation_base

  • id — text — Primary key — NOT NULL
  • logic_key — text — NOT NULL
  • domain — text — NOT NULL
  • subdomain — text
  • layer — text
  • title — text — NOT NULL
  • one_line_summary — text
  • content_sections — jsonb — NOT NULL
  • free_sections — ARRAY
  • free_preview — text
  • tone — text
  • trust_level — text
  • priority — integer
  • lang — text
  • is_active — boolean
  • version — integer
  • source_ref — text
  • timing_signals — ARRAY
  • timing_window_hint — text
  • requires_disclaimer — boolean
  • disclaimer_type — text
  • safety_tags — ARRAY
  • access_tier — text
  • created_at — timestamp
  • updated_at — timestamp

interpretation_reports

  • id — uuid — Primary key — NOT NULL
  • entitlement_id — uuid — NOT NULL
  • chart_id — uuid — NOT NULL
  • payload_json — jsonb — NOT NULL
  • ruleset_version — text
  • created_at — timestamp

master_interpretations

  • id — uuid — Primary key — NOT NULL
  • created_at — timestamp — NOT NULL
  • ext_id — text — NOT NULL
  • logic_key — text — NOT NULL
  • domain — text — NOT NULL
  • subdomain — text
  • layer — text
  • trust_level — text
  • priority — integer
  • is_active — boolean — NOT NULL
  • version — integer — NOT NULL
  • lang — text — NOT NULL
  • title — text
  • content — text
  • example_scenario — text
  • source_ref — text
  • variant_type — text
  • script_id — text

master_logic_definitions

  • id — uuid — Primary key — NOT NULL
  • created_at — timestamp — NOT NULL
  • logic_key — text — NOT NULL
  • domain — text — NOT NULL
  • subdomain — text
  • name_ko — text
  • category — text
  • calc_type — text
  • calc_params — jsonb
  • conflict_group — text
  • is_active — boolean — NOT NULL
  • version — integer — NOT NULL
  • lang — text — NOT NULL
  • desc_core — text

master_persona_vibe

  • id — uuid — Primary key — NOT NULL
  • created_at — timestamp — NOT NULL
  • ext_id — text — NOT NULL
  • logic_key — text
  • context_key — text
  • domain — text — NOT NULL
  • subdomain — text
  • layer — text
  • persona_id — text
  • use_case — text
  • is_active — boolean — NOT NULL
  • version — integer — NOT NULL
  • lang — text — NOT NULL
  • text — text
  • source_ref — text

master_solutions

  • id — uuid — Primary key — NOT NULL
  • created_at — timestamp — NOT NULL
  • ext_id — text — NOT NULL
  • logic_key — text — NOT NULL
  • domain — text — NOT NULL
  • subdomain — text
  • layer — text
  • type — text
  • severity — text
  • is_active — boolean — NOT NULL
  • version — integer — NOT NULL
  • lang — text — NOT NULL
  • requires_disclaimer — boolean — NOT NULL
  • title — text
  • content — text
  • product_hint — jsonb
  • script — text
  • difficulty — text
  • time_required — text
  • source_ref — text
  • variant_type — text
  • script_id — text

notices

  • id — uuid — Primary key — NOT NULL
  • notice_type — text — NOT NULL
  • title — text — NOT NULL
  • body_md — text — NOT NULL
  • is_active — boolean — NOT NULL
  • pinned — boolean — NOT NULL
  • starts_at — timestamp
  • ends_at — timestamp
  • created_at — timestamp — NOT NULL
  • updated_at — timestamp — NOT NULL

orders

  • id — uuid — Primary key — NOT NULL
  • owner_id — text — NOT NULL
  • order_id — text — NOT NULL
  • payment_key — text
  • product_type — text — NOT NULL
  • amount — integer — NOT NULL
  • status — text — NOT NULL
  • metadata — jsonb
  • created_at — timestamp — NOT NULL
  • updated_at — timestamp — NOT NULL

persona_vibe_hook

  • id — text — Primary key — NOT NULL
  • logic_key — text
  • persona_id — text — NOT NULL
  • use_case — text — NOT NULL
  • variant_type — text
  • text — text — NOT NULL
  • tone_note — text
  • priority — double
  • lang — text
  • is_active — boolean
  • version — double
  • source_name — text
  • source_ref — text
  • access_tier — text
  • is_marketing_free — boolean
  • safety_tags — ARRAY
  • created_at — timestamp
  • updated_at — timestamp

profiles

  • id — text — Primary key — NOT NULL
  • email — text
  • display_name — text
  • role — text
  • created_at — timestamp
  • updated_at — timestamp
  • is_admin — boolean — NOT NULL

saju_charts

  • id — uuid — Primary key — NOT NULL
  • owner_id — text
  • name — text — NOT NULL
  • gender — text — NOT NULL
  • birth_date — timestamp — NOT NULL
  • birth_hour — text
  • input_json — jsonb — NOT NULL
  • result_json — jsonb — NOT NULL
  • is_locked — boolean
  • created_at — timestamp
  • updated_at — timestamp

saju_results

  • id — uuid — Primary key — NOT NULL
  • chart_id — uuid — NOT NULL
  • raw_json — jsonb — NOT NULL
  • analysis_json — jsonb
  • engine_version — text — NOT NULL
  • created_at — timestamp — NOT NULL
  • updated_at — timestamp — NOT NULL

solution_action

  • id — text — Primary key — NOT NULL
  • logic_key — text — NOT NULL
  • domain — text — NOT NULL
  • subdomain — text
  • type — text — NOT NULL
  • severity — text
  • title — text — NOT NULL
  • content_detail — text — NOT NULL
  • content_sections — jsonb
  • free_sections — ARRAY
  • product_hint — jsonb
  • source_ref — text
  • timing_signals — ARRAY
  • timing_window_hint — text
  • requires_disclaimer — boolean
  • disclaimer_type — text
  • safety_tags — ARRAY
  • access_tier — text
  • is_active — boolean
  • created_at — timestamp
  • updated_at — timestamp

support_posts

  • id — uuid — Primary key — NOT NULL
  • owner_id — text — NOT NULL
  • category — text — NOT NULL
  • title — text — NOT NULL
  • body — text — NOT NULL
  • is_secret — boolean — NOT NULL
  • status — text — NOT NULL
  • admin_reply — text
  • replied_at — timestamp
  • replied_by — text
  • created_at — timestamp — NOT NULL
  • updated_at — timestamp — NOT NULL

users

  • id — uuid — Primary key — NOT NULL
  • clerk_id — text — NOT NULL
  • name — text
  • created_at — timestamp
  • updated_at — timestamp