<?php

namespace Database\Factories;

use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;

use App\Models\PageRedirect;

/**
 * @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\PageRedirect>
 */
class PageRedirectFactory extends Factory
{
    /**
     * Define the model's default state.
     *
     * @return array<string, mixed>
     */
    public function definition(): array
    {
        return [
            'url_regex' => Str::random(12),
            'redirect' => '1', // this will be created by the page linker so can be a url (external) or mix of id and/or hash
            'sort_order' => PageRedirect::all()->count() + 1,
        ];
    }
}
