<?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(),
            'with_unpaid'         => $this->faker->boolean(40),
            'with_partially_paid' => $this->faker->boolean(40),
            'with_paid'           => $this->faker->boolean(40),
            'with_void'           => $this->faker->boolean(40),
            'created_at'          => Carbon::now(),
            'updated_at'          => Carbon::now(),
        ];
    }
}