package com.yida.data.system.controller;

import com.yida.data.common.core.common.ResultBean;
import com.yida.data.common.core.entity.system.EduHoliday;
import com.yida.data.system.service.EduHolidayService;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;

@Api(tags = "节假日（不鉴权）")
@AllArgsConstructor
@RestController
@RequestMapping("/in/holiday")
public class InEduHolidayController {
    private final EduHolidayService eduHolidayService;

    @ApiOperation("查询所有节假日")
    @GetMapping("/listAllHoliday")
    public ResultBean<List<EduHoliday>> listAllHoliday() {
        return ResultBean.buildSuccess(eduHolidayService.list());
    }
}
