Files
laravel_swoole/app/Models/System/Task.php
2026-02-19 10:39:38 +08:00

44 lines
950 B
PHP

<?php
namespace App\Models\System;
use App\Traits\ModelTrait;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class Task extends Model
{
use ModelTrait, SoftDeletes;
protected $table = 'system_task';
protected $fillable = [
'name',
'command',
'description',
'type',
'expression',
'timezone',
'is_active',
'run_in_background',
'without_overlapping',
'only_one',
'last_run_at',
'next_run_at',
'last_output',
'run_count',
'failed_count',
];
protected $casts = [
'is_active' => 'boolean',
'run_in_background' => 'boolean',
'without_overlapping' => 'boolean',
'only_one' => 'boolean',
'last_run_at' => 'datetime',
'next_run_at' => 'datetime',
'run_count' => 'integer',
'failed_count' => 'integer',
];
}