<?php

namespace App\Models\Client;

use App\Models\HandlerType;
use App\Models\User\User;
use Illuminate\Database\Eloquent\Model;

class ClientHandler extends Model
{
    public $fillable = [
        'handler_type_id',
        'client_id',
        'user_id',
    ];

    public function client() {
        return $this->belongsTo(Client::class);
    }

    public function user() {
        return $this->belongsTo(User::class);
    }

    public function type() {
        return $this->belongsTo(HandlerType::class, 'handler_type_id');
    }
}
