@staticmethod
def task_to_row(task):
    """Convert a task to a tuple with the correct column order."""
    return (task.id, task.title, task.body, task.context, task.priority,
        task.created_date.timestamp(), task.completed_date.timestamp() if
        task.completed_date else 0)
