Files
pos_heidiver/database/factories/DetalleVentaFactory.php
T
2026-01-06 15:35:59 -05:00

34 lines
816 B
PHP

<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
use App\Models\DetalleVenta;
use App\Models\Producto;
use App\Models\Venta;
class DetalleVentaFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = DetalleVenta::class;
/**
* Define the model's default state.
*/
public function definition(): array
{
return [
'venta_id' => Venta::factory(),
'producto_id' => Producto::factory(),
'cantidad' => fake()->numberBetween(-10000, 10000),
'precio_unitario' => fake()->randomFloat(2, 0, 99999999.99),
'subtotal' => fake()->randomFloat(2, 0, 99999999.99),
];
}
}