42 lines
848 B
PHP
42 lines
848 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class BookingFoto extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'booking_fotos';
|
|
protected $primaryKey = 'id_booking';
|
|
|
|
protected $fillable = [
|
|
'no_invoice',
|
|
'id_pelanggan',
|
|
'id_paket',
|
|
'tgl_booking',
|
|
'jam_mulai',
|
|
'jam_selesai',
|
|
'total_bayar',
|
|
'bukti_bayar',
|
|
'status_booking',
|
|
];
|
|
|
|
public function pelanggan()
|
|
{
|
|
return $this->belongsTo(Pelanggan::class, 'id_pelanggan');
|
|
}
|
|
|
|
public function paketFoto()
|
|
{
|
|
return $this->belongsTo(PaketFoto::class, 'id_paket');
|
|
}
|
|
|
|
public function detailAdditional()
|
|
{
|
|
return $this->hasMany(DetailAdditional::class, 'id_booking');
|
|
}
|
|
}
|