coolify/app/Models/ScheduledTaskExecution.php

26 lines
519 B
PHP
Raw Normal View History

2024-01-02 02:23:58 +00:00
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class ScheduledTaskExecution extends BaseModel
{
protected $guarded = [];
protected function casts(): array
{
return [
'started_at' => 'datetime',
'finished_at' => 'datetime',
'retry_count' => 'integer',
'duration' => 'decimal:2',
];
}
2024-01-02 02:23:58 +00:00
public function scheduledTask(): BelongsTo
{
return $this->belongsTo(ScheduledTask::class);
}
}