29 lines
717 B
PHP
29 lines
717 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Enums\SalaryAdjustmentType;
|
|
use App\Models\Payroll;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/**
|
|
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\PayrollAdjustment>
|
|
*/
|
|
class PayrollAdjustmentFactory extends Factory
|
|
{
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'payroll_id' => Payroll::factory(),
|
|
'type' => fake()->randomElement(SalaryAdjustmentType::cases()),
|
|
'description' => fake()->sentence(3),
|
|
'amount' => fake()->numberBetween(10000, 100000),
|
|
];
|
|
}
|
|
}
|