package com.crm.manager.service.follow;

import com.crm.rely.backend.core.dto.base.BaseResultDto;
import com.crm.rely.backend.core.dto.base.BaseResultWithPagerDto;
import com.crm.rely.backend.core.dto.follow.cpt.FollowCptInfoDto;
import com.crm.rely.backend.core.entity.base.SingleLongEntity;
import com.crm.rely.backend.core.entity.follow.cpt.FollowCptInfoAddEntity;
import com.crm.rely.backend.core.entity.follow.cpt.FollowCptInfoSearchEntity;
import com.crm.rely.backend.core.entity.follow.cpt.FollowCptInfoUpdateEntity;
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 = "FOLLOW-TASK-SERVICE", path = "/manager/service/follow/cpt/info")
public interface FollowCptInfoFeignService {

    @PostMapping("/add")
    BaseResultDto<Object> add(@RequestBody @Validated FollowCptInfoAddEntity entity) throws Exception;

    @PostMapping("/update")
    BaseResultDto<Object> update(@RequestBody @Validated FollowCptInfoUpdateEntity entity) throws Exception;

    @PostMapping("/delete")
    BaseResultDto<Object> delete(@RequestBody @Validated SingleLongEntity entity) throws Exception;

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

    @PostMapping("/search/list")
    BaseResultWithPagerDto<List<FollowCptInfoDto>> searchList(@RequestBody FollowCptInfoSearchEntity entity) throws Exception;
}
