package com.xunhong.erp.turbo.user.app.assembler;

import com.xunhong.erp.turbo.api.user.dto.vo.UserAuthVO;
import com.xunhong.erp.turbo.user.domain.entity.UserAuth;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.NullValueCheckStrategy;

@Mapper(componentModel = "spring", nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface UserAuthAssembler {
	@Mapping(target = "userRoleVOList", ignore = true)
	@Mapping(target = "permissionVOList", ignore = true)
	@Mapping(target = "meta", ignore = true)
	@Mapping(target = "userVO", source = "userAuth.user")
	UserAuthVO toUserAuthVO(UserAuth userAuth);
}
