|
@@ -4,6 +4,7 @@ namespace App\Models\Enums;
|
|
|
|
|
|
use App\Models\Action;
|
|
|
use App\Models\Asset;
|
|
|
+use App\Models\Company;
|
|
|
use App\Models\Container;
|
|
|
use App\Models\Plan;
|
|
|
use App\Models\Project;
|
|
@@ -26,6 +27,8 @@ enum FileObjectType: string
|
|
|
|
|
|
case CONTAINER = "container";
|
|
|
|
|
|
+ case COMPANY = "company";
|
|
|
+
|
|
|
public function modelBuilder(): \Illuminate\Database\Eloquent\Builder
|
|
|
{
|
|
|
return match ($this) {
|
|
@@ -36,6 +39,7 @@ enum FileObjectType: string
|
|
|
self::ACTION => Action::query(),
|
|
|
self::PLAN => Plan::query(),
|
|
|
self::CONTAINER => Container::query(),
|
|
|
+ self::COMPANY => Company::query(),
|
|
|
};
|
|
|
}
|
|
|
|
|
@@ -49,6 +53,7 @@ enum FileObjectType: string
|
|
|
self::ACTION => Action::query(),
|
|
|
self::PLAN => Plan::query(),
|
|
|
self::CONTAINER => Container::query()->allowed($id),
|
|
|
+ self::COMPANY => Company::query(),
|
|
|
};
|
|
|
}
|
|
|
}
|