<?php

namespace Database\Factories;

use App\Models\ProductVariant;
use App\Models\Restock;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;

class RestockItemFactory extends Factory
{
    public function definition(): array
    {
        $quantity = fake()->numberBetween(1, 200);
        $unitPrice = fake()->numberBetween(1000, 50000);

        return [
            'restock_id' => Restock::factory(),
            'user_id' => User::factory(),
            'product_variant_id' => ProductVariant::factory(),
            'quantity' => $quantity,
            'unit_price' => $unitPrice,
            'subtotal' => $quantity * $unitPrice,
        ];
    }
}
