package com.ruoyi.web.modules.home.constant;

/**
 * C 端全站搜索常量
 */
public final class SearchAppConstants
{
    private SearchAppConstants()
    {
    }

    public static final String DEFAULT_SORT = "sales_desc";

    public static final String SORT_SALES_DESC = "sales_desc";

    public static final String SORT_PRICE_DESC = "price_desc";

    public static final String SORT_PRICE_ASC = "price_asc";

    public static final int DEFAULT_PAGE_NUM = 1;

    public static final int DEFAULT_PAGE_SIZE = 10;

    public static final String MSG_KEYWORD_REQUIRED = "请输入搜索内容";

    public static final String MSG_SORT_INVALID = "排序参数无效";

    public static boolean isValidSortBy(String sortBy)
    {
        return SORT_SALES_DESC.equals(sortBy)
                || SORT_PRICE_DESC.equals(sortBy)
                || SORT_PRICE_ASC.equals(sortBy);
    }
}
