bizxray
Tables (14)
annotations
- id — BIGINT — Primary key — NOT NULL
- job_id — BIGINT — Foreign key → review_jobs.id — NOT NULL
- finding_id — BIGINT — Foreign key → findings.id
- author_id — BIGINT — Foreign key → users.id — NOT NULL
- body — TEXT — NOT NULL
- anchor_id — VARCHAR(100)
- page_no — INT
- created_at — TIMESTAMPTZ — NOT NULL
- updated_at — TIMESTAMPTZ — NOT NULL
- deleted_at — TIMESTAMPTZ
document_tags
- document_id — BIGINT — Foreign key → documents.id — NOT NULL
- tag_id — BIGINT — Foreign key → tags.id — NOT NULL
- created_at — TIMESTAMPTZ — NOT NULL
documents
- id — BIGINT — Primary key — NOT NULL
- owner_id — BIGINT — Foreign key → users.id — NOT NULL
- title — VARCHAR(255) — NOT NULL
- file_key — VARCHAR(512) — NOT NULL
- file_hash — VARCHAR(64) — NOT NULL
- mime_type — VARCHAR(100) — NOT NULL
- size_bytes — BIGINT — NOT NULL
- page_count — INT
- version — INT — NOT NULL
- summary — TEXT
- parse_status — VARCHAR(20) — NOT NULL
- uploaded_at — TIMESTAMPTZ — NOT NULL
- updated_at — TIMESTAMPTZ — NOT NULL
- deleted_at — TIMESTAMPTZ
extracted_elements
- id — BIGINT — Primary key — NOT NULL
- document_id — BIGINT — Foreign key → documents.id — NOT NULL
- section_id — BIGINT — Foreign key → sections.id
- page_no — INT — NOT NULL
- kind — VARCHAR(30) — NOT NULL
- raw_text — TEXT
- normalized_value — NUMERIC
- unit — VARCHAR(20)
- bbox — JSONB
finding_decisions
- id — BIGINT — Primary key — NOT NULL
- finding_id — BIGINT — Foreign key → findings.id — NOT NULL
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- verdict — VARCHAR(20) — NOT NULL
- created_at — TIMESTAMPTZ — NOT NULL
finding_evidence
- id — BIGINT — Primary key — NOT NULL
- finding_id — BIGINT — Foreign key → findings.id — NOT NULL
- anchor_id — VARCHAR(100) — NOT NULL
- page_no — INT — NOT NULL
- label — TEXT
- selected_text — TEXT
- order_no — INT — NOT NULL
findings
- id — BIGINT — Primary key — NOT NULL
- job_id — BIGINT — Foreign key → review_jobs.id — NOT NULL
- finding_type — VARCHAR(20) — NOT NULL
- method — VARCHAR(20) — NOT NULL
- verdict — VARCHAR(20) — NOT NULL
- section_id — BIGINT — Foreign key → sections.id
- page_no — INT — NOT NULL
- title — VARCHAR(255) — NOT NULL
- description — TEXT — NOT NULL
- confidence — NUMERIC — NOT NULL
- calculation — JSONB
- order_no — INT — NOT NULL
- decided_at — TIMESTAMPTZ
- created_at — TIMESTAMPTZ — NOT NULL
pages
- id — BIGINT — Primary key — NOT NULL
- document_id — BIGINT — Foreign key → documents.id — NOT NULL
- page_no — INT — NOT NULL
- width — NUMERIC
- height — NUMERIC
- text_layer — TEXT
- blocks — JSONB
- section_id — BIGINT — Foreign key → sections.id
review_jobs
- id — BIGINT — Primary key — NOT NULL
- document_id — BIGINT — Foreign key → documents.id — NOT NULL
- status — VARCHAR(20) — NOT NULL
- review_status — VARCHAR(20) — NOT NULL
- phase — VARCHAR(10) — NOT NULL
- parse_duration_ms — INT — NOT NULL
- analyze_duration_ms — INT — NOT NULL
- analyze_started_at — TIMESTAMPTZ
- steps — JSONB
- partial_failures — JSONB
- started_at — TIMESTAMPTZ — NOT NULL
- finished_at — TIMESTAMPTZ
- completed_at — TIMESTAMPTZ
- error_code — VARCHAR(50)
sections
- id — BIGINT — Primary key — NOT NULL
- document_id — BIGINT — Foreign key → documents.id — NOT NULL
- parent_id — BIGINT — Foreign key → sections.id
- source — VARCHAR(20) — NOT NULL
- title — VARCHAR(255) — NOT NULL
- level — INT — NOT NULL
- page_from — INT
- page_to — INT
- order_no — INT — NOT NULL
sessions
- id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- refresh_token_hash — VARCHAR(255) — NOT NULL
- user_agent — VARCHAR(255)
- ip — INET
- expires_at — TIMESTAMPTZ — NOT NULL
- revoked_at — TIMESTAMPTZ
tags
- id — BIGINT — Primary key — NOT NULL
- code — VARCHAR(30) — NOT NULL
- name — VARCHAR(50) — NOT NULL
- order_no — INT — NOT NULL
users
- id — BIGINT — Primary key — NOT NULL
- email — VARCHAR(255) — NOT NULL
- password_hash — VARCHAR(255) — NOT NULL
- status — VARCHAR(20) — NOT NULL
- created_at — TIMESTAMPTZ — NOT NULL
- deleted_at — TIMESTAMPTZ
validation_rules
- id — BIGINT — Primary key — NOT NULL
- rule_code — VARCHAR(50) — NOT NULL
- version — INT — NOT NULL
- target_kind — VARCHAR(30)
- expression — TEXT — NOT NULL
- tolerance — NUMERIC
- severity — VARCHAR(20) — NOT NULL
- message_template — TEXT
- effective_from — DATE
- effective_to — DATE