package com.seer.teach.admin.controller;

import cn.dev33.satoken.annotation.SaCheckPermission;
import com.seer.teach.common.ResultBean;
import com.seer.teach.common.utils.GradeUtils;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import lombok.RequiredArgsConstructor;
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;

@Tag(name = "后台-年级管理")
@RestController
@RequiredArgsConstructor
@RequestMapping("/teacher/grade")
public class GradeAdminController {

    @GetMapping("/list")
    @Operation(summary = "获取所有年级")
    @SaCheckPermission("admin:grade:list")
    public ResultBean<List<com.seer.teach.common.utils.dto.GradeDTO>> list() {
        return ResultBean.success(GradeUtils.getList());
    }
}