<?php

namespace Database\Factories;

use App\Models\CashAccount;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;

class CashTransactionFactory extends Factory
{
    public function definition(): array
    {
        return [
            'cash_account_id' => CashAccount::factory(),
            'created_by_id' => User::factory(),
            'amount' => fake()->numberBetween(1000, 1000000),
            'balance_after' => fake()->numberBetween(1000, 10000000),
            'type' => fake()->randomElement(['deposit', 'withdrawal', 'expense', 'transfer']),
            'description' => fake()->sentence(),
        ];
    }
}
