package com.ruoyi.ss.transactionBill.service;

import com.ruoyi.ss.transactionBill.domain.bo.*;
import com.ruoyi.ss.transactionBill.domain.dto.*;
import com.ruoyi.ss.transactionBill.domain.vo.TransactionBillVO;

import java.math.BigDecimal;

/**
 * @author wjh
 * 2024/7/28
 */
public interface TransactionBillConverter {

    /**
     * 将参数转为充值BO
     */
    RechargeBO toRechargeBO(RechargeDTO dto);

    /**
     * 将参数转为提现BO
     */
    WithdrawBO toWithdrawBO(WithdrawDTO dto);

    /**
     * 转为充值支付BO
     */
    RechargePayBO toRechargePayBO(TransactionBillVO bill, Long channelId);

    RechargePayDepositBO toRechargePayDepositBO(PayDepositDTO dto);

    EndUseBO toEndUseBO(EndUseDTO dto);

    /**
     * 获取充值的电量（度）
     *
     * @param bill 订单
     */
    BigDecimal toRechargeEle(TransactionBillVO bill);

    /**
     * 获取充值的时长（秒）
     */
    long toRechargeSeconds(TransactionBillVO bill);

    /**
     * 获取订单套餐时长的秒数
     */
    long toSecondSuitTime(TransactionBillVO bill);

}
