36 lines
1.0 KiB
PHP
36 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\Company;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
use Illuminate\Support\Str;
|
|
|
|
/**
|
|
* @extends Factory<\App\Models\Company>
|
|
*/
|
|
class CompanyFactory extends Factory
|
|
{
|
|
protected $model = Company::class;
|
|
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'name' => $this->faker->unique()->company() . ' ' . Str::upper(Str::random(3)),
|
|
'legal_name' => $this->faker->company() . ' AG',
|
|
'ticker' => Str::upper($this->faker->lexify('???')),
|
|
'sector' => $this->faker->randomElement(['Finance', 'Technology', 'Energy']),
|
|
'country' => $this->faker->randomElement(['DE', 'AT', 'CH']),
|
|
'headquarters' => $this->faker->city(),
|
|
'kyc_risk_level' => $this->faker->randomElement(['low', 'medium', 'high']),
|
|
'summary' => $this->faker->sentence(8),
|
|
];
|
|
}
|
|
|
|
public function highRisk(): static
|
|
{
|
|
return $this->state(fn () => ['kyc_risk_level' => 'high']);
|
|
}
|
|
}
|
|
|