|
|
package com.hyc.wechat.model.po;
|
|
|
|
|
|
import com.alibaba.fastjson.annotation.JSONField;
|
|
|
import com.hyc.wechat.dao.annotation.Table;
|
|
|
import com.hyc.wechat.model.po.abs.BaseEntity;
|
|
|
|
|
|
import java.math.BigInteger;
|
|
|
|
|
|
/**
|
|
|
* @author <a href="mailto:kobe524348@gmail.com">黄钰朝</a>
|
|
|
* @description 动态表的实体类,用于表示用户对朋友圈动态的各种互动状态
|
|
|
* @date 2019-05-07 18:44
|
|
|
*/
|
|
|
@Table(name = "news") // 指定该实体类对应的数据库表名为"news"
|
|
|
public class News extends BaseEntity {
|
|
|
// 用户ID,表示进行互动的用户
|
|
|
@JSONField(name = "user_id")
|
|
|
private BigInteger userId;
|
|
|
|
|
|
// 动态ID,表示互动的特定朋友圈动态
|
|
|
@JSONField(name = "moment_Id")
|
|
|
private BigInteger momentId;
|
|
|
|
|
|
// 表示用户是否对该动态点赞
|
|
|
private Boolean loved;
|
|
|
|
|
|
// 表示用户是否分享该动态
|
|
|
private Boolean shared;
|
|
|
|
|
|
// 表示用户是否查看该动态
|
|
|
private Boolean viewed;
|
|
|
|
|
|
// 表示用户是否收藏该动态
|
|
|
private Boolean collected;
|
|
|
|
|
|
/**
|
|
|
* 获取进行互动的用户ID
|
|
|
* @return 用户ID
|
|
|
*/
|
|
|
public BigInteger getUserId() {
|
|
|
return userId;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 设置进行互动的用户ID
|
|
|
* @param userId 用户ID
|
|
|
*/
|
|
|
public void setUserId(BigInteger userId) {
|
|
|
this.userId = userId;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 获取互动的特定朋友圈动态ID
|
|
|
* @return 动态ID
|
|
|
*/
|
|
|
public BigInteger getMomentId() {
|
|
|
return momentId;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 设置互动的特定朋友圈动态ID
|
|
|
* @param momentId 动态ID
|
|
|
*/
|
|
|
public void setMomentId(BigInteger momentId) {
|
|
|
this.momentId = momentId;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 获取用户是否对该动态点赞
|
|
|
* @return true表示已点赞,false表示未点赞
|
|
|
*/
|
|
|
public Boolean getLoved() {
|
|
|
return loved;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 设置用户是否对该动态点赞
|
|
|
* @param loved true表示点赞,false表示取消点赞
|
|
|
*/
|
|
|
public void setLoved(Boolean loved) {
|
|
|
this.loved = loved;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 获取用户是否分享该动态
|
|
|
* @return true表示已分享,false表示未分享
|
|
|
*/
|
|
|
public Boolean getShared() {
|
|
|
return shared;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 设置用户是否分享该动态
|
|
|
* @param shared true表示分享,false表示取消分享
|
|
|
*/
|
|
|
public void setShared(Boolean shared) {
|
|
|
this.shared = shared;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 获取用户是否查看该动态
|
|
|
* @return true表示已查看,false表示未查看
|
|
|
*/
|
|
|
public Boolean getViewed() {
|
|
|
return viewed;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 设置用户是否查看该动态
|
|
|
* @param viewed true表示查看,false表示未查看
|
|
|
*/
|
|
|
public void setViewed(Boolean viewed) {
|
|
|
this.viewed = viewed;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 获取用户是否收藏该动态
|
|
|
* @return true表示已收藏,false表示未收藏
|
|
|
*/
|
|
|
public Boolean getCollected() {
|
|
|
return collected;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 设置用户是否收藏该动态
|
|
|
* @param collected true表示收藏,false表示取消收藏
|
|
|
*/
|
|
|
public void setCollected(Boolean collected) {
|
|
|
this.collected = collected;
|
|
|
}
|
|
|
}
|