package com.crm.manager.service.finance;

import com.crm.rely.backend.core.dto.base.BaseResultDto;
import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
import com.crm.rely.backend.core.dto.finance.synonym.transfer.FinanceSynonymTransferSearchDto;
import com.crm.rely.backend.core.entity.base.SingleLongEntity;
import com.crm.rely.backend.core.entity.finance.synonym.transfer.FinanceSynonymTransferAddEntity;
import com.crm.rely.backend.core.entity.finance.synonym.transfer.FinanceSynonymTransferApproveEntity;
import com.crm.rely.backend.core.entity.finance.synonym.transfer.FinanceSynonymTransferDeleteEntity;
import com.crm.rely.backend.core.entity.finance.synonym.transfer.FinanceSynonymTransferSearchEntity;
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;

import java.util.List;

@FeignClient(name = "PAY-SERVICE", path = "/synonym/transfer/manager")
public interface FinanceSynonymTransferFeignService {


    @PostMapping("/save")
    BaseResultDto save(@RequestBody @Validated FinanceSynonymTransferAddEntity entity) throws Exception;

    @PostMapping("/saves")
    BaseResultDto saves(@RequestBody @Validated List<FinanceSynonymTransferAddEntity> entitys) throws Exception;


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

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

    @PostMapping("/list")
    ResultWithPagerDto<FinanceSynonymTransferSearchDto> searcherList(@RequestBody @Validated FinanceSynonymTransferSearchEntity entity) throws Exception;

    @PostMapping("/single")
    BaseResultDto<FinanceSynonymTransferSearchDto> searcherSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception;


}
