package com.viettel.campaign.mapper;

import com.viettel.campaign.model.ccms_full.CampaignAgent;
import com.viettel.campaign.web.dto.CampaignAgentsDTO;
import org.modelmapper.ModelMapper;
import org.springframework.beans.factory.annotation.Autowired;

public class CampaignAgentsMapper extends BaseMapper<CampaignAgent, CampaignAgentsDTO> {

    @Autowired
    ModelMapper modelMapper;

    @Override
    public CampaignAgentsDTO toDtoBean(CampaignAgent campaignAgent) {
        return modelMapper.map(campaignAgent, CampaignAgentsDTO.class);
    }

    @Override
    public CampaignAgent toPersistenceBean(CampaignAgentsDTO dtoBean) {
        return modelMapper.map(dtoBean, CampaignAgent.class);
    }
}
