mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-07-27 17:24:42 +02:00
* feat: initial commit for feature management * style: fix StyleCI findings * fix(api): prohibit features of nonnull scope from API & fix(admin): wrong translate key * style: fix Static Analysis error
42 lines
900 B
PHP
42 lines
900 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Database\Factories\Admin;
|
|
|
|
use App\Constants\FeatureConstants;
|
|
use App\Models\Admin\Feature;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/**
|
|
* Class FeatureFactory.
|
|
*
|
|
* @method Feature createOne($attributes = [])
|
|
* @method Feature makeOne($attributes = [])
|
|
*
|
|
* @extends Factory<Feature>
|
|
*/
|
|
class FeatureFactory extends Factory
|
|
{
|
|
/**
|
|
* The name of the factory's corresponding model.
|
|
*
|
|
* @var class-string<Feature>
|
|
*/
|
|
protected $model = Feature::class;
|
|
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array
|
|
*/
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
Feature::ATTRIBUTE_NAME => fake()->unique()->word(),
|
|
Feature::ATTRIBUTE_SCOPE => FeatureConstants::NULL_SCOPE,
|
|
Feature::ATTRIBUTE_VALUE => fake()->boolean(),
|
|
];
|
|
}
|
|
}
|