<?php

namespace Database\Factories;

use App\Enums\PaymentStatus;
use App\Models\Business;
use App\Models\Customer;
use App\Models\Invoice;
use App\Models\Payment;
use Illuminate\Database\Eloquent\Factories\Factory;

class PaymentFactory extends Factory
{
    protected $model = Payment::class;

    public function definition(): array
    {
        return [
            'business_id' => Business::factory(),
            'invoice_id' => Invoice::factory(),
            'customer_id' => Customer::factory(),
            'amount' => fake()->numberBetween(25, 250),
            'currency' => 'USD',
            'method' => fake()->randomElement(['cash', 'stripe', 'bank_transfer']),
            'status' => PaymentStatus::Paid->value,
            'transaction_id' => 'pay_'.fake()->unique()->uuid(),
            'paid_at' => now(),
        ];
    }
}
