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.BillingRuleQuery;
import top.continew.admin.business.model.req.BillingRuleReq;
import top.continew.admin.business.model.resp.BillingRuleResp;
import top.continew.admin.business.service.BillingRuleService;
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/14
 */
@Tag(name = "计费规则管理 API")
@RestController
@CrudRequestMapping(value = "/billing/rule", api = {Api.LIST, Api.PAGE, Api.GET, Api.ADD, Api.UPDATE, Api.DELETE,
    Api.EXPORT})
public class BillingRuleController extends BaseController<BillingRuleService, BillingRuleResp, BillingRuleResp, BillingRuleQuery, BillingRuleReq> {

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