package com.izouma.nineth.dto.wallet;

import com.izouma.nineth.domain.WithdrawApply;
import org.springframework.beans.BeanUtils;

public class WithdrawApplyDTO extends WithdrawApply {

    public WithdrawApplyDTO(WithdrawApply source){
        BeanUtils.copyProperties(source,this);
    }

    @Override
    public String getBankNo(){
        if(super.getBankNo() != null){
            String bankNo = super.getBankNo().replaceAll("^\\w+(\\d{4})$", "***************$1");
            return bankNo;
        }

        return null;
    }


}
