package com.emonster.taroaichat.service.mapper;

import com.emonster.taroaichat.domain.TarotSession;
import com.emonster.taroaichat.domain.UserProfile;
import com.emonster.taroaichat.service.dto.TarotSessionDTO;
import com.emonster.taroaichat.service.dto.UserProfileDTO;
import org.mapstruct.*;

/**
 * Mapper for the entity {@link TarotSession} and its DTO {@link TarotSessionDTO}.
 */
@Mapper(componentModel = "spring")
public interface TarotSessionMapper extends EntityMapper<TarotSessionDTO, TarotSession> {
    @Mapping(target = "userProfile", source = "userProfile", qualifiedByName = "userProfilePhone")
    TarotSessionDTO toDto(TarotSession s);

    @Named("userProfilePhone")
    @BeanMapping(ignoreByDefault = true)
    @Mapping(target = "id", source = "id")
    @Mapping(target = "phone", source = "phone")
    UserProfileDTO toDtoUserProfilePhone(UserProfile userProfile);
}
