style updates
This commit is contained in:
@@ -1,6 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\CloudDevOps\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
final class DeploymentRelease extends Model { protected $guarded = []; protected function casts(): array { return ['metadata' => 'array', 'started_at' => 'datetime', 'completed_at' => 'datetime']; } public function environment(): BelongsTo { return $this->belongsTo(DeploymentEnvironment::class, 'environment_id'); } public function steps(): HasMany { return $this->hasMany(DeploymentStep::class, 'release_id')->orderBy('position'); } }
|
||||
|
||||
final class DeploymentRelease extends Model
|
||||
{
|
||||
protected $guarded = [];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return ['metadata' => 'array', 'started_at' => 'datetime', 'completed_at' => 'datetime'];
|
||||
}
|
||||
|
||||
public function environment(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(DeploymentEnvironment::class, 'environment_id');
|
||||
}
|
||||
|
||||
public function steps(): HasMany
|
||||
{
|
||||
return $this->hasMany(DeploymentStep::class, 'release_id')->orderBy('position');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user