import time


def get_item_details(user_data, item_id, user_id):
    """
    Helper for create_item().
    Get and return all necessary details for item.
    :param: user_data
    :return: dictionary
    """
    current_milli_time = int(round(time.time() * 1000))
    return {
        'id': item_id,
        'title': user_data.get('title'),
        'price': int(user_data.get('price')),
        'seller_id': user_id,
        'description': user_data.get('description'),
        'sold': False,
        'latitude': user_data.get('latitude'),
        'longitude': user_data.get('longitude'),
        'item_created': current_milli_time
    }