AI_VIBE_CODING_TEST

Tables (14)

admin_audit_logs

  • id — BIGSERIAL
  • admin_id — BIGINT — NOT NULL
  • action — VARCHAR(100) — NOT NULL
  • details — JSONB — NOT NULL
  • created_at — TIMESTAMPTZ — NOT NULL

admins

  • id — BIGSERIAL
  • admin_number — VARCHAR(50) — NOT NULL
  • email — VARCHAR(255)
  • password_hash — VARCHAR(255) — NOT NULL
  • is_2fa_enabled — BOOLEAN — NOT NULL
  • created_at — TIMESTAMPTZ — NOT NULL
  • updated_at — TIMESTAMPTZ — NOT NULL

entry_codes

  • code — VARCHAR(64)
  • label — VARCHAR(100)
  • exam_id — BIGINT — NOT NULL
  • problem_set_id — BIGINT
  • expires_at — TIMESTAMPTZ — NOT NULL
  • max_uses — INT — NOT NULL
  • used_count — INT — NOT NULL
  • is_active — BOOLEAN — NOT NULL
  • created_by — BIGINT — NOT NULL
  • created_at — TIMESTAMPTZ — NOT NULL

exam_participants

  • id — BIGSERIAL
  • exam_id — BIGINT — NOT NULL
  • participant_id — BIGINT — NOT NULL
  • state — exam_state_enum — NOT NULL
  • token_limit — INT — NOT NULL
  • token_used — INT — NOT NULL
  • spec_id — BIGINT — NOT NULL
  • joined_at — TIMESTAMPTZ — NOT NULL

exams

  • id — BIGSERIAL
  • title — VARCHAR(200) — NOT NULL
  • state — exam_state_enum — NOT NULL
  • starts_at — TIMESTAMPTZ
  • ends_at — TIMESTAMPTZ
  • version — INT — NOT NULL
  • created_by — BIGINT — NOT NULL
  • created_at — TIMESTAMPTZ — NOT NULL
  • updated_at — TIMESTAMPTZ — NOT NULL

participants

  • id — BIGSERIAL — Primary key
  • participant_id — BIGINT — Foreign key → submissions.participant_id — NOT NULL
  • name — VARCHAR(100) — NOT NULL
  • phone — VARCHAR(30) — NOT NULL
  • created_at — TIMESTAMPTZ — NOT NULL

problem_set_items

  • id — BIGSERIAL
  • problem_set_id — BIGINT — NOT NULL
  • problem_id — BIGINT — NOT NULL
  • weight — INT — NOT NULL

problem_sets

  • id — BIGSERIAL
  • name — VARCHAR(100) — NOT NULL
  • created_by — BIGINT — NOT NULL
  • created_at — TIMESTAMPTZ — NOT NULL

problem_specs

  • spec_id — BIGINT — Foreign key → submissions.spec_id — NOT NULL
  • problem_id — BIGINT — NOT NULL
  • version — INT — NOT NULL
  • content_md — TEXT — NOT NULL
  • checker_json — JSONB — NOT NULL
  • rubric_json — JSONB — NOT NULL
  • changelog_md — TEXT
  • published_at — TIMESTAMPTZ

problems

  • id — BIGSERIAL
  • title — VARCHAR(255) — NOT NULL
  • difficulty — difficulty_enum
  • tags — JSONB — NOT NULL
  • status — problem_status_enum — NOT NULL
  • created_at — TIMESTAMPTZ — NOT NULL
  • current_spec_id — BIGINT

prompt_messages

  • id — BIGSERIAL
  • session_id — BIGINT — NOT NULL
  • turn — INT — NOT NULL
  • role — prompt_role_enum — NOT NULL
  • content — TEXT — NOT NULL
  • token_count — INT — NOT NULL
  • meta — JSONB — NOT NULL
  • created_at — TIMESTAMPTZ — NOT NULL

scores

  • submission_id — BIGINT
  • prompt_score — NUMERIC(5,2) — NOT NULL
  • perf_score — NUMERIC(5,2) — NOT NULL
  • correctness_score — NUMERIC(5,2) — NOT NULL
  • total_score — NUMERIC(5,2) — NOT NULL
  • rubric_json — JSONB — NOT NULL
  • created_at — TIMESTAMPTZ — NOT NULL

submission_runs

  • id — BIGSERIAL
  • submission_id — BIGINT — NOT NULL
  • case_index — INT — NOT NULL
  • grp — run_grp_enum — NOT NULL
  • verdict — verdict_enum — NOT NULL
  • time_ms — INT — NOT NULL
  • mem_kb — INT — NOT NULL
  • stdout_bytes — INT — NOT NULL
  • stderr_bytes — INT — NOT NULL
  • created_at — TIMESTAMPTZ — NOT NULL

submissions

  • id — BIGSERIAL — Primary key
  • spec_id — BIGINT — Primary key — NOT NULL
  • exam_id — BIGINT — Primary key — NOT NULL
  • participant_id — BIGINT — Primary key — NOT NULL
  • lang — VARCHAR(40) — NOT NULL
  • status — submission_status_enum — NOT NULL
  • code_inline — TEXT
  • code_sha256 — CHAR(64) — NOT NULL
  • code_bytes — INT — NOT NULL
  • code_loc — INT — NOT NULL
  • created_at — TIMESTAMPTZ — NOT NULL
  • updated_at — TIMESTAMPTZ — NOT NULL