package com.bohuikeji.frame.module.admin.entity.configure;

import com.bohuikeji.frame.module.admin.annotation.TableQueryField;
import lombok.Data;

/**
 * 查询配置
 * @author 10552
 */
@Data
public class QueryAn extends BaseInputAn{
    /**
     * 是否支持搜索
     */
    boolean search;

    public static QueryAn getInstance(TableQueryField queryField){
        if (queryField==null){return null;}
        QueryAn queryAn=new QueryAn();
        queryAn.setShow(queryField.show());
        queryAn.setSearch(queryField.like());
        queryAn.setBlock(queryField.block().getName());
        queryAn.setSort(queryField.sort());
        return queryAn;
    }
    @Override
    public boolean isShow() {
        return show;
    }
}
