package ru.soune.nocopy.mapper;

import org.mapstruct.Mapper;
import org.mapstruct.MappingTarget;
import org.mapstruct.NullValuePropertyMappingStrategy;
import org.mapstruct.factory.Mappers;
import ru.soune.nocopy.dto.user.UserContentUpdateRequest;
import ru.soune.nocopy.entity.user.UserContent;

@Mapper(componentModel = "spring",
        nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)
public interface UserContentMapper {

    UserContentMapper INSTANCE = Mappers.getMapper(UserContentMapper.class);


    void updateEntityFromDto(UserContentUpdateRequest dto, @MappingTarget UserContent entity);
}
