Add Frontdesk-style Devices registry for POS hardware.
Deploy Ladill POS / deploy (push) Successful in 42s
Deploy Ladill POS / deploy (push) Successful in 42s
Register tills, customer displays, kitchen screens, printers, scanners, and tablets per branch. Customer displays share the branch display token and mark online when the public screen polls; stale devices go offline on a schedule.
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
<?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('pos_devices', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('owner_ref', 64)->index();
|
||||
$table->foreignId('location_id')->nullable()->constrained('pos_locations')->nullOnDelete();
|
||||
$table->string('name');
|
||||
$table->string('type', 40)->index();
|
||||
$table->string('status', 20)->default('offline')->index();
|
||||
$table->string('device_token', 64)->nullable()->unique();
|
||||
$table->json('config')->nullable();
|
||||
$table->timestamp('last_online_at')->nullable();
|
||||
$table->timestamps();
|
||||
|
||||
$table->index(['owner_ref', 'type']);
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('pos_devices');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user