
package cn.iocoder.yudao.module.system.api.assets;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.system.api.assets.dto.AssetsTypeDTO;
import cn.iocoder.yudao.module.system.enums.ApiConstants;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Collection;
import java.util.List;

@FeignClient(name = ApiConstants.NAME) // TODO 芋艿：fallbackFactory =
@Tag(name = "RPC 服务 - 资产类型")
public interface AssetsTypeApi {

    String PREFIX = ApiConstants.PREFIX + "/assets_type";

    @GetMapping(PREFIX + "/getAssetsTypeIdsByCode")
    @Operation(summary = "通过资产类型code获取资产类型ids")
    @Parameter(name = "code", description = "资产类型code", example = "1", required = true)
    CommonResult<List<Long>> getAssetsTypeIdsByCode(@RequestParam("code") String code);

    @GetMapping(PREFIX + "/get")
    @Operation(summary = "获得资产类型信息")
    @Parameter(name = "id", description = "资产类型编号", example = "1", required = true)
    CommonResult<AssetsTypeDTO> get(@RequestParam("id") Long id);

}
