<?php

namespace Database\Factories;

use App\Enums\ReminderStatus;
use App\Models\Business;
use App\Models\Customer;
use App\Models\ReminderLog;
use App\Models\ScheduledReminder;
use Illuminate\Database\Eloquent\Factories\Factory;

class ReminderLogFactory extends Factory
{
    protected $model = ReminderLog::class;

    public function definition(): array
    {
        return [
            'business_id' => Business::factory(),
            'scheduled_reminder_id' => ScheduledReminder::factory(),
            'customer_id' => Customer::factory(),
            'type' => 'appointment_reminder',
            'channel' => fake()->randomElement(['email', 'whatsapp']),
            'recipient' => fake()->safeEmail(),
            'message_preview' => 'Reminder preview',
            'status' => ReminderStatus::Sent->value,
            'sent_at' => now(),
        ];
    }
}
