*/ class CompanyFactory extends Factory { protected $model = Company::class; /** * Define the model's default state. * * @return array */ public function definition(): array { return [ 'user_id' => User::factory(), 'name' => $this->faker->company(), 'email' => $this->faker->unique()->companyEmail(), 'address' => $this->faker->address(), 'director_name' => $this->faker->name(), 'director_nik' => $this->faker->numerify('################'), 'deed_incorporation' => $this->faker->numerify('AHU-#######.AH.##.##'), 'trade_license' => $this->faker->numerify('###/###/SIUP/####'), 'tax_id_number' => $this->faker->numerify('##.###.###.#-###.###'), 'taxable_enterprise' => $this->faker->numerify('###.###.###.###'), 'annual_tax_return' => $this->faker->numerify('SPT-####-########'), 'domicile_certificate' => $this->faker->numerify('###/###/DOMISILI/####'), 'profile' => $this->faker->numerify('PROFILE-####-########'), 'profile' => $this->faker->numerify('PROFILE-####-########'), 'status' => VerificationStatus::PENDING, ]; } /** * Indicate that the company is validated. */ public function validated(): static { return $this->state(fn (array $attributes) => [ 'status' => VerificationStatus::APPROVED, ]); } /** * Indicate that the company is rejected. */ public function rejected(): static { return $this->state(fn (array $attributes) => [ 'status' => VerificationStatus::REJECTED, ]); } /** * Indicate that the company is pending validation. */ public function pending(): static { return $this->state(fn (array $attributes) => [ 'status' => VerificationStatus::PENDING, ]); } }