package top.continew.admin.controller.business;

import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.RestController;
import top.continew.admin.business.model.query.FreeQuotaConfigQuery;
import top.continew.admin.business.model.req.FreeQuotaConfigReq;
import top.continew.admin.business.model.resp.FreeQuotaConfigResp;
import top.continew.admin.business.service.FreeQuotaConfigService;
import top.continew.starter.extension.crud.annotation.CrudRequestMapping;
import top.continew.starter.extension.crud.controller.BaseController;
import top.continew.starter.extension.crud.enums.Api;

/**
 * 免费额度配置管理 API
 *
 * @author jiay
 * @since 2025/11/17
 */
@Tag(name = "免费额度配置管理 API")
@RestController
@CrudRequestMapping(value = "/free-quota/config", api = {Api.LIST, Api.PAGE, Api.GET, Api.ADD, Api.UPDATE, Api.DELETE,
    Api.EXPORT})
public class FreeQuotaConfigController extends BaseController<FreeQuotaConfigService, FreeQuotaConfigResp, FreeQuotaConfigResp, FreeQuotaConfigQuery, FreeQuotaConfigReq> {

    @Override
    protected void checkPermission(Api api) {
        // 可以在这里添加权限检查
        // 例如: StpUtil.checkPermission("free-quota:config:" + api.name().toLowerCase());
    }
}
