id(); $table->uuid()->unique(); $table->string('name'); $table->string('vendor')->nullable(); $table->string('model')->nullable(); $table->string('protocol')->nullable(); // mqtt | http | ble | … $table->json('config')->nullable(); // topic prefix / ip / auth ref $table->foreignId('room_id')->nullable()->constrained()->nullOnDelete(); $table->string('status')->default('active'); // discovered | active | ignored $table->timestamp('last_seen_at')->nullable(); $table->timestamps(); $table->index('status'); }); } public function down(): void { Schema::dropIfExists('devices'); } };