<?php

namespace Database\Factories;

use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
use App\Models\Producto;

class ProductoFactory extends Factory
{
    /**
     * The name of the factory's corresponding model.
     *
     * @var string
     */
    protected $model = Producto::class;

    /**
     * Define the model's default state.
     */
    public function definition(): array
    {
        return [
            'nombre' => fake()->regexify('[A-Za-z0-9]{100}'),
            'descripcion' => fake()->text(),
            'codigo_barras' => fake()->regexify('[A-Za-z0-9]{50}'),
            'precio_compra' => fake()->word(),
            'precio_venta' => fake()->word(),
            'stock' => fake()->numberBetween(-10000, 10000),
            'categoria_id' => fake()->word(),
            'estado' => fake()->boolean(),
        ];
    }
}
