33 lines
752 B
PHP
33 lines
752 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Enums\Promotions\DistributionNetworkEnum;
|
|
use App\Models\PromoDistributionNetwork;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/**
|
|
* @extends Factory<\App\Models\PromoDistributionNetwork>
|
|
*/
|
|
final class PromoDistributionNetworkFactory extends Factory
|
|
{
|
|
/**
|
|
* The name of the factory's corresponding model.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $model = PromoDistributionNetwork::class;
|
|
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array
|
|
*/
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'name' => \collect(DistributionNetworkEnum::toArray())->random()->value,
|
|
'label' => fake()->word,
|
|
];
|
|
}
|
|
}
|