46 lines
1.0 KiB
PHP
46 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Domain\Inventory\Models;
|
|
|
|
use App\Domain\Inventory\Enums\SyncRunStatus;
|
|
use Carbon\CarbonImmutable;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* @property int $id
|
|
* @property string $type
|
|
* @property CarbonImmutable $started_at
|
|
* @property CarbonImmutable|null $finished_at
|
|
* @property SyncRunStatus $status
|
|
* @property int $records_processed
|
|
* @property int $records_created
|
|
* @property int $records_updated
|
|
* @property int $records_disabled
|
|
* @property string|null $error_message
|
|
*/
|
|
class SyncRun extends Model
|
|
{
|
|
public $timestamps = false;
|
|
|
|
protected $fillable = [
|
|
'type',
|
|
'started_at',
|
|
'finished_at',
|
|
'status',
|
|
'records_processed',
|
|
'records_created',
|
|
'records_updated',
|
|
'records_disabled',
|
|
'error_message',
|
|
];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'started_at' => 'datetime',
|
|
'finished_at' => 'datetime',
|
|
'status' => SyncRunStatus::class,
|
|
];
|
|
}
|
|
}
|