Implement Keystone environment deployments
This commit is contained in:
35
app/Models/BuildArtifact.php
Normal file
35
app/Models/BuildArtifact.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Enums\BuildArtifactStatus;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class BuildArtifact extends Model
|
||||
{
|
||||
protected $guarded = [];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'status' => BuildArtifactStatus::class,
|
||||
'metadata' => 'array',
|
||||
];
|
||||
}
|
||||
|
||||
public function environment(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Environment::class);
|
||||
}
|
||||
|
||||
public function builtByOperation(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Operation::class, 'built_by_operation_id');
|
||||
}
|
||||
|
||||
public function builtByService(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Service::class, 'built_by_service_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user