mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-07-11 01:24:46 +02:00
41 lines
1.0 KiB
PHP
41 lines
1.0 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Database\Factories\Admin;
|
|
|
|
use App\Enums\Http\Api\Filter\AllowedDateFormat;
|
|
use App\Models\Admin\FeaturedTheme;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/**
|
|
* Class FeaturedThemeFactory.
|
|
*
|
|
* @method FeaturedTheme createOne($attributes = [])
|
|
* @method FeaturedTheme makeOne($attributes = [])
|
|
*
|
|
* @extends Factory<FeaturedTheme>
|
|
*/
|
|
class FeaturedThemeFactory extends Factory
|
|
{
|
|
/**
|
|
* The name of the factory's corresponding model.
|
|
*
|
|
* @var class-string<FeaturedTheme>
|
|
*/
|
|
protected $model = FeaturedTheme::class;
|
|
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
FeaturedTheme::ATTRIBUTE_START_AT => fake()->dateTimeBetween()->format(AllowedDateFormat::YMDHISU->value),
|
|
FeaturedTheme::ATTRIBUTE_END_AT => fake()->dateTimeBetween('+1 day', '+1 year')->format(AllowedDateFormat::YMDHISU->value),
|
|
];
|
|
}
|
|
}
|