vito/app/Models/ScriptExecution.php
Saeed Vaziry 5c72f12490 init
2023-07-02 12:47:50 +02:00

43 lines
827 B
PHP

<?php
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
* @property int $script_id
* @property int $server_id
* @property string $user
* @property Carbon $finished_at
* @property ?Server $server
* @property Script $script
*/
class ScriptExecution extends AbstractModel
{
use HasFactory;
protected $fillable = [
'script_id',
'server_id',
'user',
'finished_at',
];
protected $casts = [
'script_id' => 'integer',
'server_id' => 'integer',
];
public function script(): BelongsTo
{
return $this->belongsTo(Script::class);
}
public function server(): BelongsTo
{
return $this->belongsTo(Server::class);
}
}