<?php

namespace Database\Factories;

use App\Models\Customer;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Carbon;

class CustomerFactory extends Factory
{
    protected $model = Customer::class;

    public function definition()
    {
        $company_name  = $this->faker->company();
        $internal_name = explode(',', $company_name);
        $address       = $this->faker->address();

        return [
            'company_name'     => $company_name,
            'internal_name'    => strtolower($internal_name[0]),
            'shipping_address' => $address,
            'billing_address'  => $address,
            'phone'            => $this->faker->phoneNumber(),
            'created_at'       => Carbon::now(),
            'updated_at'       => Carbon::now(),
        ];
    }
}