<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;

class PerpanjanganBooking extends Model
{
    use HasFactory;

    protected $table = 'perpanjangan_booking';

     // Nonaktifkan pengelolaan timestamps
     public $timestamps = false;

    protected $fillable = [
        'id_booking',
        'tanggal_checkout_lama',
        'tanggal_checkout_baru',
        'durasi_bulan',
        'metode_pembayaran',
        'bukti_pembayaran',
        'total_biaya',
        'tanggal_pengajuan',
        'status',
    ];

    protected $dates = [
        'tanggal_pengajuan',
        'tanggal_checkout_lama',
        'tanggal_checkout_baru',
    ];

    // Relasi ke Booking
    public function booking()
    {
        return $this->belongsTo(Booking::class, 'id_booking');
    }
}
