3

Tables (22)

chat_messages

  • message_id — VARCHAR(64) — Primary key — NOT NULL
  • session_id — VARCHAR(64) — Foreign key → chat_sessions.session_id — NOT NULL
  • role — VARCHAR(16) — NOT NULL
  • content — MEDIUMTEXT — NOT NULL
  • created_at — VARCHAR(40)

chat_sessions

  • session_id — VARCHAR(64) — Primary key — NOT NULL
  • user_id — VARCHAR(255) — Foreign key → users.user_id
  • doc_id — VARCHAR(36) — Foreign key → documents.id
  • page_path — VARCHAR(255)
  • created_at — VARCHAR(40)

chat_sources

  • source_tag — VARCHAR(32) — Primary key — NOT NULL
  • message_id — VARCHAR(64) — Foreign key → chat_messages.message_id — NOT NULL

checklist_items

  • id — VARCHAR(64) — Primary key — NOT NULL
  • doc_id — VARCHAR(36) — Foreign key → documents.id — NOT NULL
  • rule_id — VARCHAR(64) — NOT NULL
  • category — VARCHAR(64) — NOT NULL
  • label — VARCHAR(512) — NOT NULL
  • status — VARCHAR(16) — NOT NULL
  • detail — TEXT

checklist_reports

  • doc_id — VARCHAR(36) — Foreign key → documents.id — NOT NULL
  • overall — VARCHAR(16) — NOT NULL
  • pass_count — INT — NOT NULL
  • warn_count — INT — NOT NULL
  • fail_count — INT — NOT NULL
  • manual_count — INT — NOT NULL
  • updated_at — VARCHAR(40)

document_full_text

  • doc_id — VARCHAR(36) — Foreign key → documents.id — NOT NULL
  • full_text — MEDIUMTEXT — NOT NULL

document_json_backups

  • doc_id — VARCHAR(36) — Foreign key → documents.id — NOT NULL
  • backup_path — VARCHAR(1024) — NOT NULL
  • payload_json — MEDIUMTEXT — NOT NULL
  • updated_at — VARCHAR(40)

document_pages

  • page_num — INT — Primary key — NOT NULL
  • doc_id — VARCHAR(36) — Foreign key → documents.id — NOT NULL
  • page_text — MEDIUMTEXT — NOT NULL

document_source_files

  • doc_id — VARCHAR(36) — Foreign key → documents.id — NOT NULL
  • storage_path — VARCHAR(1024) — NOT NULL
  • original_filename — VARCHAR(512) — NOT NULL
  • mime_type — VARCHAR(128)
  • byte_size — BIGINT
  • created_at — VARCHAR(40)

document_summaries

  • doc_id — VARCHAR(36) — Foreign key → documents.id — NOT NULL
  • summary_text — MEDIUMTEXT — NOT NULL
  • generated_by — VARCHAR(32)
  • updated_at — VARCHAR(40)

document_translations

  • doc_id — VARCHAR(36) — Foreign key → documents.id — NOT NULL
  • translation_text — MEDIUMTEXT
  • updated_at — VARCHAR(40)

documents

  • id — VARCHAR(36) — Primary key — NOT NULL
  • filename — VARCHAR(512) — NOT NULL
  • doc_type — VARCHAR(32) — NOT NULL
  • stage — VARCHAR(32) — NOT NULL
  • page_count — INT — NOT NULL
  • created_at — VARCHAR(40) — NOT NULL
  • updated_at — VARCHAR(40) — NOT NULL

export_jobs

  • job_id — VARCHAR(64) — Primary key — NOT NULL
  • doc_id — VARCHAR(36) — Foreign key → documents.id — NOT NULL
  • user_id — VARCHAR(255) — Foreign key → users.user_id
  • format — VARCHAR(16) — NOT NULL
  • status — VARCHAR(32) — NOT NULL
  • created_at — VARCHAR(40)

image_catalog

  • image_file — VARCHAR(255) — Primary key — NOT NULL
  • title — VARCHAR(512) — NOT NULL
  • source_url — VARCHAR(1024)

image_placements

  • id — VARCHAR(64) — Primary key — NOT NULL
  • segment_id — VARCHAR(64) — Foreign key → translation_segments.id — NOT NULL
  • doc_id — VARCHAR(36) — Foreign key → documents.id — NOT NULL
  • image_file — VARCHAR(255) — NOT NULL
  • line_index — INT — NOT NULL
  • title — VARCHAR(512)
  • image_url — VARCHAR(1024)
  • section_heading — VARCHAR(512)
  • auto_filled — TINYINT(1) — NOT NULL

legal_db_entries

  • entry_id — VARCHAR(64) — Primary key — NOT NULL
  • original_sentence — TEXT — NOT NULL
  • easy_text — MEDIUMTEXT — NOT NULL
  • title — VARCHAR(512)
  • image_file — VARCHAR(255) — Foreign key → image_catalog.image_file

term_dictionaries

  • dict_id — VARCHAR(32) — Primary key — NOT NULL
  • dict_name — VARCHAR(128) — NOT NULL
  • enabled — TINYINT(1) — NOT NULL
  • priority — INT — NOT NULL

term_entries

  • original_term — VARCHAR(512) — Primary key — NOT NULL
  • dict_id — VARCHAR(32) — Foreign key → term_dictionaries.dict_id — NOT NULL
  • recommended_term — VARCHAR(512) — NOT NULL

translation_segments

  • id — VARCHAR(64) — Primary key — NOT NULL
  • doc_id — VARCHAR(36) — Foreign key → documents.id — NOT NULL
  • seq_no — INT — NOT NULL
  • original — TEXT — NOT NULL
  • easy_text — MEDIUMTEXT — NOT NULL
  • source — VARCHAR(16) — NOT NULL
  • legacy_image_file — VARCHAR(255)
  • legacy_image_url — VARCHAR(1024)
  • legacy_title — VARCHAR(512)

user_project_artifacts

  • artifact_kind — VARCHAR(32) — Primary key — NOT NULL
  • user_id — VARCHAR(255) — Foreign key → user_projects.user_id — NOT NULL
  • doc_id — VARCHAR(36) — Foreign key → user_projects.doc_id — NOT NULL
  • file_name — VARCHAR(255) — NOT NULL
  • content_type — VARCHAR(64)
  • created_at — VARCHAR(40)

user_projects

  • user_id — VARCHAR(255) — Foreign key → users.user_id — NOT NULL
  • doc_id — VARCHAR(36) — Foreign key → documents.id — NOT NULL
  • filename — VARCHAR(512)
  • created_at — VARCHAR(40)
  • updated_at — VARCHAR(40)

users

  • user_id — VARCHAR(255) — Primary key — NOT NULL
  • display_name — VARCHAR(255)
  • is_admin — TINYINT(1) — NOT NULL
  • created_at — VARCHAR(40)