CtrlLine Public

Tables (18)

alarm

  • alarm_id — BIGINT(20) — Primary key — NOT NULL
  • equipment_id — BIGINT(20) — Foreign key → equipment.equipment_id — NOT NULL
  • user_id — BIGINT(20) — Foreign key → user.user_id — NOT NULL — 처리자
  • alarm_code — VARCHAR(32) — NOT NULL
  • alarm_name — VARCHAR(32) — NOT NULL
  • alarm_type — VARCHAR(32) — NOT NULL
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP
  • alarm_cause — TEXT — NOT NULL

defective

  • defective_id — BIGINT(20) — Primary key — NOT NULL
  • equipment_id — BIGINT(20) — Foreign key → equipment.equipment_id — NOT NULL
  • defective_code — VARCHAR(32) — NOT NULL
  • defective_type — VARCHAR(32) — NOT NULL
  • defective_name — VARCHAR(32) — NOT NULL
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP

equipment

  • equipment_id — BIGINT(20) — Primary key — NOT NULL
  • line_id — BIGINT(20) — Foreign key → line.line_id — NOT NULL
  • equipment_status_id — BIGINT(20) — Foreign key → equipment_status.equipment_status_id — NOT NULL
  • user_id — BIGINT(20) — Foreign key → user.user_id — NOT NULL
  • equipment_code — VARCHAR(32) — NOT NULL
  • equipment_name — VARCHAR(32) — NOT NULL
  • equipment_type — VARCHAR(32) — NOT NULL
  • operating_time — TIMESTAMP — NOT NULL
  • maintenance_history — TIMESTAMP — 제일 최근 날짜
  • equipment_ppm — DECIMAL(10, 2) — NOT NULL
  • total_count — DECIMAL(10, 2) — NOT NULL
  • defective_count — DECIMAL(10, 2) — NOT NULL
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP
  • is_active — BOOLEAN — NOT NULL

equipment_status

  • equipment_status_id — BIGINT(20) — Primary key — NOT NULL — 1~6
  • equipment_status_code — VARCHAR(32) — NOT NULL
  • equipment_status_name — VARCHAR(32) — NOT NULL
  • description — VARCHAR(256)
  • created_at — TIMESTAMP — NOT NULL

factory

  • factory_id — BIGINT(20) — Primary key — NOT NULL
  • user_id — BIGINT(20) — Foreign key → user.user_id — NOT NULL — 공장장
  • factory_code — VARCHAR(32) — NOT NULL
  • factory_name — VARCHAR(32) — NOT NULL
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP
  • is_active — BOOLEAN — NOT NULL

item

  • item_id — BIGINT(20) — Primary key — NOT NULL
  • item_code — VARCHAR(32) — NOT NULL
  • item_name — VARCHAR(32) — NOT NULL
  • item_specification — VARCHAR(32)
  • item_unit — VARCHAR(32) — NOT NULL
  • item_status — ENUM — NOT NULL — 원재료, 부재료, 반제품, 완제품
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP
  • is_active — BOOLEAN — NOT NULL

item_line

  • item_line_id — BIGINT(20) — Primary key — NOT NULL
  • item_id — BIGINT(20) — Foreign key → item.item_id — NOT NULL
  • line_id — BIGINT(20) — Foreign key → line.line_id — NOT NULL
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP

item_serial

  • item_serial_id — BIGINT(20) — Primary key — NOT NULL
  • lot_id — BIGINT(20) — Foreign key → lot.lot_id — NOT NULL
  • serial_file_path — VARCHAR(512) — NOT NULL — www.naver.com

line

  • line_id — BIGINT(20) — Primary key — NOT NULL
  • factory_id — BIGINT(20) — Foreign key → factory.factory_id — NOT NULL
  • user_id — BIGINT(20) — Foreign key → user.user_id — NOT NULL — 반장
  • line_code — VARCHAR(32) — NOT NULL
  • line_name — VARCHAR(32) — NOT NULL
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP
  • is_active — BOOLEAN — NOT NULL

log

  • log_id — BIGINT(20) — Primary key — NOT NULL
  • user_id — BIGINT(20) — Foreign key → user.user_id — NOT NULL
  • action_type — ENUM — NOT NULL — CUD 중에서
  • entity_name — VARCHAR(64) — NOT NULL
  • entity_id — BIGINT(20) — NOT NULL
  • created_at — TIMESTAMP — NOT NULL

