<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;

class ClientUser extends Model
{
    protected $fillable = ['client_id','name','email','phone','department','position','password','can_login','is_active'];
    protected $hidden   = ['password'];
    protected $casts    = ['can_login'=>'boolean','is_active'=>'boolean'];

    public function client()  { return $this->belongsTo(Client::class); }
    public function devices() { return $this->hasMany(Device::class); }
    public function tickets() { return $this->hasMany(Ticket::class); }
}
