package it.integry.integrywmsnative.core.mapper;

import it.integry.integrywmsnative.core.data_store.db.entity.InventarioRowRoomDTO;
import it.integry.integrywmsnative.core.model.MtbInvenr;

public class InventarioRowMapper extends BaseMapper<MtbInvenr, InventarioRowRoomDTO> {

    @Override
    public InventarioRowRoomDTO mapRestToRoom(MtbInvenr inputData) {
        if(inputData == null) return null;

        var data = new InventarioRowRoomDTO();
        data.setCodMart(inputData.getCodMart());
        data.setPartitaMag(inputData.getPartitaMag());
        data.setQta(inputData.getQtaInv());
        data.setNumConf(inputData.getNumConf());
        data.setDataOraInv(inputData.getDataOraInv());
        data.setScanCodBarre(inputData.getScanCodBarre());
        data.setZona(inputData.getZona());
        return data;
    }

    @Override
    public MtbInvenr mapRoomToRest(InventarioRowRoomDTO inputData) {
        if(inputData == null) return null;

        var data = new MtbInvenr();
        data.setCodMart(inputData.getCodMart());
        data.setPartitaMag(inputData.getPartitaMag());
        data.setQtaInv(inputData.getQta());
        data.setNumConf(inputData.getNumConf());
        data.setDataOraInv(inputData.getDataOraInv());
        data.setScanCodBarre(inputData.getScanCodBarre());
        data.setZona(inputData.getZona());
        return data;
    }
}
