package com.crm.manager.service.activity;

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.custom.activity.exceptional.manager.reason.CustomActivityExceptionalManagerReasonDto;
import com.crm.rely.backend.core.entity.base.SingleLongEntity;
import com.crm.rely.backend.core.entity.custom.exceptional.manager.reason.CustomActivityExceptionalManagerReasonAddEntity;
import com.crm.rely.backend.core.entity.custom.exceptional.manager.reason.CustomActivityExceptionalManagerReasonDeleteEntity;
import com.crm.rely.backend.core.entity.custom.exceptional.manager.reason.CustomActivityExceptionalManagerReasonSearchListEntity;
import com.crm.rely.backend.core.entity.custom.exceptional.manager.reason.CustomActivityExceptionalManagerReasonUpdateEntity;
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 = "ACTIVITY-SERVICE", path = "/custom/activity/exceptional/manager/reason/manager")
public interface CustomActivityExceptionalManagerReasonFeignService {


    /**
     * 添加
     *
     * @param entity
     * @return
     * @throws Exception
     */
    @PostMapping("/add")
    BaseResultDto add(@RequestBody @Validated CustomActivityExceptionalManagerReasonAddEntity entity) throws Exception;

    /**
     * 删除
     *
     * @param entity
     * @return
     * @throws Exception
     */
    @PostMapping("/delete")
    BaseResultDto delete(@RequestBody @Validated CustomActivityExceptionalManagerReasonDeleteEntity entity) throws Exception;

    /**
     * 修改
     *
     * @param entity
     * @return
     * @throws Exception
     */
    @PostMapping("/update")
    BaseResultDto update(@RequestBody @Validated CustomActivityExceptionalManagerReasonUpdateEntity entity) throws Exception;

    /**
     * @param entity
     * @return
     * @throws Exception
     */
    @PostMapping("/search/list")
    ResultWithPagerDto<CustomActivityExceptionalManagerReasonDto> pageSearchList(@RequestBody @Validated CustomActivityExceptionalManagerReasonSearchListEntity entity) throws Exception;

    @PostMapping("/all")
    List<CustomActivityExceptionalManagerReasonDto> allReason() throws Exception;

    @PostMapping("/search/single")
    BaseResultDto<CustomActivityExceptionalManagerReasonDto> single(@RequestBody @Validated SingleLongEntity entity) throws Exception;
}

