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
56 lines
1.2 KiB
PHP
56 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Models\StikerTrans;
|
|
use App\Models\VehicleItem;
|
|
use App\Models\MasterTarifStiker;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Support\Facades\DB;
|
|
|
|
class StikerTransDetail extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = "detail_transaksi_stiker";
|
|
|
|
protected $fillable = [
|
|
"notrans",
|
|
"nopol",
|
|
"jenis_mobil",
|
|
"adm",
|
|
"kategori",
|
|
"jenis_member",
|
|
"akses",
|
|
"akses_out",
|
|
"status",
|
|
"merk",
|
|
"tipe",
|
|
"tahun",
|
|
"warna",
|
|
"keterangan",
|
|
];
|
|
|
|
public function stiker_details()
|
|
{
|
|
return $this->belongsTo(StikerTrans::class, "notrans", "notrans");
|
|
}
|
|
|
|
public function tarifStiker()
|
|
{
|
|
return $this->hasOne(MasterTarifStiker::class, "jenis_member", "jenis_langganan");
|
|
}
|
|
|
|
// Relasi ke tabel jenis_mobil
|
|
public function vehicle()
|
|
{
|
|
return $this->belongsTo(VehicleItem::class, "jenis_mobil", "id");
|
|
}
|
|
|
|
public function details()
|
|
{
|
|
return $this->with(["vehicle:id, nama", "tarifStiker:jenis_langganan,tarif"]);
|
|
}
|
|
}
|