public static function getCurrent($thread)
 {
     return Self::with(['available_types', 'instruction_type'])->where('thread', $thread)->where('active_from', '<=', date('Y-m-d H:i:s'))->where(function ($q) {
         $q->whereNull('active_until')->orWhere('active_until', '>=', date('Y-m-d H:i:s'));
     })->get()->first();
 }