add tests batch 20

This commit is contained in:
root
2026-06-09 01:03:53 -04:00
parent 95efb9652e
commit 6be4875c5e
1502 changed files with 13797 additions and 11313 deletions
+12 -11
View File
@@ -2,6 +2,7 @@
namespace App\Models;
use App\Models\BaseModel;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class ReimbursementBatchAdminFile extends BaseModel
@@ -23,10 +24,10 @@ class ReimbursementBatchAdminFile extends BaseModel
];
protected $casts = [
'batch_id' => 'integer',
'admin_id' => 'integer',
'uploaded_by' => 'integer',
'uploaded_at' => 'datetime',
'batch_id' => 'integer',
'admin_id' => 'integer',
'uploaded_by' => 'integer',
'uploaded_at' => 'datetime',
];
/* ============================================================
@@ -74,12 +75,12 @@ class ReimbursementBatchAdminFile extends BaseModel
public static function rules(bool $updating = false): array
{
return [
'batch_id' => [$updating ? 'sometimes' : 'required', 'integer', 'min:1', 'exists:reimbursement_batches,id'],
'admin_id' => [$updating ? 'sometimes' : 'required', 'integer', 'min:1', 'exists:admins,id'], // adjust table
'filename' => [$updating ? 'sometimes' : 'required', 'string', 'max:255'],
'original_filename' => ['nullable', 'string', 'max:255'],
'uploaded_at' => ['nullable', 'date'],
'uploaded_by' => ['nullable', 'integer'],
'batch_id' => [$updating ? 'sometimes' : 'required', 'integer', 'min:1', 'exists:reimbursement_batches,id'],
'admin_id' => [$updating ? 'sometimes' : 'required', 'integer', 'min:1', 'exists:admins,id'], // adjust table
'filename' => [$updating ? 'sometimes' : 'required', 'string', 'max:255'],
'original_filename' => ['nullable', 'string', 'max:255'],
'uploaded_at' => ['nullable', 'date'],
'uploaded_by' => ['nullable', 'integer'],
];
}
}
}