<?php

namespace Database\Factories;

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

class ServiceFileFactory extends Factory
{
    protected $model = ServiceFile::class;

    public function definition(): array
    {
        return [
            'created_at' => Carbon::now(),
            'updated_at' => Carbon::now(),
            'code' => $this->faker->randomElement(['A', 'B']).$this->faker->randomNumber(4, true),
            'name' => $this->faker->word(),
            'width' => round($this->faker->randomFloat(2, 0, 10), 1),
            'height' => round($this->faker->randomFloat(2, 0, 10), 1),
            'unit' => 'inch',
        ];
    }
}