package com.lz.modules.app.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 部门与员工关联表
 *
 * @author fumeiai
 * @email fumeiai@linzikg.com
 * @date 2020-04-29 20:59:20
 */
@Data
@TableName("lz_departments_staff_relate")
public class DepartmentsStaffRelateEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	//自增主键
	@TableId(value = "id", type = IdType.AUTO)
	private Long id;
	//是否删除状态，1：删除，0：有效
	private Integer isDelete;
	//创建时间
	private Date createTime;
	//更新时间
	private Date updateTime;
	//部门id
	private String departmentId;
	//员工id
	private Long staffId;
	//第几级部门
	private Integer level;
	/***
	 * 是否为部门领导
	 */
	private Integer isLeader;
	//获取mapkey
	public String getKey(){
		return departmentId + "_" + staffId;
	}

	/**
	 * 自增主键
	 * @return
	 */
	public Long getId() {
		return id;
	}
	/**
	 * 自增主键
	 * @param id
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * 是否删除状态，1：删除，0：有效
	 * @return
	 */
	public Integer getIsDelete() {
		return isDelete;
	}
	/**
	 * 是否删除状态，1：删除，0：有效
	 * @param isDelete
	 */
	public void setIsDelete(Integer isDelete) {
		this.isDelete = isDelete;
	}

	/**
	 * 创建时间
	 * @return
	 */
	public Date getCreateTime() {
		return createTime;
	}
	/**
	 * 创建时间
	 * @param createTime
	 */
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	/**
	 * 更新时间
	 * @return
	 */
	public Date getUpdateTime() {
		return updateTime;
	}
	/**
	 * 更新时间
	 * @param updateTime
	 */
	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	/**
	 * 部门id
	 * @return
	 */
	public String getDepartmentId() {
		return departmentId;
	}
	/**
	 * 部门id
	 * @param departmentId
	 */
	public void setDepartmentId(String departmentId) {
		this.departmentId = departmentId;
	}

	/**
	 * 员工id
	 * @return
	 */
	public Long getStaffId() {
		return staffId;
	}
	/**
	 * 员工id
	 * @param staffId
	 */
	public void setStaffId(Long staffId) {
		this.staffId = staffId;
	}

	/**
	 * 第几级部门
	 * @return
	 */
	public Integer getLevel() {
		return level;
	}
	/**
	 * 第几级部门
	 * @param level
	 */
	public void setLevel(Integer level) {
		this.level = level;
	}

	public static long getSerialVersionUID() {
		return serialVersionUID;
	}

	public Integer getIsLeader() {
		return isLeader;
	}

	public void setIsLeader(Integer isLeader) {
		this.isLeader = isLeader;
	}

	@Override
	public String toString() {
		return "DepartmentsStaffRelate{" +
				",id=" + id +
				",isDelete=" + isDelete +
				",createTime=" + createTime +
				",updateTime=" + updateTime +
				",departmentId=" + departmentId +
				",staffId=" + staffId +
				",level=" + level +
				"}";
	}

}
