CREATE TABLE IF NOT EXISTS student_demo_session (
  id varchar(64) NOT NULL,
  ticket_hash char(64) NOT NULL,
  teacher_user_id varchar(64) NOT NULL,
  teacher_name varchar(128) NULL,
  school_id varchar(64) NOT NULL,
  teaching_class_id varchar(64) NOT NULL,
  teaching_class_name varchar(255) NULL,
  expires_at datetime NOT NULL,
  used_at datetime NULL,
  create_time datetime NOT NULL,
  PRIMARY KEY (id),
  UNIQUE KEY uk_student_demo_session_ticket_hash (ticket_hash),
  KEY idx_student_demo_session_expires_at (expires_at)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
