package cn.iocoder.yudao.module.system.api.holiday;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.system.api.holiday.dto.CreateUserHolidayDTO;
import cn.iocoder.yudao.module.system.api.holiday.dto.OvertimeIncreasesHolidayDTO;
import cn.iocoder.yudao.module.system.api.holiday.vo.HolidaySettingVO;
import cn.iocoder.yudao.module.system.enums.ApiConstants;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = ApiConstants.NAME) // TODO 芋艿：fallbackFactory =
@Tag(name = "RPC 服务 - 假期")
public interface HolidayApi {

    String PREFIX = ApiConstants.PREFIX + "/holiday";


    @PostMapping(PREFIX + "/getHolidaySettings")
    @Operation(summary = "获取假期设置")
    CommonResult<HolidaySettingVO> getHolidaySettings(@RequestParam("userId") Long userId,
                                                      @RequestParam("holidaySettingId") Long holidaySettingId);


    @PostMapping(PREFIX + "/createUserHoliday")
    @Operation(summary = "创建用户请假")
    CommonResult createUserHoliday(@RequestBody CreateUserHolidayDTO dto);

    @PostMapping(PREFIX + "/overtimeIncreasesHoliday")
    @Operation(summary = "加班增加假期")
    CommonResult overtimeIncreasesHoliday(@RequestBody OvertimeIncreasesHolidayDTO dto);
}
