package com.departmodule.bean;
import java.io.Serializable;
import com.departmodule.dao.TbDepartDAO;
public class TbDepart implements Serializable{
private int departId;
private String departName;
private int parentDepartId;
private TbDepart tbDepartParent;
private String departMemo;
private String createTime;
public int getDepartId(){
return departId;
}
public void setDepartId(int departId){
this.departId = departId;
}
public String getDepartName(){
return departName;
}
public void setDepartName(String departName){
this.departName = departName;
}
public int getParentDepartId(){
return parentDepartId;
}
public void setParentDepartId(int parentDepartId){
this.parentDepartId = parentDepartId;
this.tbDepartParent=this.departId==parentDepartId?this:new TbDepartDAO().getTbDepartByDepartId(parentDepartId);
}
public String getDepartMemo(){
return departMemo;
}
public void setDepartMemo(String departMemo){
this.departMemo = departMemo;
}
public String getCreateTime(){
return createTime;
}
public void setCreateTime(String createTime){
this.createTime = createTime;
}
public TbDepart getTbDepartParent() {
return tbDepartParent;
}
public void setTbDepartParent(TbDepart tbDepartParent) {
this.tbDepartParent = tbDepartParent;
}
public TbDepart(){
}
public TbDepart(String departName,int parentDepartId,String departMemo,String createTime){
this.departName = departName;
this.parentDepartId = parentDepartId;
this.departMemo = departMemo;
this.createTime = createTime;
}
public TbDepart(int departId,String departName,int parentDepartId,String departMemo,String createTime){
this.departId = departId;
this.departName = departName;
this.parentDepartId = parentDepartId;
this.departMemo = departMemo;
this.createTime = createTime;
}
}