<?php

namespace App\Packages\Cron\Models;

use App\Packages\Core\Traits\RepositoryTrait;
use App\Packages\Cron\Repository\CronLogRepository;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;

/**
 * Class CronLog
 * @package App\Packages\Cron\Models
 *
 * @property int $id
 * @property string $command
 * @property string $expression
 * @property Carbon $next_execution
 * @property Carbon $start_at
 * @property Carbon $end_at
 * @property float $start_execution
 * @property float $end_execution
 * @property int $execution_time
 *
 * @property Carbon $created_at
 * @property Carbon $updated_at
 *
 * @method static CronLogRepository repository()
 */
class CronLog extends Model {

    use RepositoryTrait;

    /** @var string */
    protected $table = 'cron_log';

    /**
     * @var array
     */
    protected $dates = [
        'start_at',
        'end_at',
        'next_execution',
        'created_at',
        'updated_at',
    ];

    /** @var string */
    public static $repositoryClass = CronLogRepository::class;

}