/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.workjobgrade.entity;

import com.jeeplus.common.persistence.TreeEntity;
import com.jeeplus.modules.sys.entity.Office;
import com.fasterxml.jackson.annotation.JsonBackReference;
import javax.validation.constraints.NotNull;

import com.jeeplus.common.persistence.DataEntity;
import com.jeeplus.common.utils.excel.annotation.ExcelField;

/**
 * 职级类型Entity
 * @author ssrh
 * @version 2018-08-02
 */
public class WorkJobGrade extends TreeEntity<WorkJobGrade> {
	
	private static final long serialVersionUID = 1L;
	private Office office;		// 所属部门
	private String companyId;		// 所属公司
	private String no;		// 类型编号
	private String endFlag;		// 末级标记 0 有子节点 1 无子节点
	private String branchOffice;		// 分公司id
	private String state;		// 禁用状态 0 启用 1 禁用
	private Double pay;		// 职级工资
    private String isLeaf;

	public WorkJobGrade() {
		super();
	}

	public WorkJobGrade(String id){
		super(id);
	}

	@ExcelField(title="所属部门", fieldType=Office.class, value="office.name", align=2, sort=7)
	public Office getOffice() {
		return office;
	}

	public void setOffice(Office office) {
		this.office = office;
	}
	
	@ExcelField(title="所属公司", align=2, sort=8)
	public String getCompanyId() {
		return companyId;
	}

	public void setCompanyId(String companyId) {
		this.companyId = companyId;
	}
	
	@ExcelField(title="名称", align=2, sort=9)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@ExcelField(title="类型编号", align=2, sort=10)
	public String getNo() {
		return no;
	}

	public void setNo(String no) {
		this.no = no;
	}
	
	@JsonBackReference
	@ExcelField(title="父节点", align=2, sort=11)
	public WorkJobGrade getParent() {
		return parent;
	}

	public void setParent(WorkJobGrade parent) {
		this.parent = parent;
	}
	
	@ExcelField(title="末级标记 0 有子节点 1 无子节点", align=2, sort=12)
	public String getEndFlag() {
		return endFlag;
	}

	public void setEndFlag(String endFlag) {
		this.endFlag = endFlag;
	}
	
	@ExcelField(title="父节点ids", align=2, sort=13)
	public String getParentIds() {
		return parentIds;
	}

	public void setParentIds(String parentIds) {
		this.parentIds = parentIds;
	}
	
	@ExcelField(title="分公司id", align=2, sort=14)
	public String getBranchOffice() {
		return branchOffice;
	}

	public void setBranchOffice(String branchOffice) {
		this.branchOffice = branchOffice;
	}
	
	@ExcelField(title="禁用状态 0 启用 1 禁用", align=2, sort=15)
	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}
	
	@ExcelField(title="职级工资", align=2, sort=16)
	public Double getPay() {
		return pay;
	}

	public void setPay(Double pay) {
		this.pay = pay;
	}
	
	@NotNull(message="排序不能为空")
	@ExcelField(title="排序", align=2, sort=17)
	public Integer getSort() {
		return sort;
	}

	public void setSort(Integer sort) {
		this.sort = sort;
	}

    public String getIsLeaf() {
        return isLeaf;
    }

    public void setIsLeaf(String isLeaf) {
        this.isLeaf = isLeaf;
    }
}