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

@@ -2,13 +2,28 @@
namespace App\Models;
use App\Jobs\Services\RunStep;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class Step extends Model
{
protected function casts(): array
{
return [
'started_at' => 'datetime',
'finished_at' => 'datetime',
'secrets' => 'encrypted:array',
];
}
public function deployment(): BelongsTo
{
return $this->belongsTo(Deployment::class);
}
public function dispatchJob(): void
{
dispatch(new RunStep($this));
}
}