1

Tables (14)

accident

  • accident_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → user.user_id — NOT NULL
  • accident_type — ENUM — NOT NULL
  • injury_self — ENUM
  • injury_other — ENUM
  • occurred_at — DATETIME — NOT NULL
  • latitude — DECIMAL(10,7)
  • longitude — DECIMAL(10,7)
  • direction — VARCHAR(50)
  • road_condition — VARCHAR(100)
  • memo — TEXT
  • status — ENUM — NOT NULL
  • created_at — DATETIME — NOT NULL

api_usage

  • usage_id — BIGINT — Primary key — NOT NULL
  • api_type — ENUM — NOT NULL
  • usage_date — DATE — NOT NULL
  • used_amount — INT — NOT NULL
  • unit — VARCHAR(20) — NOT NULL

capture_decision

  • decision_id — BIGINT — Primary key — NOT NULL
  • accident_id — BIGINT — Foreign key → accident.accident_id — NOT NULL
  • is_required — BOOLEAN — NOT NULL
  • reason — VARCHAR(255)
  • decided_by — ENUM — NOT NULL
  • created_at — DATETIME — NOT NULL

checklist_item

  • checklist_item_id — BIGINT — Primary key — NOT NULL
  • accident_id — BIGINT — Foreign key → accident.accident_id — NOT NULL
  • content — VARCHAR(100) — NOT NULL
  • order_no — INT — NOT NULL
  • source — ENUM — NOT NULL
  • is_completed — BOOLEAN — NOT NULL
  • completed_at — DATETIME

contact_log

  • contact_id — BIGINT — Primary key — NOT NULL
  • accident_id — BIGINT — Foreign key → accident.accident_id — NOT NULL
  • contact_type — ENUM — NOT NULL
  • contacted_at — DATETIME — NOT NULL

document

  • document_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → user.user_id — NOT NULL
  • doc_type — ENUM — NOT NULL
  • extracted_info — JSON — NOT NULL
  • is_manual — BOOLEAN — NOT NULL
  • created_at — DATETIME — NOT NULL

insurance_guide

  • guide_id — BIGINT — Primary key — NOT NULL
  • accident_type — ENUM — NOT NULL
  • procedure_content — TEXT — NOT NULL
  • required_docs — JSON
  • updated_at — DATETIME — NOT NULL

photo

  • photo_id — BIGINT — Primary key — NOT NULL
  • accident_id — BIGINT — Foreign key → accident.accident_id — NOT NULL
  • file_url — VARCHAR(255) — NOT NULL
  • category — VARCHAR(50)
  • latitude — DECIMAL(10,7)
  • longitude — DECIMAL(10,7)
  • taken_at — DATETIME
  • created_at — DATETIME — NOT NULL

photo_tag

  • tag_id — BIGINT — Primary key — NOT NULL
  • photo_id — BIGINT — Foreign key → photo.photo_id — NOT NULL
  • tag_type — ENUM — NOT NULL
  • label — VARCHAR(100) — NOT NULL
  • confidence — DECIMAL(5,2)
  • is_manual — BOOLEAN — NOT NULL

report

  • report_id — BIGINT — Primary key — NOT NULL
  • accident_id — BIGINT — Foreign key → accident.accident_id — NOT NULL
  • narrative — TEXT — NOT NULL
  • summary — JSON
  • unverified_items — JSON
  • version — INT — NOT NULL
  • status — ENUM — NOT NULL
  • pdf_url — VARCHAR(255)
  • confirmed_at — DATETIME
  • created_at — DATETIME — NOT NULL

social_auth

  • social_auth_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → user.user_id — NOT NULL
  • provider — ENUM — NOT NULL
  • provider_user_id — VARCHAR(100) — NOT NULL
  • created_at — DATETIME — NOT NULL

statement

  • statement_id — BIGINT — Primary key — NOT NULL
  • accident_id — BIGINT — Foreign key → accident.accident_id — NOT NULL
  • audio_file_url — VARCHAR(255) — NOT NULL
  • stt_text — TEXT
  • created_at — DATETIME — NOT NULL

supplement_question

  • question_id — BIGINT — Primary key — NOT NULL
  • accident_id — BIGINT — Foreign key → accident.accident_id — NOT NULL
  • question — VARCHAR(255) — NOT NULL
  • answer — TEXT
  • round — ENUM — NOT NULL
  • created_at — DATETIME — NOT NULL

user

  • user_id — BIGINT — Primary key — NOT NULL
  • email — VARCHAR(255) — NOT NULL
  • nickname — VARCHAR(100)
  • bike_model — VARCHAR(100)
  • bike_number — VARCHAR(20)
  • created_at — DATETIME — NOT NULL
  • deleted_at — DATETIME