package com.template.api;

import com.template.model.pojo.SmartAttendance;
import com.template.model.result.CommonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.BindingResult;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

/**
 * @Author: binguo
 * @Date: 2023/3/30 星期四 17:28
 * @Description: com.video.api
 * @Version: 1.0
 */
@RequestMapping("/api/smartAttendance")
@Api(tags = {"SmartAttendanceControllerAPI"}, value = "考勤")
public interface SmartAttendanceControllerAPI {
    @PostMapping(value = "/insertSmartAttendance")
    @ApiOperation(value = "添加考勤", notes = "添加考勤数据", httpMethod = "POST")
    CommonResult insertSmartAttendance(@Validated @RequestBody SmartAttendance smartApply, BindingResult bindingResult);

    @PostMapping(value = "/updateSmartAttendanceById")
    @ApiOperation(value = "编辑考勤数据", notes = "编辑考勤数据", httpMethod = "POST")
    CommonResult updateSmartAttendanceById(@Validated @RequestBody SmartAttendance ra, BindingResult bindingResult);

    @GetMapping(value = "/queryPageSmartAttendance")
    @ApiOperation(value = "考勤分页数据", notes = "考勤分页数据", httpMethod = "GET")
    CommonResult queryPageSmartAttendances(@RequestParam int currentPage, @RequestParam int pageCount, String name);

    @GetMapping(value = "/deleteSmartAttendanceById")
    @ApiOperation(value = "根据ID删除指定考勤", notes = "根据ID删除指定考勤", httpMethod = "GET")
    CommonResult deleteSmartAttendanceById(@RequestParam int id);

    /**
     * 获取请假记录数据
     */
    @GetMapping(value = "/queryLeaveRecords")
    @ApiOperation(value = "获取请假记录数据", notes = "获取请假记录数据", httpMethod = "GET")
    CommonResult queryLeaveRecords();
}
