$this->faker->name(), 'code' => Employee::generateEmployeeCode(), 'phone_number' => fake()->randomElement([ fake()->numerify('0812 #### ###'), fake()->numerify('0812 #### ####'), fake()->numerify('0812 #### #####'), ]), 'base_salary' => $this->faker->randomNumber(6), 'address' => $this->faker->address(), 'birthdate' => $this->faker->dateTimeBetween('-60 years', '-18 years')->format('Y-m-d'), 'hire_date' => $this->faker->date(), 'resign_date' => $this->faker->optional()->date(), ]; } public function male(): Factory { return $this->state(function (array $attributes) { return [ 'gender' => Gender::MALE, ]; }); } public function female(): Factory { return $this->state(function (array $attributes) { return [ 'gender' => Gender::FEMALE, ]; }); } public function permanent(): Factory { return $this->state(function (array $attributes) { return [ 'status' => EmploymentStatus::PERMANENT, ]; }); } public function contract(): Factory { return $this->state(function (array $attributes) { return [ 'status' => EmploymentStatus::CONTRACT, ]; }); } public function intern(): Factory { return $this->state(function (array $attributes) { return [ 'status' => EmploymentStatus::INTERN, ]; }); } }