*/ class ReportPeriodFactory extends Factory { protected $model = ReportPeriod::class; /** * Define the model's default state. * * @return array */ public function definition(): array { return [ 'team_id' => Team::factory(), 'year' => 2026, 'month' => fake()->numberBetween(1, 12), 'status' => ReportPeriodStatus::Draft, ]; } /** * Indicate that the period is approved. */ public function approved(): static { return $this->state(fn (array $attributes) => [ 'status' => ReportPeriodStatus::Approved, ]); } }