package cn.ibizlab.core.lite.filter;

import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;

import lombok.*;
import lombok.extern.slf4j.Slf4j;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;

import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;


import cn.ibizlab.util.filter.QueryWrapperContext;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.core.lite.domain.TableSync;
/**
 * 关系型数据实体[TableSync] 查询条件对象
 */
@Slf4j
@Data
public class TableSyncSearchContext extends QueryWrapperContext<TableSync> {

	private String n_syncname_like;//[标题]
	public void setN_syncname_like(String n_syncname_like) {
        this.n_syncname_like = n_syncname_like;
        if(!ObjectUtils.isEmpty(this.n_syncname_like)){
            this.getSearchCond().like("syncname", n_syncname_like);
        }
    }
	private String n_srcentityid_eq;//[源实体标识]
	public void setN_srcentityid_eq(String n_srcentityid_eq) {
        this.n_srcentityid_eq = n_srcentityid_eq;
        if(!ObjectUtils.isEmpty(this.n_srcentityid_eq)){
            this.getSearchCond().eq("srcentityid", n_srcentityid_eq);
        }
    }
	private String n_srcentityname_eq;//[源实体名称]
	public void setN_srcentityname_eq(String n_srcentityname_eq) {
        this.n_srcentityname_eq = n_srcentityname_eq;
        if(!ObjectUtils.isEmpty(this.n_srcentityname_eq)){
            this.getSearchCond().eq("srcentityname", n_srcentityname_eq);
        }
    }
	private String n_srcentityname_like;//[源实体名称]
	public void setN_srcentityname_like(String n_srcentityname_like) {
        this.n_srcentityname_like = n_srcentityname_like;
        if(!ObjectUtils.isEmpty(this.n_srcentityname_like)){
            this.getSearchCond().like("srcentityname", n_srcentityname_like);
        }
    }
	private String n_entityid_eq;//[目标实体标识]
	public void setN_entityid_eq(String n_entityid_eq) {
        this.n_entityid_eq = n_entityid_eq;
        if(!ObjectUtils.isEmpty(this.n_entityid_eq)){
            this.getSearchCond().eq("entityid", n_entityid_eq);
        }
    }
	private String n_entityname_eq;//[目标实体]
	public void setN_entityname_eq(String n_entityname_eq) {
        this.n_entityname_eq = n_entityname_eq;
        if(!ObjectUtils.isEmpty(this.n_entityname_eq)){
            this.getSearchCond().eq("entityname", n_entityname_eq);
        }
    }
	private String n_entityname_like;//[目标实体]
	public void setN_entityname_like(String n_entityname_like) {
        this.n_entityname_like = n_entityname_like;
        if(!ObjectUtils.isEmpty(this.n_entityname_like)){
            this.getSearchCond().like("entityname", n_entityname_like);
        }
    }
	private String n_systemid_eq;//[系统标识]
	public void setN_systemid_eq(String n_systemid_eq) {
        this.n_systemid_eq = n_systemid_eq;
        if(!ObjectUtils.isEmpty(this.n_systemid_eq)){
            this.getSearchCond().eq("systemid", n_systemid_eq);
        }
    }
	private String n_syncgroup_like;//[分组]
	public void setN_syncgroup_like(String n_syncgroup_like) {
        this.n_syncgroup_like = n_syncgroup_like;
        if(!ObjectUtils.isEmpty(this.n_syncgroup_like)){
            this.getSearchCond().like("syncgroup", n_syncgroup_like);
        }
    }
	private String n_lastrunresult_eq;//[上次运行结果]
	public void setN_lastrunresult_eq(String n_lastrunresult_eq) {
        this.n_lastrunresult_eq = n_lastrunresult_eq;
        if(!ObjectUtils.isEmpty(this.n_lastrunresult_eq)){
            this.getSearchCond().eq("lastrunresult", n_lastrunresult_eq);
        }
    }
	private Integer n_isenable_eq;//[是否启用]
	public void setN_isenable_eq(Integer n_isenable_eq) {
        this.n_isenable_eq = n_isenable_eq;
        if(!ObjectUtils.isEmpty(this.n_isenable_eq)){
            this.getSearchCond().eq("isenable", n_isenable_eq);
        }
    }

    /**
	 * 启用快速搜索
	 */
    @Override
	public void setQuery(String query)
	{
		 this.query=query;
		 if(!StringUtils.isEmpty(query)){
            this.getSearchCond().and( wrapper ->
                     wrapper.like("syncname", query)
            );
		 }
	}
}



