base commit

This commit is contained in:
Mekan1206
2026-07-30 17:24:40 +05:00
commit a794dacd39
345 changed files with 29597 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
<?php
declare(strict_types=1);
namespace Database\Factories;
use App\Models\Employee;
use App\Models\SickLeave;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends Factory<SickLeave>
*/
class SickLeaveFactory extends Factory
{
protected $model = SickLeave::class;
/**
* @return array<string, mixed>
*/
public function definition(): array
{
$startDate = fake()->dateTimeBetween('-3 months', 'now');
$days = fake()->numberBetween(1, 10);
$endDate = (clone $startDate)->modify("+{$days} days");
return [
'employee_id' => Employee::factory(),
'start_date' => $startDate,
'end_date' => $endDate,
'days' => $days,
'medical_institution' => fake()->optional()->company().' Hospital',
'reason' => fake()->optional()->sentence(),
'document_path' => null,
];
}
}