CREATE TABLE IF NOT EXISTS training_task_class_config (
  id varchar(64) NOT NULL,
  teaching_class_id varchar(64) NOT NULL,
  task_key varchar(128) NOT NULL,
  project_name varchar(128) NOT NULL,
  task_name varchar(128) NOT NULL,
  knowledge text NULL,
  background text NULL,
  objectives text NULL,
  requirements text NULL,
  steps text NULL,
  material_name varchar(255) NULL,
  material_url varchar(500) NULL,
  sort int DEFAULT 0,
  enabled bit(1) DEFAULT b'1',
  created_by varchar(64) NULL,
  create_time datetime NULL,
  update_time datetime NULL,
  PRIMARY KEY (id),
  UNIQUE KEY uk_training_task_class_key (teaching_class_id, task_key),
  KEY idx_training_task_class_enabled_sort (teaching_class_id, enabled, sort),
  KEY idx_training_task_class_created_by (created_by)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Class scoped training task config';
