33 lines
759 B
PHP
33 lines
759 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
use Illuminate\Support\Str;
|
|
use App\Models\Caja;
|
|
use App\Models\MovimientoCaja;
|
|
|
|
class MovimientoCajaFactory extends Factory
|
|
{
|
|
/**
|
|
* The name of the factory's corresponding model.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $model = MovimientoCaja::class;
|
|
|
|
/**
|
|
* Define the model's default state.
|
|
*/
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'caja_id' => Caja::factory(),
|
|
'tipo' => fake()->randomElement(["Ingreso","Egreso"]),
|
|
'monto' => fake()->randomFloat(2, 0, 99999999.99),
|
|
'descripcion' => fake()->text(),
|
|
'fecha' => fake()->dateTime(),
|
|
];
|
|
}
|
|
}
|