<?php

namespace App\Models;

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

class DetailAdditional extends Model
{
    use HasFactory;

    protected $table = 'detail_additionals';
    protected $primaryKey = 'id_detail_additional';

    protected $fillable = [
        'id_booking',
        'id_additional',
        'qty',
        'subtotal',
    ];

    public function bookingFoto()
    {
        return $this->belongsTo(BookingFoto::class, 'id_booking');
    }

    public function additional()
    {
        return $this->belongsTo(Additional::class, 'id_additional');
    }
}
