<?php

namespace App\Models;

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

class Pelanggan extends Model
{
    use HasFactory;

    protected $table = 'pelanggans';
    protected $primaryKey = 'id_pelanggan';

    protected $fillable = [
        'nama',
        'no_wa',
    ];

    // Relasi
    public function transaksiBuket()
    {
        return $this->hasMany(TransaksiBuket::class, 'id_pelanggan');
    }

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