<?php

namespace Database\Factories;

use Illuminate\Database\Eloquent\Factories\Factory;

/**
 * @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Currency>
 */
class CurrencyFactory extends Factory
{
    public function definition(): array
    {
        return [
            'code' => fake()->unique()->currencyCode(),
            'name' => fake()->word(),
            'prefix' => '',
            'suffix' => '',
            'rate' => 1.00,
            'status' => true,
            'is_default' => false,
        ];
    }

    public function trl(): static
    {
        return $this->state([
            'code' => 'TRY',
            'name' => 'Türk Lirası',
            'prefix' => '₺',
            'rate' => 1.00,
            'is_default' => true,
        ]);
    }

    public function usd(): static
    {
        return $this->state([
            'code' => 'USD',
            'name' => 'US Dollar',
            'prefix' => '$',
            'rate' => 0.03,
        ]);
    }
}
