package top.continew.admin.business.service;

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

/**
 * 计费规则服务
 *
 * @author jiay
 * @since 2025/11/14
 */
public interface BillingRuleService extends BaseService<BillingRuleResp, BillingRuleResp, BillingRuleQuery, BillingRuleReq>, IService<BillingRuleDO> {

    /**
     * 根据平台ID获取计费规则
     *
     * @param platformId 平台ID
     * @return 计费规则
     */
    BillingRuleDO getByPlatformId(Long platformId);

    /**
     * 根据平台ID获取计费金额
     *
     * @param platformId 平台ID
     * @return 计费金额（分/次/整数量）
     */
    Long getPriceByPlatformId(Long platformId);

    /**
     * 根据扣费编码获取计费规则
     *
     * @param chargeCode 扣费编码
     * @return 计费规则
     */
    BillingRuleDO getByChargeCode(String chargeCode);
}
