jeonsafe
Tables (19)
audit_logs
- audit_logs_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT
- project_id — BIGINT
- action — VARCHAR(100) — NOT NULL
- meta_json — JSON
- created_at — DATETIME(3) — NOT NULL
chat_messages
- chat_messages_id — BIGINT — Primary key — NOT NULL
- chat_session_id — BIGINT — NOT NULL
- sender — ENUM — NOT NULL
- content — MEDIUMTEXT — NOT NULL
- created_at — DATETIME(3) — NOT NULL
chat_sessions
- chat_sessions_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — NOT NULL
- project_id — BIGINT — NOT NULL
- chat_type — ENUM — NOT NULL
- created_at — DATETIME(3) — NOT NULL
document_pages
- pages_id (document_pages_id) — BIGINT — Primary key — NOT NULL
- documents_id — BIGINT — Foreign key → documents.documents_id — NOT NULL
- projects_id — BIGINT — Foreign key → documents.projects_id — NOT NULL
- projects.users_id (projects.user_id) — BIGINT — Foreign key → documents.projects.users_id — NOT NULL
- files_id — BIGINT — Foreign key → documents.files_id — NOT NULL
- files.projects_id — BIGINT — Foreign key → documents.files.projects_id — NOT NULL
- files.projects.users_id — BIGINT — Foreign key → documents.files.projects.users_id — NOT NULL
- files.users_id (files.user_id) — BIGINT — Foreign key → documents.files.users_id — NOT NULL
- page_number — INT — NOT NULL
- width — INT
- height — INT
- text_full — MEDIUMTEXT
- created_at — DATETIME(3) — NOT NULL
- deleted_at — DATETIME(3)
document_sentences
- sentences_id (document_sentences_id) — BIGINT — Primary key — NOT NULL
- documents_id — BIGINT — Foreign key → documents.documents_id — NOT NULL
- projects_id — BIGINT — Foreign key → documents.projects_id — NOT NULL
- projects.users_id (projects.user_id) — BIGINT — Foreign key → documents.projects.users_id — NOT NULL
- files_id — BIGINT — Foreign key → documents.files_id — NOT NULL
- files.projects_id — BIGINT — Foreign key → documents.files.projects_id — NOT NULL
- files.projects.users_id — BIGINT — Foreign key → documents.files.projects.users_id — NOT NULL
- files.users_id (files.user_id) — BIGINT — Foreign key → documents.files.users_id — NOT NULL
- pages_id (document_pages_id) — BIGINT — Foreign key → document_pages.pages_id — NOT NULL
- pages.documents_id — BIGINT — Foreign key → document_pages.documents_id — NOT NULL
- pages.projects_id — BIGINT — Foreign key → document_pages.projects_id — NOT NULL
- pages.projects.users_id (pages.projects.user_id) — BIGINT — Foreign key → document_pages.projects.users_id — NOT NULL
- pages.files_id — BIGINT — Foreign key → document_pages.files_id — NOT NULL
- pages.files.projects_id — BIGINT — Foreign key → document_pages.files.projects_id — NOT NULL
- pages.files.projects.users_id — BIGINT — Foreign key → document_pages.files.projects.users_id — NOT NULL
- pages.files.users_id (pages.files.user_id) — BIGINT — Foreign key → document_pages.files.users_id — NOT NULL
- sent_index — INT — NOT NULL
- content — TEXT — NOT NULL
- bbox_json — JSON
- normalized_json — JSON
- created_at — DATETIME(3) — NOT NULL
- deleted_at — DATETIME(3)
documents
- documents_id — BIGINT — Primary key — NOT NULL
- projects_id — BIGINT — Foreign key → projects.projects_id — NOT NULL
- projects.users_id (projects.user_id) — BIGINT — Foreign key → projects.users_id — NOT NULL
- files_id — BIGINT — Foreign key → files.files_id — NOT NULL
- files.projects_id — BIGINT — Foreign key → files.projects_id — NOT NULL
- files.projects.users_id — BIGINT — Foreign key → files.projects.users_id — NOT NULL
- files.users_id (files.user_id) — BIGINT — Foreign key → files.users_id — NOT NULL
- doc_kind — ENUM — NOT NULL
- ocr_status — ENUM — NOT NULL
- language — VARCHAR(16)
- created_at — DATETIME(3) — NOT NULL
- updated_at — DATETIME(3) — NOT NULL
- deleted_at — DATETIME(3)
evidence_assessments
- evidence_assessments_id — BIGINT — Primary key — NOT NULL
- report_id — BIGINT — NOT NULL
- evidence_id — BIGINT — NOT NULL
- verdict — ENUM — NOT NULL
- reasons — TEXT
- suggestions — TEXT
- created_at — DATETIME(3) — NOT NULL
evidences
- evidences_id — BIGINT — Primary key — NOT NULL
- projects_id — BIGINT — Foreign key → projects.projects_id — NOT NULL
- projects.users_id — BIGINT — Foreign key → projects.users_id — NOT NULL
- files_id — BIGINT — Foreign key → files.files_id — NOT NULL
- files.projects_id — BIGINT — Foreign key → files.projects_id — NOT NULL
- files.projects.users_id — BIGINT — Foreign key → files.projects.users_id — NOT NULL
- files.user_id — BIGINT — Foreign key → files.users_id — NOT NULL
- evidence_type — ENUM — NOT NULL
- auto_classified — BOOLEAN — NOT NULL
- note — VARCHAR(500)
- created_at — DATETIME(3) — NOT NULL
- deleted_at — DATETIME(3)
files (파일)
- files_id — BIGINT — Primary key — NOT NULL
- projects_id — BIGINT — Foreign key → projects.projects_id — NOT NULL
- projects.users_id — BIGINT — Foreign key → projects.users_id — NOT NULL
- users_id (user_id) — BIGINT — Foreign key → users.users_id — NOT NULL
- file_name — VARCHAR(255) — NOT NULL
- mime_type — VARCHAR(100) — NOT NULL
- storage_key — VARCHAR(512) — NOT NULL
- size_bytes — BIGINT — NOT NULL
- sha256_hex — CHAR(64)
- uploaded_at — DATETIME(3) — NOT NULL
- deleted_at — DATETIME(3)
laws
- laws_id — BIGINT — Primary key — NOT NULL
- law_code — VARCHAR(100) — NOT NULL
- title — VARCHAR(255) — NOT NULL
- article — VARCHAR(100)
- content — MEDIUMTEXT
- source_url — VARCHAR(1000)
- created_at — DATETIME(3) — NOT NULL
precedents
- precedents_id — BIGINT — Primary key — NOT NULL
- court — VARCHAR(100) — NOT NULL
- case_no — VARCHAR(100) — NOT NULL
- date — DATE
- title — VARCHAR(255)
- summary — MEDIUMTEXT
- source_url — VARCHAR(1000)
- created_at — DATETIME(3) — NOT NULL
projects (프로젝트)
- projects_id — BIGINT — Primary key — NOT NULL
- users_id — BIGINT — Foreign key → users.users_id — NOT NULL
- title — VARCHAR(200) — NOT NULL
- project_type — ENUM — NOT NULL
- status — ENUM — NOT NULL
- summary_json — JSON
- created_at — DATETIME(3) — NOT NULL
- updated_at — DATETIME(3) — NOT NULL
- deleted_at — DATETIME(3)
reports
- reports_id — BIGINT — Primary key — NOT NULL
- project_id — BIGINT — NOT NULL
- report_type — ENUM — NOT NULL
- title — VARCHAR(200) — NOT NULL
- summary — TEXT
- details_json — JSON
- created_by — BIGINT — NOT NULL
- created_at — DATETIME(3) — NOT NULL
- deleted_at — DATETIME(3)
risk_sentence_law
- risk_sentence_law_id — BIGINT — Primary key — NOT NULL
- risk_sentence_id — BIGINT — NOT NULL
- law_id — BIGINT — NOT NULL
- relation_type — ENUM — NOT NULL
- created_at — DATETIME(3) — NOT NULL
risk_sentence_precedent
- risk_sentence_precedent_id — BIGINT — Primary key — NOT NULL
- risk_sentence_id — BIGINT — NOT NULL
- precedent_id — BIGINT — NOT NULL
- relation_type — ENUM — NOT NULL
- created_at — DATETIME(3) — NOT NULL
risk_sentences
- risk_sentences_id — BIGINT — Primary key — NOT NULL
- documents_id — BIGINT — Foreign key → documents.documents_id — NOT NULL
- projects_id — BIGINT — Foreign key → documents.projects_id — NOT NULL
- projects.users_id (projects.user_id) — BIGINT — Foreign key → documents.projects.users_id — NOT NULL
- files_id — BIGINT — Foreign key → documents.files_id — NOT NULL
- files.projects_id — BIGINT — Foreign key → documents.files.projects_id — NOT NULL
- files.projects.users_id — BIGINT — Foreign key → documents.files.projects.users_id — NOT NULL
- files.users_id (files.user_id) — BIGINT — Foreign key → documents.files.users_id — NOT NULL
- sentences_id (document_sentences_id) — BIGINT — Foreign key → document_sentences.sentences_id — NOT NULL
- documents_id (documents_id2) — BIGINT — Foreign key → document_sentences.documents_id — NOT NULL
- projects_id (projects_id2) — BIGINT — Foreign key → document_sentences.projects_id — NOT NULL
- projects.users_id (projects.user_id2) — BIGINT — Foreign key → document_sentences.projects.users_id — NOT NULL
- files_id (files_id2) — BIGINT — Foreign key → document_sentences.files_id — NOT NULL
- files.projects_id (files.projects_id2) — BIGINT — Foreign key → document_sentences.files.projects_id — NOT NULL
- files.projects.users_id (files.projects.users_id2) — BIGINT — Foreign key → document_sentences.files.projects.users_id — NOT NULL
- files.users_id (files.user_id2) — BIGINT — Foreign key → document_sentences.files.users_id — NOT NULL
- pages_id (document_pages_id) — BIGINT — Foreign key → document_sentences.pages_id — NOT NULL
- pages.documents_id — BIGINT — Foreign key → document_sentences.pages.documents_id — NOT NULL
- pages.projects_id — BIGINT — Foreign key → document_sentences.pages.projects_id — NOT NULL
- pages.projects.users_id (pages.projects.user_id) — BIGINT — Foreign key → document_sentences.pages.projects.users_id — NOT NULL
- pages.files_id — BIGINT — Foreign key → document_sentences.pages.files_id — NOT NULL
- pages.files.projects_id — BIGINT — Foreign key → document_sentences.pages.files.projects_id — NOT NULL
- pages.files.projects.users_id — BIGINT — Foreign key → document_sentences.pages.files.projects.users_id — NOT NULL
- pages.files.users_id (pages.files.user_id) — BIGINT — Foreign key → document_sentences.pages.files.users_id — NOT NULL
- document_id — BIGINT — NOT NULL
- sentence_id — BIGINT — NOT NULL
- label — ENUM — NOT NULL
- risk_score — DECIMAL(5,4)
- explanation — TEXT
- model_version — VARCHAR(50)
- created_at — DATETIME(3) — NOT NULL
- deleted_at — DATETIME(3)
simulation_reasons
- simulation_reasons_id — BIGINT — Primary key — NOT NULL
- simulation_id — BIGINT — NOT NULL
- polarity — ENUM — NOT NULL
- kind — ENUM — NOT NULL
- law_id — BIGINT
- precedent_id — BIGINT
- note — TEXT
simulations
- simulations_id — BIGINT — Primary key — NOT NULL
- project_id — BIGINT — NOT NULL
- win_probability — DECIMAL(5,2) — NOT NULL
- model_version — VARCHAR(50)
- created_at — DATETIME(3) — NOT NULL
- created_by — BIGINT — NOT NULL
users (사용자)
- users_id — BIGINT — Primary key — NOT NULL
- email — VARCHAR(255) — NOT NULL
- password_hash — VARCHAR(255) — NOT NULL
- name — VARCHAR(100)
- phone — VARCHAR(30)
- created_at — DATETIME(3) — NOT NULL
- updated_at — DATETIME(3) — NOT NULL
- deleted_at — DATETIME(3)