Rapihin setup/member/lot-parking + fitur intercom, exclude WIP controller & file sampah dari git
Kumpulan perubahan yang udah numpuk di working tree: refactor Setup (Gate/Vehicle/Member), rapihin memberin & stiker, service parking baru (ParkingUtilsServices, NetworkService), model/migration lot-parking & DHCP reservation, dan fitur baru Intercom (controller/model/migration/ view). ReportTransaksiController versi lokal ini WIP (~90%, masih didebug) - versi yang bener ada di server, jadi dikeluarin dari git (ditambahin ke .gitignore) biar gak numpuk nindihin punya server pas git pull di sana. Sekalian keluarin dump mentah tabel softseting (1.8MB, nyasar ke-commit), file .bak, dan arsip ad-hoc (api.tgz, c.zip) yang emang bukan source code. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01EAJc2mrpj2cSTe4oowLPzQ
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create("config_pos_network", function (Blueprint $table) {
|
||||
$table->string("id_pos");
|
||||
$table->string("hostname", 100);
|
||||
$table->string("mac_address", 17)->unique();
|
||||
$table->string("ip_address")->unique();
|
||||
$table->boolean("enabled")->default(true);
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists("dhcp_reservations");
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create("lot_parking_log", function (Blueprint $table) {
|
||||
$table->uuid();
|
||||
$table->string("area", 8);
|
||||
$table->string("lot_number", 8);
|
||||
$table->smallInteger("status");
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists("lot_parking_log");
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('sessions', function (Blueprint $table) {
|
||||
$table->string('id')->primary();
|
||||
$table->foreignId('user_id')->nullable()->index();
|
||||
$table->string('ip_address', 45)->nullable();
|
||||
$table->text('user_agent')->nullable();
|
||||
$table->longText('payload');
|
||||
$table->integer('last_activity')->index();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('sessions');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
public function up()
|
||||
{
|
||||
// Daftar unit: 1-5 client + 1 admin/pusat. Mirip master gate di parkir.
|
||||
Schema::create('intercom_devices', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('device_id', 20)->unique(); // "C1".."C5", "ADMIN"
|
||||
$table->string('nama', 100)->nullable(); // "Pos Pintu 1", "Pusat"
|
||||
$table->string('mac_address', 17)->nullable()->unique();
|
||||
$table->string('ip_address', 45)->nullable();
|
||||
$table->integer('udp_port')->nullable(); // 5001..5005, ADMIN 5000
|
||||
$table->string('status', 20)->default('offline'); // offline|idle|calling|busy|active
|
||||
$table->timestamp('last_seen_at')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
// Log tiap sesi private Pusat<->Client. Mirip transaksi_parkir tapi versi suara.
|
||||
Schema::create('intercom_calls', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('device_id', 20)->index();
|
||||
$table->string('arah', 20)->default('in'); // in: client->pusat, out: pusat->client
|
||||
$table->string('status', 20)->default('waiting'); // waiting|active|ended|missed|cancelled
|
||||
$table->timestamp('requested_at')->nullable();
|
||||
$table->timestamp('started_at')->nullable();
|
||||
$table->timestamp('ended_at')->nullable();
|
||||
$table->integer('durasi_detik')->default(0);
|
||||
$table->string('recording_path', 255)->nullable(); // storage/app/intercom/xxx.wav
|
||||
$table->string('ended_by', 20)->nullable(); // client|admin|timeout
|
||||
$table->timestamps();
|
||||
|
||||
$table->index(['device_id', 'status']);
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('intercom_calls');
|
||||
Schema::dropIfExists('intercom_devices');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user