package com.boman.gen.api;

import com.boman.domain.constant.ServiceNameConstants;
import com.boman.domain.dto.AjaxResult;
import com.boman.domain.GenTableColumn;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * 生成代码模块，远程调用入口，如需其他接口，在此添加
 *
 * @author shiqian
 * @date 2021年04月06日 14:22
 **/
@FeignClient(contextId = "remoteGenTableColumnService", value = ServiceNameConstants.GEN_SERVICE)
public interface RemoteGenTableColumnService {


    /**
     * 功能描述: 通过表名查找表对应的所有的列
     *
     * @param tableId tableId
     * @return GenTable
     */
    @GetMapping(value = "/genTableColumn/{tableId}")
    AjaxResult listColumnsByTableId(@PathVariable("tableId") Long tableId);

    @GetMapping(value = "/genTableColumn/pk/{columnId}")
    GenTableColumn getById(@PathVariable("columnId") Long columnId);

    @GetMapping(value = "/genTableColumn/listColumnsByTableName/{tableName}")
    List<GenTableColumn> listColumnsByTableName(@PathVariable("tableName") String tableName);

}
