<?php

namespace App\Models;

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

class PractitionerRoleAvailability extends Model
{
    use HasFactory;

    protected $fillable = [
        'practitioner_role_id',
        'all_day',
        'start_time',
        'end_time',
    ];

    public function days()
    {
        return $this->hasMany(PractitionerRoleAvailabilityDay::class, 'availability_id');
    }

    public function practitionerRole()
    {
        return $this->belongsTo(PractitionerRole::class, 'practitioner_role_id');
    }
}
