<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
 * @property int $id
 * @property int $schedule_id
 * @property int $provider_id
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @property \Illuminate\Support\Carbon|null $deleted_at
 * @property-read \App\Models\Provider $provider
 * @property-read \App\Models\Schedule $schedule
 * @method static \Illuminate\Database\Eloquent\Builder<static>|ScheduleRefuse newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder<static>|ScheduleRefuse newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder<static>|ScheduleRefuse onlyTrashed()
 * @method static \Illuminate\Database\Eloquent\Builder<static>|ScheduleRefuse query()
 * @method static \Illuminate\Database\Eloquent\Builder<static>|ScheduleRefuse whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder<static>|ScheduleRefuse whereDeletedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder<static>|ScheduleRefuse whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder<static>|ScheduleRefuse whereProviderId($value)
 * @method static \Illuminate\Database\Eloquent\Builder<static>|ScheduleRefuse whereScheduleId($value)
 * @method static \Illuminate\Database\Eloquent\Builder<static>|ScheduleRefuse whereUpdatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder<static>|ScheduleRefuse withTrashed(bool $withTrashed = true)
 * @method static \Illuminate\Database\Eloquent\Builder<static>|ScheduleRefuse withoutTrashed()
 * @mixin \Eloquent
 */
class ScheduleRefuse extends Model
{
    use SoftDeletes;

    protected $fillable = [
        'schedule_id',
        'provider_id',
    ];

    protected $casts = [
        'created_at' => 'datetime',
        'updated_at' => 'datetime',
        'deleted_at' => 'datetime',
    ];

    public function provider(): BelongsTo
    {
        return $this->belongsTo(Provider::class);
    }

    public function schedule(): BelongsTo
    {
        return $this->belongsTo(Schedule::class);
    }
}
