coolify/app/Models/ApplicationDeploymentQueue.php

25 lines
552 B
PHP
Raw Normal View History

2023-05-24 14:26:50 +02:00
<?php
namespace App\Models;
use Illuminate\Contracts\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Spatie\SchemalessAttributes\Casts\SchemalessAttributes;
class ApplicationDeploymentQueue extends Model
{
protected $fillable = [
'application_id',
'status',
2023-05-30 09:52:58 +02:00
'extra_attributes',
2023-05-24 14:26:50 +02:00
];
public $casts = [
2023-05-30 09:52:58 +02:00
'extra_attributes' => SchemalessAttributes::class,
2023-05-24 14:26:50 +02:00
];
public function scopeWithExtraAttributes(): Builder
{
2023-05-30 09:52:58 +02:00
return $this->extra_attributes->modelScope();
2023-05-24 14:26:50 +02:00
}
}