package com.crm.manager.service;

import com.crm.rely.backend.core.dto.base.BaseResultDto;
import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
import com.crm.rely.backend.core.entity.base.SingleLongEntity;
import com.crm.rely.backend.model.dto.finance.withdraw.FinanceWithdrawDto;
import com.crm.rely.backend.model.entity.finance.withdraw.FinanceWithdrawApproveEntity;
import com.crm.rely.backend.model.entity.finance.withdraw.FinanceWithdrawDeleteEntity;
import com.crm.rely.backend.model.entity.finance.withdraw.FinanceWithdrawSearchListEntity;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(name = "TRADE-PAY-SERVICE", path = "/withdraw/manager")
public interface FinanceWithdrawFeignService {

    @PostMapping("/approve")
    BaseResultDto approve(@RequestBody @Validated FinanceWithdrawApproveEntity entity) throws Exception;

    @PostMapping("/delete")
    BaseResultDto delete(@RequestBody @Validated FinanceWithdrawDeleteEntity entity) throws Exception;

    @PostMapping("/search/list")
    ResultWithPagerDto<FinanceWithdrawDto> searchList(@RequestBody @Validated FinanceWithdrawSearchListEntity entity) throws Exception;

    @PostMapping("/searcher/single")
    BaseResultDto<FinanceWithdrawDto> searchSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception;
}
