package org.springblade.modules.bq.wrapper;

import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.modules.bq.pojo.entity.BqInfoEntity;
import org.springblade.modules.bq.pojo.vo.BqInfoVO;

import java.util.Objects;

/**
 * 标签表 包装类,返回视图层所需的字段
 *
 * @author wth
 * @since 2024-11-25
 */
public class BqInfoWrapper extends BaseEntityWrapper<BqInfoEntity, BqInfoVO> {

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

	@Override
	public BqInfoVO entityVO(BqInfoEntity bqInfo) {
		BqInfoVO bqInfoVO = Objects.requireNonNull(BeanUtil.copyProperties(bqInfo, BqInfoVO.class));

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

		return bqInfoVO;
	}

}
