30 lines
842 B
PHP
30 lines
842 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\Style;
|
|
use App\Models\AiModel;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
class StyleFactory extends Factory
|
|
{
|
|
protected $model = Style::class;
|
|
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'title' => $this->faker->words(3, true),
|
|
'prompt' => $this->faker->sentence(),
|
|
'description' => $this->faker->paragraph(),
|
|
'preview_image' => 'styles/preview.jpg',
|
|
'parameters' => json_encode([
|
|
'positive' => $this->faker->sentence(),
|
|
'negative' => $this->faker->sentence(),
|
|
'steps' => 30,
|
|
'cfg_scale' => 7.5
|
|
]),
|
|
'ai_model_id' => AiModel::factory(),
|
|
'enabled' => $this->faker->boolean(80),
|
|
];
|
|
}
|
|
} |