com.quhaodian.bbs.data.entity.Forum Maven / Gradle / Ivy
package com.quhaodian.bbs.data.entity;
import com.quhaodian.data.entity.CatalogEntity;
import com.quhaodian.user.data.entity.UserInfo;
import javax.persistence.*;
/**
* 论坛模块
*
* Created by cng19 on 2017/6/22.
*/
@Entity
@Table(name = "bbs_froum")
public class Forum extends CatalogEntity {
/**
* 用户
*/
@ManyToOne(fetch = FetchType.LAZY)
private UserInfo user;
/**
* 数量
*/
private Long nums;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "pid")
private Forum parent;
public Forum getParent() {
return parent;
}
public void setParent(Forum parent) {
this.parent = parent;
}
public Integer getParentId() {
if (parent != null) {
return parent.getId();
} else {
return null;
}
}
public UserInfo getUser() {
return user;
}
public void setUser(UserInfo user) {
this.user = user;
}
public Long getNums() {
return nums;
}
public void setNums(Long nums) {
this.nums = nums;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy