<?php

namespace Database\Factories;

use App\Models\MaintenanceUnit;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;

/**
 * @extends Factory<MaintenanceUnit>
 */
class MaintenanceUnitFactory extends Factory
{
    /**
     * Define the model's default state.
     *
     * @return array<string, mixed>
     */
    public function definition(): array
    {
        return [
            'project_id'   => null,
            'project_code' => null,
            'mnt_num'      => 'MNT-' . fake()->unique()->numberBetween(10000, 99999),
            'mnt_code'     => Str::upper(fake()->unique()->bothify('MNT-####')),
            'mnt_date'     => fake()->date(),
            'unit_id'      => null,
            'unit_code'    => null,
            'description'  => fake()->text(200),
        ];
    }
}
