package com.crm.custom.service.activity;

import com.crm.rely.backend.core.dto.base.BaseResultDto;
import com.crm.rely.backend.core.dto.base.BaseResultWithPagerDto;
import com.crm.rely.backend.core.entity.base.SingleLongEntity;
import com.crm.rely.backend.model.dto.activity.ActivityRaceSignInfoDto;
import com.crm.rely.backend.model.entity.activity.ActivityRaceSignAddEntity;
import com.crm.rely.backend.model.entity.activity.ActivityRaceSignInfoEntity;
import com.crm.rely.backend.model.entity.activity.ActivityRaceSignListEntity;
import com.crm.rely.backend.model.entity.activity.ActivityRaceSignLoginEntity;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * 比赛报名服务
 * @author y
 * @create 2022/7/22
 */
@FeignClient(name = "ACTIVITY-SERVICE", path = "/custom/service/activity/race/sign")
public interface ActivityRaceSignFeignService {

    /**
     * 添加报名
     * @param entity
     * @return
     * @throws Exception
     */
    @PostMapping("/add")
    BaseResultDto<Boolean> add(ActivityRaceSignAddEntity entity) throws Exception;


    /**
     * 最近一次报名信息
     *
     * @param entity
     * @return
     * @throws Exception
     */
    @PostMapping("/recent")
    BaseResultDto<ActivityRaceSignInfoDto> info(ActivityRaceSignInfoEntity entity) throws Exception;

    /**
     * 根据ID获取报名信息
     *
     * @param entity
     * @return
     * @throws Exception
     */
    @PostMapping("/search/single")
    BaseResultDto<ActivityRaceSignInfoDto> searchSingle(SingleLongEntity entity) throws Exception;

    /**
     * 报名列表
     *
     * @param entity
     * @return
     * @throws Exception
     */
    @PostMapping("/search/list")
    BaseResultWithPagerDto<List<ActivityRaceSignInfoDto>> searchList(ActivityRaceSignListEntity entity) throws Exception;

    /**
     * 获取可用的交易账户
     * @param entity
     * @return
     * @throws Exception
     */
    @PostMapping("/logins")
    BaseResultDto<List<Long>> logins(ActivityRaceSignLoginEntity entity) throws Exception;
}
