IMEI device API: telemetry, commands, receipts + migrations and routing
This commit is contained in:
@@ -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');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user