package org.jeecg.modules.projectManagement.entity;

import org.jeecg.modules.basedata.entity.FdContractClass;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class FdContractClassTree implements Serializable {
    private static final long serialVersionUID = 1L;

	/** 对应BmSupplierClass中的id字段,前端数据树中的key*/
	private String key;

	/** 对应BmSupplierClass中的id字段,前端数据树中的value*/
	private String value;

	/** 对应BmSupplierClass.name字段,前端数据树中的title*/
	private String title;
	/** 是否叶子节点*/
	private boolean isLeaf;

	private String code;
	private String enable;
	private String delFlag;
	private String createBy;
	private Date createTime;
	private String updateBy;
	private Date updateTime;
	private String memo;
	private String def1;
	private String def2;
	private String def3;
	private String def4;
	private String def5;
	private String parentId;
	private String parentIds;

	/**外加字段 */
	private List<FdContractClassTree> children = new ArrayList<>();

	public FdContractClassTree() { }

	public FdContractClassTree(FdContractClass fdContractClass) {
		this.key = fdContractClass.getId();
		this.value = fdContractClass.getId();
		this.title = fdContractClass.getName();

		this.code = fdContractClass.getCode();
		this.enable = fdContractClass.getEnable();
		this.delFlag = fdContractClass.getDelFlag();
		this.createBy = fdContractClass.getCreateBy();
		this.createTime = fdContractClass.getCreateTime();
		this.updateBy = fdContractClass.getUpdateBy();
		this.updateTime = fdContractClass.getUpdateTime();
		this.memo = fdContractClass.getMemo();
		this.def1 = fdContractClass.getDef1();
		this.def2 = fdContractClass.getDef2();
		this.def3 = fdContractClass.getDef3();
		this.def4 = fdContractClass.getDef4();
		this.def5 = fdContractClass.getDef5();
		this.parentId = fdContractClass.getParentId();
		this.parentIds = fdContractClass.getParentIds();
	}

	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public boolean getIsLeaf() {
		return isLeaf;
	}

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

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getEnable() {
		return enable;
	}

	public void setEnable(String enable) {
		this.enable = enable;
	}

	public String getDelFlag() {
		return delFlag;
	}

	public void setDelFlag(String delFlag) {
		this.delFlag = delFlag;
	}

	public String getCreateBy() {
		return createBy;
	}

	public void setCreateBy(String createBy) {
		this.createBy = createBy;
	}

	public Date getCreateTime() {
		return createTime;
	}

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

	public String getUpdateBy() {
		return updateBy;
	}

	public void setUpdateBy(String updateBy) {
		this.updateBy = updateBy;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public String getMemo() {
		return memo;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}

	public String getDef1() {
		return def1;
	}

	public void setDef1(String def1) {
		this.def1 = def1;
	}

	public String getDef2() {
		return def2;
	}

	public void setDef2(String def2) {
		this.def2 = def2;
	}

	public String getDef3() {
		return def3;
	}

	public void setDef3(String def3) {
		this.def3 = def3;
	}

	public String getDef4() {
		return def4;
	}

	public void setDef4(String def4) {
		this.def4 = def4;
	}

	public String getDef5() {
		return def5;
	}

	public void setDef5(String def5) {
		this.def5 = def5;
	}

	public String getParentId() {
		return parentId;
	}

	public void setParentId(String parentId) {
		this.parentId = parentId;
	}

	public String getParentIds() {
		return parentIds;
	}

	public void setParentIds(String parentIds) {
		this.parentIds = parentIds;
	}

	public List<FdContractClassTree> getChildren() {
		return children;
	}

	public void setChildren(List<FdContractClassTree> children) {
		if (children==null){
			this.isLeaf=true;
		}
		this.children = children;
	}

}
