2024-11-29 12:39:20 -05:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Database\Factories;
|
|
|
|
|
|
|
|
use App\Models\Customer;
|
|
|
|
use App\Models\InvoiceReport;
|
|
|
|
use Carbon\Carbon;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
|
|
|
|
class InvoiceReportFactory extends Factory
|
|
|
|
{
|
|
|
|
protected $model = InvoiceReport::class;
|
|
|
|
|
|
|
|
public function definition(): array
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
'customer_id' => Customer::all()->shuffle()->first()->id,
|
|
|
|
'date_start' => Carbon::now()->subYear(),
|
|
|
|
'date_end' => Carbon::now(),
|
2024-12-10 15:28:14 -08:00
|
|
|
'filter_paid' => $this->faker->boolean(40),
|
|
|
|
'created_at' => Carbon::now(),
|
|
|
|
'updated_at' => Carbon::now(),
|
2024-11-29 12:39:20 -05:00
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|