package com.ssm.model.system;

import java.util.Date;
import java.util.List;

import com.ssm.util.page.BaseEntity;

public class SysMenu extends BaseEntity{
    /**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private String orderby;

    private String icon;

    private String menustate;

    private Integer menuid;

    protected String menucnname;

    protected String menuenname;
    protected String pmenucnname;
    

	private String menuurl;

    private String actionname;

    private Integer parentid;
    private SysMenu pMenu;


	private Boolean isenable;

    private Integer createduserid;
    
    private String createdusername;

    private Date createddatetime;

    private Integer lastupdateuserid;

    private Date lastupdatedatetime;

    private Boolean isdelete;

    private Integer level;

    private String menutype;
    
    public SysMenu getpMenu() {
  		return pMenu;
  	}

  	public void setpMenu(SysMenu pMenu) {
  		this.pMenu = pMenu;
  	}
    
    public String getPmenucnname() {
		return pmenucnname;
	}

	public void setPmenucnname(String pmenucnname) {
		this.pmenucnname = pmenucnname;
	}

	public String getCreatedusername() {
		return createdusername;
	}

	public void setCreatedusername(String createdusername) {
		this.createdusername = createdusername;
	}

    public Integer getMenuid() {
        return menuid;
    }

    public void setMenuid(Integer menuid) {
        this.menuid = menuid;
    }

    public String getMenucnname() {
        return menucnname;
    }

    public void setMenucnname(String menucnname) {
        this.menucnname = menucnname == null ? null : menucnname.trim();
    }


	public String getMenuenname() {
        return menuenname;
    }

    public void setMenuenname(String menuenname) {
        this.menuenname = menuenname == null ? null : menuenname.trim();
    }

    public String getMenuurl() {
        return menuurl;
    }

    public void setMenuurl(String menuurl) {
        this.menuurl = menuurl == null ? null : menuurl.trim();
    }

    public String getActionname() {
        return actionname;
    }

    public void setActionname(String actionname) {
        this.actionname = actionname == null ? null : actionname.trim();
    }

    public Integer getParentid() {
        return parentid;
    }

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

    public Boolean getIsenable() {
        return isenable;
    }

    public void setIsenable(Boolean isenable) {
        this.isenable = isenable;
    }

    public Integer getCreateduserid() {
        return createduserid;
    }

    public void setCreateduserid(Integer createduserid) {
        this.createduserid = createduserid;
    }

    public Date getCreateddatetime() {
        return createddatetime;
    }

    public void setCreateddatetime(Date createddatetime) {
        this.createddatetime = createddatetime;
    }

    public Integer getLastupdateuserid() {
        return lastupdateuserid;
    }

    public void setLastupdateuserid(Integer lastupdateuserid) {
        this.lastupdateuserid = lastupdateuserid;
    }

    public Date getLastupdatedatetime() {
        return lastupdatedatetime;
    }

    public void setLastupdatedatetime(Date lastupdatedatetime) {
        this.lastupdatedatetime = lastupdatedatetime;
    }

    public Boolean getIsdelete() {
        return isdelete;
    }

    public void setIsdelete(Boolean isdelete) {
        this.isdelete = isdelete;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public String getMenutype() {
        return menutype;
    }

    public void setMenutype(String menutype) {
        this.menutype = menutype == null ? null : menutype.trim();
    }
    
    
	List<SysMenu> childMenu;	
    

    public SysMenu(String enName, String cnName) {
    	this.menuenname = enName;
    	this.menucnname = cnName;
	}

	public SysMenu() {
	}

	public List<SysMenu> getChildMenu() {
		return childMenu;
	}

	public void setChildMenu(List<SysMenu> childMenu) {
		this.childMenu = childMenu;
	}

    
    public String getOrderby() {
        return orderby;
    }

    public void setOrderby(String orderby) {
        this.orderby = orderby == null ? null : orderby.trim();
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon == null ? null : icon.trim();
    }

    public String getMenustate() {
        return menustate;
    }

    public void setMenustate(String menustate) {
        this.menustate = menustate == null ? null : menustate.trim();
    }
    
    /**
     * 重写 equals 方法, 在list中去除 重复项
     */
	@Override
	public boolean equals(Object obj) {
		if(obj instanceof SysMenu) {
			return ((SysMenu) obj).getMenuid().toString().equals(this.getMenuid().toString());
		} else
			return false;
	}

	
}