24 lines
653 B
PHP
24 lines
653 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\Employee;
|
|
use App\Models\User;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
class EmployeeAdvanceFactory extends Factory
|
|
{
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'employee_id' => Employee::factory(),
|
|
'paid_by_id' => User::factory(),
|
|
'amount' => fake()->numberBetween(50000, 1000000),
|
|
'paid_amount' => 0,
|
|
'description' => fake()->sentence(),
|
|
'due_date' => fake()->date(),
|
|
'status' => fake()->randomElement(['pending', 'disbursed', 'partial', 'repaid', 'rejected']),
|
|
];
|
|
}
|
|
}
|