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.web.activity.oc.WebActivityOcSearchDto;
import com.crm.rely.backend.core.entity.base.SingleLongEntity;
import com.crm.rely.backend.core.entity.web.activity.oc.*;
import com.crm.rely.backend.exception.ServiceException;
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 = "/web/oc/manager")
public interface WebActivityOcFeignService {
    @PostMapping("/delete")
    BaseResultDto delete(WebActivityOcDeleteEntity entity) throws Exception;

    @PostMapping("/search/list")
    ResultWithPagerDto<WebActivityOcSearchDto> list(WebActivityOcSearchEntity entity) throws Exception;

    @PostMapping("/search/single")
    BaseResultDto managerSingle(SingleLongEntity entity) throws Exception;

    @PostMapping("/allocation")
    BaseResultDto allocation(WebActivityOcUpdateEntity entity) throws ServiceException;

    @PostMapping("/adds")
    BaseResultDto adds(List<WebActivityOcAddEntity> entities) throws Exception;

    @PostMapping("/follow/add")
    BaseResultDto followAdd(WebActivityOcFollowAddEntity entity) throws Exception;

    @PostMapping("/follow/search/list")
    BaseResultDto followList(WebActivityOcFollowAddEntity entity) throws Exception;

    @PostMapping("/api/add")
    BaseResultDto apiAdd(WebActivityOcApiEntity entity) throws Exception;

    @PostMapping("/click/allocation/roster")
    BaseResultDto clickAllocationRoster(@RequestBody @Validated WebActivityOcClickEntity entity) throws Exception;
}

