feat: add deployments as activity

fix: tests
refactor: remoteProcess
This commit is contained in:
Andras Bacsai
2023-03-29 12:27:02 +02:00
parent 9019d1484e
commit 78c4344583
15 changed files with 81 additions and 81 deletions

View File

@@ -2,6 +2,8 @@
namespace App\Models;
use Spatie\Activitylog\Models\Activity;
class Application extends BaseModel
{
public function environment()
@@ -20,8 +22,9 @@ class Application extends BaseModel
{
return $this->morphTo();
}
public function deployments()
public function get_deployment(string $deployment_uuid)
{
return $this->morphMany(Deployment::class, 'type');
return Activity::where('subject_id', $this->id)->where('properties->deployment_uuid', '=', $deployment_uuid)->first();
}
}