package com.postusermiddlemodule.bean;
import java.io.Serializable;
import com.postmodule.bean.TbPost;
import com.postmodule.dao.TbPostDAO;
import com.usersmodule.bean.TbUsers;
import com.usersmodule.dao.TbUsersDAO;
public class TbPostUserMiddle implements Serializable{
private int postUserMiddleId;
private int postId;
private TbPost tbPost;
private int userId;
private TbUsers tbUsers;
private String createTime;
public int getPostUserMiddleId(){
return postUserMiddleId;
}
public void setPostUserMiddleId(int postUserMiddleId){
this.postUserMiddleId = postUserMiddleId;
}
public int getPostId(){
return postId;
}
public void setPostId(int postId){
this.postId = postId;
this.tbPost=new TbPostDAO().getTbPostByPostId(postId);
}
public int getUserId(){
return userId;
}
public void setUserId(int userId){
this.userId = userId;
this.tbUsers=new TbUsersDAO().getTbUsersByUserId(userId);
}
public String getCreateTime(){
return createTime;
}
public void setCreateTime(String createTime){
this.createTime = createTime;
}
public TbPost getTbPost() {
return tbPost;
}
public void setTbPost(TbPost tbPost) {
this.tbPost = tbPost;
}
public TbUsers getTbUsers() {
return tbUsers;
}
public void setTbUsers(TbUsers tbUsers) {
this.tbUsers = tbUsers;
}
public TbPostUserMiddle(){
}
public TbPostUserMiddle(int postId,int userId,String createTime){
this.postId = postId;
this.userId = userId;
this.createTime = createTime;
}
public TbPostUserMiddle(int postUserMiddleId,int postId,int userId,String createTime){
this.postUserMiddleId = postUserMiddleId;
this.postId = postId;
this.userId = userId;
this.createTime = createTime;
}
}