<?php

namespace App\Models;

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

class Chamber extends Model
{
    use SoftDeletes;

    protected $guarded = [];

    protected $casts = [
        'schedule' => 'array',
        'is_active' => 'boolean',
    ];

    public function visits()
    {
        return $this->hasMany(Visit::class);
    }

    public function assistant()
    {
        return $this->belongsTo(User::class , 'assistant_user_id');
    }
}
