package org.springblade.modules.application.info.wrapper;

import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.modules.application.info.pojo.entity.ApplicationInfoEntity;
import org.springblade.modules.application.info.pojo.vo.ApplicationInfoVO;

import java.util.Objects;

/**
 * 应用列表 包装类,返回视图层所需的字段
 *
 * @author BladeX
 * @since 2024-10-15
 */
public class ApplicationInfoWrapper extends BaseEntityWrapper<ApplicationInfoEntity, ApplicationInfoVO> {

	public static ApplicationInfoWrapper build() {
		return new ApplicationInfoWrapper();
	}

	@Override
	public ApplicationInfoVO entityVO(ApplicationInfoEntity info) {
		ApplicationInfoVO infoVO = Objects.requireNonNull(BeanUtil.copyProperties(info, ApplicationInfoVO.class));
		//User createUser = UserCache.getUser(info.getCreateUser());
		//User updateUser = UserCache.getUser(info.getUpdateUser());
		//infoVO.setCreateUserName(createUser.getName());
		//infoVO.setUpdateUserName(updateUser.getName());
		return infoVO;
	}

}
