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

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.system.api.rental.dto.RentalOrderDTO;
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.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = ApiConstants.NAME) // TODO 芋艿：fallbackFactory =
@Tag(name = "RPC 服务 - 租赁订单")
public interface RentalOrderApi {

    String PREFIX = ApiConstants.PREFIX + "/rental-order";

    @PutMapping(PREFIX + "/update")
    @Operation(summary = "更新租赁订单信息")
    CommonResult<Boolean> updateOrder(@RequestBody RentalOrderDTO updateReqVO);

    @GetMapping(PREFIX + "/get")
    @Operation(summary = "获取租赁订单信息")
    @Parameter(name = "orderNo", description = "订单编号", required = true)
    CommonResult<RentalOrderDTO> getOrder(@RequestParam("orderNo") String orderNo);
}
