<?php

namespace Database\Factories;

use App\Models\ProductVariant;
use App\Models\StokOpname;
use Illuminate\Database\Eloquent\Factories\Factory;

class StokOpnameItemFactory extends Factory
{
    public function definition(): array
    {
        $system = fake()->numberBetween(0, 500);
        $physical = fake()->numberBetween(0, 500);

        return [
            'stok_opname_id' => StokOpname::factory(),
            'product_variant_id' => ProductVariant::factory(),
            'stock_quality' => 'good',
            'system_stock' => $system,
            'physical_stock' => $physical,
            'difference' => $physical - $system,
            'notes' => fake()->sentence(),
        ];
    }
}
