pdf_quiz
Tables (8)
attempt_answers
- attempt_answer_id — BIGSERIAL
- attempt_id — BIGINT — NOT NULL
- question_id — BIGINT — NOT NULL
- selected_choice_id — BIGINT
- short_answer_text — TEXT
- is_correct — BOOLEAN
- answered_at — TIMESTAMPTZ
export_jobs
- export_id — BIGSERIAL
- quiz_set_id — BIGINT
- attempt_id — BIGINT
- export_type — VARCHAR(30) — NOT NULL
- file_path — TEXT — NOT NULL
- created_at — TIMESTAMPTZ — NOT NULL
pdf_docs
- pdf_id — BIGSERIAL
- user_id — BIGINT
- original_name — TEXT — NOT NULL
- file_size_bytes — BIGINT
- page_count — INT
- storage_path — TEXT — NOT NULL
- uploaded_at — TIMESTAMPTZ — NOT NULL
- deleted_at — TIMESTAMPTZ
question_choices
- choice_id — BIGSERIAL
- question_id — BIGINT — NOT NULL
- ordinal — INT — NOT NULL
- choice_text — TEXT — NOT NULL
- is_correct — BOOLEAN — NOT NULL
questions
- question_id — BIGSERIAL
- quiz_set_id — BIGINT — NOT NULL
- ordinal — INT — NOT NULL
- type — question_type — NOT NULL
- question_text — TEXT — NOT NULL
- explanation — TEXT
- source_page_from — INT
- source_page_to — INT
- correct_answer_text — TEXT
quiz_attempts
- attempt_id — BIGSERIAL
- quiz_set_id — BIGINT — NOT NULL
- user_id — BIGINT
- started_at — TIMESTAMPTZ — NOT NULL
- submitted_at — TIMESTAMPTZ
- score — INT
- total_questions — INT
quiz_sets
- quiz_set_id — BIGSERIAL
- pdf_id — BIGINT — NOT NULL
- num_questions — INT — NOT NULL
- question_type — question_type — NOT NULL
- difficulty — difficulty_level
- gen_model — TEXT
- gen_duration_ms — INT
- status — VARCHAR(20) — NOT NULL
- created_at — TIMESTAMPTZ — NOT NULL
- meta — JSONB
users
- user_id — BIGSERIAL
- display_name — VARCHAR(50) — NOT NULL
- pin_hash — TEXT — NOT NULL
- created_at — TIMESTAMPTZ — NOT NULL