package com.qsoft.rs.sincoar.dominio.mapper;

import com.qsoft.rs.sincoar.model.MdUserPrivileges;
import com.qsoft.rs.sincoar.dto.MdUserPrivilegesDTO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

@Mapper
public interface MdUserPrivilegesMapper {

    MdUserPrivilegesMapper INSTANCE = Mappers.getMapper(MdUserPrivilegesMapper.class);
    @Mapping(source = "privilegeIdFk", target = "privilegeIdFk.id")
    @Mapping(source = "userIdFk", target = "userIdFk.id")
    MdUserPrivileges getEntidad(MdUserPrivilegesDTO mdUserPrivileges);
    
    @Mapping(target = "privilegeIdFk", source = "privilegeIdFk.id")
    @Mapping(target = "userIdFk", source = "userIdFk.id")
    MdUserPrivilegesDTO getDto(MdUserPrivileges mdUserPrivileges);

}