topnotch_website/database/factories/ServiceFileFactory.php

27 lines
866 B
PHP
Raw Normal View History

2024-09-09 15:29:31 -07:00
<?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',
2024-09-19 11:52:04 -07:00
'notes' => $this->faker->randomElement(['1) 1149 2) grey 3) white', '1) white', '1) black 2) white']),
2024-09-09 15:29:31 -07:00
];
}
}