# ===================================
# Filter Scope Definitions
# ===================================

scopes:

    # category:

    #     # Filter name
    #     label: rainlab.blog::lang.posts.filter_category

    #     # Model Class name
    #     modelClass: RainLab\Blog\Models\Category

    #     # Model attribute to display for the name
    #     nameFrom: name

    #     # Apply query scope
    #     scope: FilterCategories

    published:

        # Filter name
        label: rainlab.blog::lang.posts.filter_published

        # Filter type
        type: switch

        # SQL Conditions
        conditions:
            - published <> '1'
            - published = '1'

    published_date:

        # Filter name
        label: rainlab.blog::lang.posts.filter_date

        # Filter type
        type: daterange

        # SQL Conditions
        conditions: created_at >= ':after' AND created_at <= ':before'
