ldc-startcoq/database/factories/PromoDistributionNetworkFactory.php

34 lines
752 B
PHP
Raw Permalink Normal View History

2023-02-23 16:23:00 +01:00
<?php
namespace Database\Factories;
2023-06-21 10:24:56 +00:00
use App\Enums\Promotions\DistributionNetworkEnum;
2023-02-23 16:23:00 +01:00
use App\Models\PromoDistributionNetwork;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends Factory<\App\Models\PromoDistributionNetwork>
*/
final class PromoDistributionNetworkFactory extends Factory
{
/**
2023-06-21 10:24:56 +00:00
* The name of the factory's corresponding model.
*
* @var string
*/
2023-02-23 16:23:00 +01:00
protected $model = PromoDistributionNetwork::class;
/**
2023-06-21 10:24:56 +00:00
* Define the model's default state.
*
* @return array
*/
2023-02-23 16:23:00 +01:00
public function definition(): array
{
return [
2023-06-21 10:24:56 +00:00
'name' => \collect(DistributionNetworkEnum::toArray())->random()->value,
2023-02-23 16:23:00 +01:00
'label' => fake()->word,
];
}
}