Spin Object with Drag

Hi I am trying to spin a object with drag. For example a windmill I want the player to hold one of the blades and spin the windmill around and if they let go the windmill will continue to spin and eventually stop by the drag caused by the physics. I got a code below but unfortunately it stops soon as you let go of the object. I want the object to spin on the Z axis regardless of what direction the camera is looking. Please help thank you.

using UnityEngine;
using System.Collections;

public class SpinWithTouch : MonoBehaviour
{
        private float baseAngle = 0.0f;
      
        void OnMouseDown ()
        {
                Vector3 pos = Camera.main.WorldToScreenPoint (transform.position);
                pos = Input.mousePosition - pos;
                baseAngle = Mathf.Atan2 (pos.y, pos.x) * Mathf.Rad2Deg;
                baseAngle -= Mathf.Atan2 (transform.right.y, transform.right.x) * Mathf.Rad2Deg;
        }
      
        void OnMouseDrag ()
        {
                Vector3 pos = Camera.main.WorldToScreenPoint (transform.position);
                pos = Input.mousePosition - pos;
                float ang = Mathf.Atan2 (pos.y, pos.x) * Mathf.Rad2Deg - baseAngle;
                transform.rotation = Quaternion.AngleAxis (ang, Vector3.forward);
        }
}

You are not using the physics engine…
Do you think this could be used in some form for your setup?

Close how can a only spin it on the Z axis?

using UnityEngine;
using System.Collections;

public class ObjectRotate : MonoBehaviour
{
        public float torque = 1.0f;
        private float baseAngle = 0.0f;
        public Rigidbody rb;
   
        void Start ()
        {
                rb = GetComponent<Rigidbody> ();
        }
   
        void OnMouseDown ()
        {
       
        }
   
        void OnMouseDrag ()
        {
                rb.AddTorque (Vector3.up * torque * -Input.GetAxis ("Mouse X"));
       
                rb.AddTorque (Vector3.right * torque * Input.GetAxis ("Mouse Y"));
        }
}

transform.forward, I think?