feat: 實作機台日誌核心功能與 IoT 高併發處理架構
All checks were successful
star-cloud-deploy-demo / deploy-demo (push) Successful in 36s

This commit is contained in:
2026-03-09 09:43:51 +08:00
parent 21e064ff91
commit c30c3a399d
53 changed files with 2300 additions and 2130 deletions

View File

@@ -0,0 +1,23 @@
<?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'),
];
}
}