kolegal

Tables (6)

Article (조항)

  • id (아이디) — BIGINT — Primary key — NOT NULL — PK
  • law_id (법 아이디) — BIGINT — Foreign key → Law.id — NOT NULL — FK
  • article_number (조문 번호) — INT
  • clause_number (항 번호) — BIGINT — NOT NULL
  • item_number (호 번호) — INT — NOT NULL
  • full_reference (전체) — VARCHAR(255) — ex) 제 12조 제 3항 제 2호
  • context_text (전문) — TEXT
  • order_index (순서 인덱스) — INT

Document (문서)

  • id (아이디) — BIGINT — Primary key — NOT NULL — PK
  • file_name (Field2) — VARCHAR(500) — ex) industrial_safety_training.pdf
  • file_type (파일 종류) — ENUM — ex) pdf, hwp, txt, docx
  • uploaded_at (업로드 시각) — DATETIME — UTC
  • text_content (전문 내용) — LONGTEXT

DocumentClause (문서 추출 조항)

  • id (아이디) — BIGINT — Primary key — NOT NULL — PK
  • document_id (문서 아이디) — BIGINT — Foreign key → Document.id — NOT NULL — FK
  • clausse_text (조항) — VARCHAR(255) — ex) 제 12호 제 3항
  • text_start_index (시작 인덱스) — INT
  • text_end_index (끝 인덱스) — INT

DocumentClause-Map (문서 법령 매핑)

  • Key — Primary key — NOT NULL
  • article_id (조항 아이디) — BIGINT — Foreign key → Article.id — NOT NULL — FK
  • document_clause_id (문서 조문 아이디) — BIGINT — Foreign key → DocumentClause.id — NOT NULL — FK
  • confidence_score — DECIMAL(4,3) — ex) 0.97
  • match_status (싱테) — ENUM — ex) EXACT, CANDIDATE, NONE

Law (법령)

  • id (아이디) — BIGINT — Primary key — NOT NULL — PK
  • name (이름) — VARCHAR(255) — ex) 산업안전보건법
  • type (타입) — ENUM — NOT NULL — ex) 법률 법률, 시행령, 시행규칙
  • parent_law_id (부모 법 아이디) — BIGINT — NOT NULL — 한 인스턴스가 시행령일 경우 parent_law_id 값은 같은 Law에 관련 법령 아이디 값이다 Null 값을 허용한다
  • effective_date (유효 날짜) — DATE
  • revision_date (개정 날짜) — DATE
  • raw_text (전문 텍스트) — LONGTEXT

LawRelation (조문 간 관계)

  • id (아아디) — BIGINT — Primary key — NOT NULL — PK
  • law_id (법 아이디) — BIGINT — Foreign key → Law.id — NOT NULL — FK
  • article_id (조항 아이디) — BIGINT — Foreign key → Article.id — NOT NULL — FK
  • type (타입) — ENUM — ex) 참조, 근거, 위임, 관련