|
@@ -5,6 +5,7 @@ namespace App\Models\Enums;
|
|
use App\Models\Asset;
|
|
use App\Models\Asset;
|
|
use App\Models\Container;
|
|
use App\Models\Container;
|
|
use App\Models\File;
|
|
use App\Models\File;
|
|
|
|
+use App\Models\Folder;
|
|
use App\Models\Plan;
|
|
use App\Models\Plan;
|
|
use App\Models\Project;
|
|
use App\Models\Project;
|
|
use App\Models\Requirement;
|
|
use App\Models\Requirement;
|
|
@@ -13,6 +14,7 @@ use App\Services\History\Detector\AssetDetector;
|
|
use App\Services\History\Detector\ContainerContentDetector;
|
|
use App\Services\History\Detector\ContainerContentDetector;
|
|
use App\Services\History\Detector\ContainerDetector;
|
|
use App\Services\History\Detector\ContainerDetector;
|
|
use App\Services\History\Detector\FileDetector;
|
|
use App\Services\History\Detector\FileDetector;
|
|
|
|
+use App\Services\History\Detector\FoldersDetector;
|
|
use App\Services\History\Detector\ProjectDetector;
|
|
use App\Services\History\Detector\ProjectDetector;
|
|
use App\Services\History\Detector\RequirementDetector;
|
|
use App\Services\History\Detector\RequirementDetector;
|
|
use App\Services\History\Detector\TaskDetector;
|
|
use App\Services\History\Detector\TaskDetector;
|
|
@@ -35,6 +37,8 @@ enum ActionObjectType: string
|
|
|
|
|
|
case CONTAINER_FILE = "container_file";
|
|
case CONTAINER_FILE = "container_file";
|
|
|
|
|
|
|
|
+ case FOLDER = "folder";
|
|
|
|
+
|
|
public function modelBuilder(): \Illuminate\Database\Eloquent\Builder
|
|
public function modelBuilder(): \Illuminate\Database\Eloquent\Builder
|
|
{
|
|
{
|
|
return match ($this) {
|
|
return match ($this) {
|
|
@@ -45,6 +49,7 @@ enum ActionObjectType: string
|
|
self::REQUIREMENT => Requirement::query(),
|
|
self::REQUIREMENT => Requirement::query(),
|
|
self::CONTAINER => Container::query(),
|
|
self::CONTAINER => Container::query(),
|
|
self::CONTAINER_FILE => File::query(),
|
|
self::CONTAINER_FILE => File::query(),
|
|
|
|
+ self::FOLDER => Folder::query(),
|
|
};
|
|
};
|
|
}
|
|
}
|
|
|
|
|
|
@@ -58,6 +63,7 @@ enum ActionObjectType: string
|
|
self::REQUIREMENT => Requirement::query(),
|
|
self::REQUIREMENT => Requirement::query(),
|
|
self::CONTAINER => Container::query()->allowed($id),
|
|
self::CONTAINER => Container::query()->allowed($id),
|
|
self::CONTAINER_FILE => File::query(),
|
|
self::CONTAINER_FILE => File::query(),
|
|
|
|
+ self::FOLDER => Folder::query(),
|
|
};
|
|
};
|
|
}
|
|
}
|
|
|
|
|
|
@@ -84,6 +90,7 @@ enum ActionObjectType: string
|
|
ActionObjectType::CONTAINER => ContainerDetector::class,
|
|
ActionObjectType::CONTAINER => ContainerDetector::class,
|
|
ActionObjectType::CONTAINER_CONTENT => ContainerContentDetector::class,
|
|
ActionObjectType::CONTAINER_CONTENT => ContainerContentDetector::class,
|
|
ActionObjectType::CONTAINER_FILE => FileDetector::class,
|
|
ActionObjectType::CONTAINER_FILE => FileDetector::class,
|
|
|
|
+ ActionObjectType::FOLDER => FoldersDetector::class,
|
|
default => null
|
|
default => null
|
|
};
|
|
};
|
|
}
|
|
}
|