Initial commit
This commit is contained in:
34
database/factories/CtyFactory.php
Normal file
34
database/factories/CtyFactory.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?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',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user