IMEI device API: telemetry, commands, receipts + migrations and routing

This commit is contained in:
2025-09-02 18:29:27 +10:00
parent e0bb2ea67c
commit 0868b04298
9 changed files with 204 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration {
public function up(): void
{
Schema::create('devices', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('user_id')->nullable()->index();
$table->string('name')->nullable();
$table->string('imei', 32)->unique();
$table->boolean('is_active')->default(true);
$table->timestamp('last_seen_at')->nullable()->index();
$table->string('last_ip')->nullable();
$table->string('firmware_version')->nullable();
$table->string('hardware_version')->nullable();
$table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('devices');
}
};