<?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 $custom_schedule_id
 * @property int $speciality_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\CustomSchedule $customSchedule
 * @property-read \App\Models\Speciality $speciality
 * @method static \Illuminate\Database\Eloquent\Builder<static>|CustomScheduleSpeciality newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder<static>|CustomScheduleSpeciality newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder<static>|CustomScheduleSpeciality onlyTrashed()
 * @method static \Illuminate\Database\Eloquent\Builder<static>|CustomScheduleSpeciality query()
 * @method static \Illuminate\Database\Eloquent\Builder<static>|CustomScheduleSpeciality whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder<static>|CustomScheduleSpeciality whereCustomScheduleId($value)
 * @method static \Illuminate\Database\Eloquent\Builder<static>|CustomScheduleSpeciality whereDeletedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder<static>|CustomScheduleSpeciality whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder<static>|CustomScheduleSpeciality whereSpecialityId($value)
 * @method static \Illuminate\Database\Eloquent\Builder<static>|CustomScheduleSpeciality whereUpdatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder<static>|CustomScheduleSpeciality withTrashed(bool $withTrashed = true)
 * @method static \Illuminate\Database\Eloquent\Builder<static>|CustomScheduleSpeciality withoutTrashed()
 * @mixin \Eloquent
 */
class CustomScheduleSpeciality extends Model
{
    use SoftDeletes;

    protected $table = 'custom_schedules_specialities';

    protected $fillable = [
        'custom_schedule_id',
        'speciality_id',
    ];

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

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