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.FzrhyInfoEntity;
import org.springblade.modules.sqmy.pojo.vo.FzrhyInfoVO;

import java.util.Objects;

/**
 * 每月安全负责人会议 包装类,返回视图层所需的字段
 *
 * @author wth
 * @since 2024-11-12
 */
public class FzrhyInfoWrapper extends BaseEntityWrapper<FzrhyInfoEntity, FzrhyInfoVO>  {

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

	@Override
	public FzrhyInfoVO entityVO(FzrhyInfoEntity fzrhyInfo) {
		FzrhyInfoVO fzrhyInfoVO = Objects.requireNonNull(BeanUtil.copyProperties(fzrhyInfo, FzrhyInfoVO.class));

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

		return fzrhyInfoVO;
	}

}
