package com.ebts.generator.service;

import java.util.List;
import java.util.Map;

import com.ebts.common.utils.ServerResult;
import com.ebts.generator.entity.TopSearchColumn;
import com.ebts.generator.entity.TopSearchTable;

/**
 * top万能查询主Service接口
 *
 * @author clay
 * @date 2021-07-20
 */
public interface TopSearchTableService {
    /**
     * 查询top万能查询主
     *
     * @param id top万能查询主ID
     * @return top万能查询主
     */
    ServerResult<TopSearchTable> selectTopSearchTableById(Long id);

    /**
     * 查询top万能查询主列表
     *
     * @param topSearchTable top万能查询主
     * @return top万能查询主集合
     */
    ServerResult<List<TopSearchTable>> selectTopSearchTableList(TopSearchTable topSearchTable);

    /**
     * @return
     */
    ServerResult<List<TopSearchTable>> selectTopSearchTableInfo();

    List<TopSearchColumn> selectTableColumns(Long id);

    /**
     * 新增top万能查询主
     *
     * @param topSearchTable top万能查询主
     * @return 结果
     */
    ServerResult<Integer> insertTopSearchTable(TopSearchTable topSearchTable);

    /**
     * 修改top万能查询主
     *
     * @param topSearchTable top万能查询主
     * @return 结果
     */
    ServerResult<Integer> updateTopSearchTable(TopSearchTable topSearchTable);

    List<TopSearchTable> selectDbTableListByNames(String[] tableNames);

    List<Map<String,Object>> selectDbTableList(Map<String,Object> params);

    void importGenTable(List<TopSearchTable> tableList);

    /**
     * 批量删除top万能查询主
     *
     * @param ids 需要删除的top万能查询主ID
     * @return 结果
     */
    ServerResult<Integer> deleteTopSearchTableByIds(Long[] ids);

    /**
     * 删除top万能查询主信息
     *
     * @param id top万能查询主ID
     * @return 结果
     */
    ServerResult<Integer> deleteTopSearchTableById(Long id);
}
