package org.springblade.modules.log.wrapper;

import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.modules.log.pojo.entity.LogYysdEntity;
import org.springblade.modules.log.pojo.vo.LogYysdVO;

import java.util.Objects;

/**
 * 应用商店日志 包装类,返回视图层所需的字段
 *
 * @author BladeX
 * @since 2024-10-30
 */
public class LogYysdWrapper extends BaseEntityWrapper<LogYysdEntity, LogYysdVO> {

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

	@Override
	public LogYysdVO entityVO(LogYysdEntity logYysd) {
		LogYysdVO logYysdVO = Objects.requireNonNull(BeanUtil.copyProperties(logYysd, LogYysdVO.class));

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

		return logYysdVO;
	}

}
