35 lines
1.1 KiB
PHP
35 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\Cty;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/**
|
|
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Cty>
|
|
*/
|
|
class CtyFactory extends Factory
|
|
{
|
|
protected $model = Cty::class;
|
|
|
|
public function definition(): array
|
|
{
|
|
$prefix = strtoupper($this->faker->unique()->bothify('T??'));
|
|
|
|
return [
|
|
'country_name' => $this->faker->country(),
|
|
'dxcc' => $this->faker->numberBetween(1, 400),
|
|
'cq_zone' => $this->faker->numberBetween(1, 40),
|
|
'itu_zone' => $this->faker->numberBetween(1, 90),
|
|
'continent' => $this->faker->randomElement(['EU', 'AS', 'AF', 'NA', 'SA', 'OC', 'AN']),
|
|
'latitude' => $this->faker->latitude(),
|
|
'longitude' => $this->faker->longitude(),
|
|
'time_offset' => $this->faker->randomFloat(2, -12, 12),
|
|
'prefix' => $prefix,
|
|
'prefix_norm' => $prefix,
|
|
'precise' => $this->faker->boolean(),
|
|
'source' => 'test',
|
|
];
|
|
}
|
|
}
|