All checks were successful
star-cloud-deploy-demo / deploy-demo (push) Successful in 36s
24 lines
759 B
PHP
24 lines
759 B
PHP
<?php
|
|
|
|
namespace Database\Factories\Machine;
|
|
|
|
use App\Models\Machine\Machine;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
class MachineFactory extends Factory
|
|
{
|
|
protected $model = Machine::class;
|
|
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'name' => 'Machine-' . $this->faker->unique()->numberBetween(100, 999),
|
|
'location' => $this->faker->address(),
|
|
'status' => $this->faker->randomElement(['online', 'offline', 'error']),
|
|
'temperature' => $this->faker->randomFloat(2, 2, 10),
|
|
'firmware_version' => 'v' . $this->faker->randomElement(['1.0.0', '1.1.2', '2.0.1']),
|
|
'last_heartbeat_at' => $this->faker->dateTimeBetween('-1 day', 'now'),
|
|
];
|
|
}
|
|
}
|