package com.yida.data.attendance.controller;

import com.yida.data.attendance.service.EduAttendanceRuleService;
import com.yida.data.common.core.common.ResultBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "考勤-学生-考勤规则（不鉴权）")
@RestController
@RequiredArgsConstructor
@RequestMapping("/in/rule")
public class InEduAttendanceRuleController {

    private final EduAttendanceRuleService eduAttendanceRuleService;

    @ApiOperation("更新规则状态")
    @GetMapping("/updateRuleStatus")
    public ResultBean updateRuleStatus() {
        eduAttendanceRuleService.updateRuleStatus();
        return ResultBean.buildSuccess();
    }
}
