This commit is contained in:
Saufi
2026-06-24 18:30:00 +08:00
commit c0c3d7c09c
122 changed files with 16321 additions and 0 deletions

32
app/Models/ImportLog.php Normal file
View 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');
}
}