<?php

namespace Database\Factories;

use App\Models\StockOpname;
use App\Models\StockOpnameItem;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;

class StockOpnameItemFactory extends Factory
{
    protected $model = StockOpnameItem::class;

    public function definition(): array
    {
        $qtySystem = $this->faker->numberBetween(0, 200);
        $qtyPhysical = $this->faker->optional()->numberBetween(0, 200);

        return [
            'stock_opname_id' => StockOpname::factory(),
            'user_id' => User::factory(),
            'itemable_type' => null,
            'itemable_id' => null,
            'qty_system' => $qtySystem,
            'qty_physical' => $qtyPhysical,
        ];
    }
}
