first
This commit is contained in:
32
app/Models/ImportLog.php
Normal file
32
app/Models/ImportLog.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class ImportLog extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'type',
|
||||
'filename',
|
||||
'total_rows',
|
||||
'success_count',
|
||||
'duplicate_count',
|
||||
'failed_count',
|
||||
'errors',
|
||||
'imported_by',
|
||||
];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'errors' => 'array',
|
||||
];
|
||||
}
|
||||
|
||||
public function importedBy(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class, 'imported_by');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user