package com.yh.saas.platform.entity.view;

import java.util.List;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.winsea.svc.base.base.util.tree.ITreeItem;

import lombok.Data;

@Data
public class CommonRoleMenuView implements ITreeItem<CommonRoleMenuView> {

	private String name;

	@JsonIgnore
	private String parentName;

	private List<CommonRoleMenuView> children;

	@JsonIgnore
	@Override
	public Object getId() {
		return name;
	}

	@Override
	public void setId(Object id) {
		this.name = (String) id;
	}

	@JsonIgnore
	@Override
	public String getLabel() {
		return null;
	}

	@Override
	public void setLabel(String label) {
		// do nothing
	}

	@JsonIgnore
	@Override
	public Object getParentId() {
		return parentName;
	}

	@Override
	public void setParentId(Object parentId) {
		this.parentName = (String) parentId;
	}

	@JsonIgnore
	@Override
	public Integer getIndex() {
		return 1;
	}

	@Override
	public void setIndex(Integer index) {
		// do nothing
	}
}
