<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Doctor extends Model
{
    protected $fillable = ['name', 'specialization', 'bio', 'photo', 'clinic_id'];

    public function clinic()
    {
        return $this->belongsTo(Clinic::class);
    }

    public function services()
    {
        return $this->belongsToMany(Service::class);
    }

    public function holidays()
    {
        return $this->hasMany(DoctorHoliday::class);
    }

    public function recurringHolidays()
    {
        return $this->hasMany(DoctorRecurringHoliday::class);
    }

    public function appointments()
    {
        return $this->hasMany(Appointment::class);
    }
}
