package top.continew.admin.business.service;

import top.continew.admin.business.model.entity.FreeQuotaConfigDO;
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.starter.data.mp.service.IService;
import top.continew.starter.extension.crud.service.BaseService;

import java.util.List;

/**
 * 免费额度配置服务
 *
 * @author jiay
 * @since 2025/11/17
 */
public interface FreeQuotaConfigService extends BaseService<FreeQuotaConfigResp, FreeQuotaConfigResp, FreeQuotaConfigQuery, FreeQuotaConfigReq>, IService<FreeQuotaConfigDO> {

    /**
     * 获取所有启用的配置
     *
     * @return 配置列表
     */
    List<FreeQuotaConfigDO> listEnabled();

    /**
     * 根据类别编码获取配置
     *
     * @param categoryCode 类别编码
     * @return 配置信息
     */
    FreeQuotaConfigDO getByCategoryCode(String categoryCode);

    /**
     * 根据计费类型获取配置
     *
     * @param chargeType 计费类型
     * @return 配置信息
     */
    FreeQuotaConfigDO getByChargeType(Integer chargeType);
}
