1<?php
2
3namespace Database\Factories;
4
5use App\Models\Component;
6use Illuminate\Database\Eloquent\Factories\Factory;
7
8class ComponentFactory extends Factory
9{
10    /**
11     * The name of the factory's corresponding model.
12     *
13     * @var string
14     */
15    protected $model = Component::class;
16
17    /**
18     * Define the model's default state.
19     *
20     * @return array
21     */
22    public function definition()
23    {
24        return [
25            'device_id' => $this->faker->randomDigit,
26            'type' => $this->faker->regexify('[A-Za-z0-9]{4,20}'),
27        ];
28    }
29}
30