'datetime', 'password' => 'hashed', ]; } public function cliente(): BelongsTo { return $this->belongsTo(Cliente::class); } public function permisosEmpleado(): HasMany { return $this->hasMany(PermisoEmpleado::class); } public function isAdmin(): bool { return $this->role === 'admin'; } public function isAnalista(): bool { return $this->role === 'analista'; } public function isCliente(): bool { return $this->role === 'cliente'; } public function isEmpleado(): bool { return $this->role === 'empleado'; } public function canAccessCliente(int $clienteId): bool { if ($this->isAdmin() || $this->isAnalista()) { return true; } return $this->cliente_id === $clienteId; } }