package com.r11.tools.mappers;

import com.r11.tools.model.MockedMessage;
import com.r11.tools.model.MockedMessageDto;
import org.mapstruct.*;

/**
 * Creates key value for redis entry
 * @author Rafał Źukowicz
 */
@Mapper
public interface MockedMessageMapper {
    @Mapping( target = "compositePrimaryKey", expression = "java(mockedMessageDto.getClientUUID() + \"_\"" +
            " + mockedMessageDto.getMockedResponseId())")
    MockedMessage mockedMessageDtoToMockedMessage(MockedMessageDto mockedMessageDto);
    MockedMessageDto mockedMessageToMockedMessageDto(MockedMessage mockedMessage);
}
