adding user_id index to events model and generate event controller in api