feat: add Snipe-IT asset synchronization
This commit is contained in:
45
app/Domain/Inventory/Models/SyncRun.php
Normal file
45
app/Domain/Inventory/Models/SyncRun.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?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,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user