You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
949 B
39 lines
949 B
package com.entity.view;
|
|
|
|
import com.entity.ForumEntity;
|
|
|
|
import com.baomidou.mybatisplus.annotations.TableName;
|
|
import org.apache.commons.beanutils.BeanUtils;
|
|
import java.lang.reflect.InvocationTargetException;
|
|
|
|
import java.io.Serializable;
|
|
|
|
|
|
/**
|
|
* 论坛表
|
|
* 后端返回视图实体辅助类
|
|
* (通常后端关联的表或者自定义的字段需要返回使用)
|
|
* @author
|
|
* @email
|
|
* @date 2023-02-21 09:46:06
|
|
*/
|
|
@TableName("forum")
|
|
public class ForumView extends ForumEntity implements Serializable {
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
public ForumView(){
|
|
}
|
|
|
|
// 接收 ForumEntity 对象的构造函数
|
|
public ForumView(ForumEntity forumEntity) {
|
|
try {
|
|
// 将ForumEntity的属性复制到当前ForumView对象
|
|
BeanUtils.copyProperties(this, forumEntity);
|
|
} catch (IllegalAccessException | InvocationTargetException e) {
|
|
// 异常处理,打印堆栈信息
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
|
|
}
|