package com.viettel.campaign.mapper;

import com.viettel.campaign.model.ccms_full.CampaignAgent;
import com.viettel.campaign.web.dto.CampaignAgentsDTO;

public class CampaignAgentsMapper extends BaseMapper<CampaignAgent, CampaignAgentsDTO> {
    @Override
    public CampaignAgentsDTO toDtoBean(CampaignAgent campaignAgent) {
        CampaignAgentsDTO obj = new CampaignAgentsDTO();
        obj.setAgentId(campaignAgent.getAgentId());
        obj.setCampaignAgentId(campaignAgent.getCampaignAgentId());
        obj.setCampaignId(campaignAgent.getCampaignId());
        obj.setCompanySiteId(campaignAgent.getCompanySiteId());
        obj.setFilterType(campaignAgent.getFilterType());
        obj.setReSchedule(campaignAgent.getReSchedule());
        obj.setStatus(campaignAgent.getStatus());
        return obj;
    }

    @Override
    public CampaignAgent toPersistenceBean(CampaignAgentsDTO dtoBean) {
        CampaignAgent obj = new CampaignAgent();
        obj.setAgentId(dtoBean.getAgentId());
        obj.setCampaignAgentId(dtoBean.getCampaignAgentId());
        obj.setCampaignId(dtoBean.getCampaignId());
        obj.setCompanySiteId(dtoBean.getCompanySiteId());
        obj.setFilterType(dtoBean.getFilterType());
        obj.setReSchedule(dtoBean.getReSchedule());
        obj.setStatus(dtoBean.getStatus());
        return obj;
    }
}