lot

  • lot_id — BIGINT(20) — Primary key — NOT NULL
  • item_id — BIGINT(20) — Foreign key → item.item_id — NOT NULL
  • production_plan_id — BIGINT(20) — Foreign key → production_plan.production_plan_id — NOT NULL
  • lot_no — VARCHAR(32) — NOT NULL
  • created_at — TIMESTAMP
  • updated_at — TIMESTAMP
  • is_deleted — BOOLEAN — NOT NULL

mes_data

  • mes_data_id — BIGINT(20) — Primary key — NOT NULL
  • factory_id — BIGINT(20) — Foreign key → factory.factory_id — NOT NULL
  • power_consumption — DECIMAL(10, 2) — NOT NULL
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP

plan_defective

  • plan_defective_id — BIGINT(20) — Primary key — NOT NULL
  • production_plan_id — BIGINT(20) — Foreign key → production_plan.production_plan_id — NOT NULL
  • defective_document_no — VARCHAR(32)
  • created_at — TIMESTAMP
  • updated_at — TIMESTAMP

plan_defective_xref

  • defective_xref_id — BIGINT(20) — Primary key — NOT NULL
  • defective_id — BIGINT(20) — Foreign key → defective.defective_id — NOT NULL
  • plann_defective_id — BIGINT(20) — Foreign key → plan_defective.plan_defective_id — NOT NULL
  • defective_qty — DECIMAL(10,2) — NOT NULL
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP

process

  • process_id — BIGINT(20) — Primary key — NOT NULL
  • equipment_id — BIGINT(20) — Foreign key → equipment.equipment_id — NOT NULL
  • user_id — BIGINT(20) — Foreign key → user.user_id — NOT NULL
  • process_code — VARCHAR(32) — NOT NULL
  • process_name — VARCHAR(32) — NOT NULL
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP
  • is_active — BOOLEAN — NOT NULL

production_performance

  • production_performance_id — BIGINT(20) — Primary key — NOT NULL
  • production_plan_id — BIGINT(20) — Foreign key → production_plan.production_plan_id — NOT NULL
  • performance_document_no — VARCHAR(32) — NOT NULL
  • total_qty — DECIMAL(10,2) — NOT NULL
  • performance_qty — DECIMAL(10,2) — NOT NULL
  • performance_defective_rate — DECIMAL(10,2) — NOT NULL
  • start_time — DATETIME — NOT NULL
  • end_time — DATETIME — NOT NULL
  • remark — TEXT
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP
  • is_deleted — BOOLEAN — NOT NULL

production_plan

  • production_plan_id — BIGINT(20) — Primary key — NOT NULL
  • sales_manager_id — BIGINT(20) — Foreign key → user.user_id — NOT NULL — 영업 담당자
  • production_manager_id — BIGINT(20) — Foreign key → user.user_id — NOT NULL — 생산 담당자
  • item_line_id — BIGINT(20) — Foreign key → item_line.item_line_id — NOT NULL
  • plan_document_no — VARCHAR(32) — NOT NULL — 2025/10/24-1
  • production_plan_status — ENUM — NOT NULL — PENDING(기본값)), CONFIRMED, RUNNING, COMPLETED, RETURNED
  • due_date — DATE — NOT NULL
  • planned_qty — DECIMAL(10, 2) — NOT NULL
  • start_time — DATETIME — NOT NULL
  • end_time — DATETIME — NOT NULL
  • remark — TEXT
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP

user

  • user_id — BIGINT(20) — Primary key — NOT NULL
  • emp_no — VARCHAR(32) — NOT NULL — 입사연도(4)월(2)순번(3)
  • user_name — VARCHAR(32) — NOT NULL
  • user_email — VARCHAR(32) — NOT NULL
  • user_password — VARCHAR(64) — NOT NULL
  • user_phone_number — VARCHAR(32) — NOT NULL
  • user_hired_date — DATE — NOT NULL
  • user_termination_date — DATE
  • user_role — ENUM — NOT NULL — 유저 < 담당자 < 관리자
  • user_status — ENUM — NOT NULL — 재직, 휴직, 퇴사
  • user_department — VARCHAR(32) — NOT NULL
  • user_position — ENUM — NOT NULL — Assistant, Assistant Manager, Manger, General Manager, Diretor, CEO
  • user_address — VARCHAR(64) — NOT NULL
  • user_extension — VARCHAR(32) — NOT NULL — 부서(2)+순번(3)
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP