This commit is contained in:
2025-03-31 15:29:07 +00:00
parent 374ce90160
commit a62565d0ad
9 changed files with 147 additions and 6 deletions

View File

@@ -8,6 +8,14 @@ use Illuminate\Database\Eloquent\Relations\MorphTo;
class Deployment extends Model
{
protected function casts(): array
{
return [
'started_at' => 'datetime',
'finished_at' => 'datetime',
];
}
public function steps(): HasMany
{
return $this->hasMany(Step::class);
@@ -15,6 +23,6 @@ class Deployment extends Model
public function deployable(): MorphTo
{
return $this->morphTo();
return $this->morphTo('target');
}
}