<?php

namespace Database\Factories;

use App\Models\SubscriptionPlan;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;

/** @extends Factory<SubscriptionPlan> */
class SubscriptionPlanFactory extends Factory
{
    protected $model = SubscriptionPlan::class;

    public function definition(): array
    {
        $name = fake()->unique()->word();

        return [
            'uuid' => (string) Str::uuid(),
            'plan_name' => Str::title($name),
            'plan_code' => Str::upper(Str::slug($name, '_')),
            'description' => fake()->sentence(),
            'plan_type' => 'standard',
            'duration_days' => 30,
            'price' => fake()->randomFloat(2, 99, 9999),
            'wallet_bonus' => 0,
            'max_devices' => 2,
            'live_tracking' => true,
            'theft_protection' => true,
            'currency' => 'INR',
            'status' => 'active',
            'sort_order' => 10,
        ];
    }
}
