package org.springblade.modules.sqmy.wrapper;

import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.modules.sqmy.pojo.entity.JmhInfoEntity;
import org.springblade.modules.sqmy.pojo.vo.JmhInfoVO;

import java.util.Objects;

/**
 * 每周见面会 包装类,返回视图层所需的字段
 *
 * @author wth
 * @since 2024-11-12
 */
public class JmhInfoWrapper extends BaseEntityWrapper<JmhInfoEntity, JmhInfoVO>  {

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

	@Override
	public JmhInfoVO entityVO(JmhInfoEntity jmhInfo) {
		JmhInfoVO jmhInfoVO = Objects.requireNonNull(BeanUtil.copyProperties(jmhInfo, JmhInfoVO.class));

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

		return jmhInfoVO;
	}

}
