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.
j2ee/ForumModel.java

145 lines
2.7 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package com.entity.model;
import com.entity.ForumEntity;
import java.io.Serializable; // 导入可序列化接口
/**
* 论坛表
* 接收传参的实体类
* 实际开发中配合移动端接口开发手动去掉些没用的字段后端一般用entity就够用了
* 取自ModelAndView的model名称
*
* @author
* @email
* @date 2023-02-21 09:46:06
*/
public class ForumModel implements Serializable {
private static final long serialVersionUID = 1L; // 版本控制
/**
* 帖子内容
*/
private String content; // 存放帖子内容
/**
* 父节点id
*/
private Long parentid; // 存放父节点ID
/**
* 用户id
*/
private Long userid; // 存放用户ID
/**
* 用户名
*/
private String username; // 存放用户名
/**
* 头像
*/
private String avatarurl; // 存放用户头像URL
/**
* 状态
*/
private String isdone; // 存放帖子状态(例如:已完成/未完成等)
/**
* 设置:帖子内容
* @param content 帖子内容
*/
public void setContent(String content) {
this.content = content; // 设置帖子内容
}
/**
* 获取:帖子内容
* @return 帖子内容
*/
public String getContent() {
return content;
}
/**
* 设置父节点id
* @param parentid 父节点ID
*/
public void setParentid(Long parentid) {
this.parentid = parentid; // 设置父节点ID
}
/**
* 获取父节点id
* @return 父节点ID
*/
public Long getParentid() {
return parentid; // 返回父节点ID
}
/**
* 设置用户id
* @param userid 用户ID
*/
public void setUserid(Long userid) {
this.userid = userid; // 设置用户ID
}
/**
* 获取用户id
* @return 用户ID
*/
public Long getUserid() {
return userid;
}
/**
* 设置:用户名
* @param username 用户名
*/
public void setUsername(String username) {
this.username = username; // 设置用户名
}
/**
* 获取:用户名
* @return 用户名
*/
public String getUsername() {
return username;
}
/**
* 设置:头像
* @param avatarurl 头像URL
*/
public void setAvatarurl(String avatarurl) {
this.avatarurl = avatarurl; // 设置头像URL
}
/**
* 获取:头像
* @return 头像URL
*/
public String getAvatarurl() {
return avatarurl;
}
/**
* 设置:状态
* @param isdone 帖子状态
*/
public void setIsdone(String isdone) {
this.isdone = isdone; // 设置帖子状态
}
/**
* 获取:状态
* @return 帖子状态
*/
public String getIsdone() {
return isdone;
}
}