@classmethod
def required(cls):
    """Return a list of all columns required by the database to create the
        resource.

        :param cls: The Model class to gather attributes from
        :rtype: list
        """
    columns = []
    for column in cls.__table__.columns:
        is_autoincrement = 'int' in str(column.type).lower(
            ) and column.autoincrement
        if (not column.nullable and not column.primary_key or column.
            primary_key and not is_autoincrement):
            columns.append(column.name)
    return columns
