36 lines
828 B
PHP
36 lines
828 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Transaksi extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'transaksi'; // Nama tabel
|
|
protected $primaryKey = 'id_transaksi'; // Primary key
|
|
public $incrementing = true; // Auto-increment aktif
|
|
protected $keyType = 'int'; // Tipe primary key
|
|
|
|
protected $fillable = [
|
|
'id_booking',
|
|
'jumlah_pembayaran',
|
|
'metode_pembayaran',
|
|
'status_transaksi',
|
|
'bukti_pembayaran',
|
|
'tanggal_pembayaran'
|
|
];
|
|
|
|
public $timestamps = false; // Tidak menggunakan timestamps otomatis
|
|
|
|
/**
|
|
* Relasi ke tabel Booking.
|
|
*/
|
|
public function booking()
|
|
{
|
|
return $this->belongsTo(Booking::class, 'id_booking');
|
|
}
|
|
}
|