2026-06-14 21:32:07 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
namespace Database\Factories;
|
|
|
|
|
|
|
|
|
|
use App\Models\Shop;
|
|
|
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
2026-11-17 12:15:34 +01:00
|
|
|
use Shared\Helpers\UuidHelper;
|
2026-06-14 21:32:07 +02:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @extends Factory<Shop>
|
|
|
|
|
*/
|
|
|
|
|
class ShopFactory extends Factory
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* The name of the factory's corresponding model.
|
|
|
|
|
*
|
|
|
|
|
* @var string
|
|
|
|
|
*/
|
|
|
|
|
protected $model = Shop::class;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Define the model's default state.
|
|
|
|
|
*
|
|
|
|
|
* @return array<string, mixed>
|
|
|
|
|
*/
|
|
|
|
|
public function definition(): array
|
|
|
|
|
{
|
|
|
|
|
return [
|
2026-11-17 12:15:34 +01:00
|
|
|
'id' => (string) UuidHelper::v7(),
|
2026-06-14 21:32:07 +02:00
|
|
|
'name' => fake()->company(),
|
|
|
|
|
'address' => fake()->streetAddress(),
|
|
|
|
|
'postcode' => fake()->postcode(),
|
|
|
|
|
'city' => fake()->city(),
|
|
|
|
|
'phone' => fake()->phoneNumber(),
|
|
|
|
|
|
|
|
|
|
'latitude' => (string) fake()->latitude(),
|
|
|
|
|
'longitude' => (string) fake()->longitude(),
|
|
|
|
|
|
|
|
|
|
'default' => false,
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
}
|