Payroll::factory(), 'type' => $this->faker->randomElement(SalaryAdjustmentType::cases()), 'description' => $this->faker->sentence(4), 'amount' => $this->faker->numberBetween(50000, 500000), ]; } public function deduction(): Factory { return $this->state(fn () => ['type' => SalaryAdjustmentType::DEDUCTION]); } public function bonus(): Factory { return $this->state(fn () => ['type' => SalaryAdjustmentType::BONUS]); } }