package com.viettel.campaign.mapper;

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

public class CampaignAgentMapper extends BaseMapper<CampaignAgent, CampaignAgentDTO> {
    @Override
    public CampaignAgentDTO toDtoBean(CampaignAgent campaignAgent) {
        CampaignAgentDTO obj = new CampaignAgentDTO();
        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(CampaignAgentDTO 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;
    }
}
