package org.springblade.modules.xlfk.wrapper;

import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.modules.xlfk.pojo.entity.XlfkEntity;
import org.springblade.modules.xlfk.pojo.vo.XlfkVO;

import java.util.Objects;

/**
 * 巡逻防控 包装类,返回视图层所需的字段
 *
 * @author BladeX
 * @since 2024-11-06
 */
public class XlfkWrapper extends BaseEntityWrapper<XlfkEntity, XlfkVO> {

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

	@Override
	public XlfkVO entityVO(XlfkEntity xlfk) {
		XlfkVO xlfkVO = Objects.requireNonNull(BeanUtil.copyProperties(xlfk, XlfkVO.class));

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

		return xlfkVO;
	}

}
