package com.seer.teach.pay.admin.recharge.convert;


import com.seer.teach.pay.admin.recharge.controller.resp.CoinRechargeDetailListResp;
import com.seer.teach.pay.admin.recharge.controller.resp.CoinRechargeResp;
import com.seer.teach.pay.entity.CoinRechargeEntity;
import com.seer.teach.user.api.dto.UserInfoDTO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper(componentModel = "spring")
public interface CoinRechargeConvert {

    CoinRechargeConvert INSTANCE = Mappers.getMapper(CoinRechargeConvert.class);

    CoinRechargeResp convertOne(CoinRechargeEntity coinRechargeEntity);

    List<CoinRechargeResp> convertList(List<CoinRechargeEntity> list);

    List<CoinRechargeDetailListResp> convertListTwo(List<CoinRechargeEntity> list);

    @Mapping(source = "coinRechargeEntity.id", target = "id")
    CoinRechargeResp convertOne(CoinRechargeEntity coinRechargeEntity, UserInfoDTO userInfoDTO);
}
