package com.palmnest.model.dinner;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * @Author 黄笑天
 * @Description 部门表(tb_user表用户所属部门)
 * @Date 2019/1/3 16:58
 **/
@Entity
@Table(name = "tb_department")
public class Department implements Serializable {

	private static final long serialVersionUID = 3136436040946645460L;

	private Long    id;
	private String  name;// 部门名称
	private String  shortName;// 部门简称
	private Date    createTime;// 创建时间
	private Long    creator;// 创建者
	private Date    modifyTime;// 修改时间
	private Long    modifier;// 修改人
	private Integer orgId;// 所属项目
	private Integer virId;// 所属企业
	private Integer orderNum;// 部门排序号
	private Integer isEnabled;// 是否可用 0-不可用 1-可用
	private String  address;// 地址

	
	/**
	 *增加层级关系字段rank,企业id-一级部门id-二级部门id-三级部门id-四级部门id-5级部门id;以-分隔
	 */
	private String rank;
	/**
	 *上级id
	 */
	private Integer parentid;
	/**
	 * 增加level字段，用于识别级别，企业为0，不在这个表中，level从1开始
	 */
	private Integer levels;
	
	
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "id", unique = true, nullable = false)
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getShortName() {
		return shortName;
	}

	public void setShortName(String shortName) {
		this.shortName = shortName;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Long getCreator() {
		return creator;
	}

	public void setCreator(Long creator) {
		this.creator = creator;
	}

	public Date getModifyTime() {
		return modifyTime;
	}

	public void setModifyTime(Date modifyTime) {
		this.modifyTime = modifyTime;
	}

	public Long getModifier() {
		return modifier;
	}

	public void setModifier(Long modifier) {
		this.modifier = modifier;
	}

	public Integer getOrgId() {
		return orgId;
	}

	public void setOrgId(Integer orgId) {
		this.orgId = orgId;
	}

	public Integer getVirId() {
		return virId;
	}

	public void setVirId(Integer virId) {
		this.virId = virId;
	}

	public Integer getOrderNum() {
		return orderNum;
	}

	public void setOrderNum(Integer orderNum) {
		this.orderNum = orderNum;
	}

	public Integer getIsEnabled() {
		return isEnabled;
	}

	public void setIsEnabled(Integer isEnabled) {
		this.isEnabled = isEnabled;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getRank() {
		return rank;
	}

	public void setRank(String rank) {
		this.rank = rank;
	}

	public Integer getParentid() {
		return parentid;
	}

	public void setParentid(Integer parentid) {
		this.parentid = parentid;
	}

	public Integer getLevels() {
		return levels;
	}

	public void setLevels(Integer levels) {
		this.levels = levels;
	}	
	
}
