<?php

namespace App\Models;

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

class DiaDeAtencion extends Model
{

use HasFactory;
    protected $table = 'diasdeatenciones';
    
    protected $fillable = [
        'agenda_id',
        'dia_id',
    ];

    public function agenda()
    {
        return $this->belongsTo(Agenda::class, 'agenda_id', 'id');
    } 
    public function dias() 
    {
        return $this->belongsTo(Dia::class, 'dia_id', 'id');
    }


    public function horariosRecesos() 
    {
        return $this->hasMany(HorarioReceso::class, 'diadeatencion_id', 'id');
    }
    public function horariosAtenciones() 
    {
        return $this->hasMany(HorarioDeAtencion::class, 'diadeatencion_id', 'id');
    }


}
