package org.springblade.modules.pfInfo.wrapper;

import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.modules.pfInfo.entity.PfInfoEntity;
import org.springblade.modules.pfInfo.vo.PfInfoVO;

import java.util.Objects;

/**
 * 手动打分 包装类,返回视图层所需的字段
 *
 * @author BladeX
 * @since 2023-07-13
 */
public class PfInfoWrapper extends BaseEntityWrapper<PfInfoEntity, PfInfoVO> {

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

	@Override
	public PfInfoVO entityVO(PfInfoEntity info) {
		PfInfoVO infoVO = Objects.requireNonNull(BeanUtil.copy(info, PfInfoVO.class));

		//User createUser = UserCache.getUser(info.getCreateUser());
		//User updateUser = UserCache.getUser(info.getUpdateUser());
		//infoVO.setCreateUserName(createUser.getName());
		//infoVO.setUpdateUserName(updateUser.getName());

		return infoVO;
	}


}
