<?php

namespace Database\Factories;

use App\Models\Service;
use App\Models\Slide;
use Illuminate\Database\Eloquent\Factories\Factory;

class SlideFactory extends Factory
{
    protected $model = Slide::class;

    public function definition(): array
    {
        return [
            'type' => $this->faker->randomElement(['information', 'moderation', 'sermon']),
            'service_id' => Service::factory(),
            'original_filename' => $this->faker->word().'.jpg',
            'stored_filename' => 'slides/'.$this->faker->uuid().'.jpg',
            'thumbnail_filename' => $this->faker->uuid().'_thumb.jpg',
            'expire_date' => $this->faker->optional()->dateTimeBetween('now', '+12 months'),
            'uploader_name' => $this->faker->name(),
            'uploaded_at' => $this->faker->dateTimeBetween('-1 month', 'now'),
        ];
    }
}
