up
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Str;
|
||||
use App\Models\Cliente;
|
||||
use App\Models\Venta;
|
||||
|
||||
class VentaFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = Venta::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'fecha' => fake()->dateTime(),
|
||||
'cliente_id' => Cliente::factory(),
|
||||
'total' => fake()->randomFloat(2, 0, 99999999.99),
|
||||
'tipo_pago' => fake()->randomElement(["Efectivo","Tarjeta","Transferencia"]),
|
||||
'estado' => fake()->randomElement(["Pagado","Pendiente","Anulado"]),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user