content: package com.taotao.manage.pojo;
  
  import javax.persistence.GeneratedValue;
  import javax.persistence.GenerationType;
  import javax.persistence.Id;
  import javax.persistence.Table;
  
  @Table(name = "tb_item_cat")
  public class ItemCat extends BasePojo {
  
      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY)
      private Long id;
  
      private Long parentId;
  
      private String name;
  
      private Integer status;
  
      private Integer sortOrder;
  
      private Boolean isParent;
      /**
       * 为了easyUI的tree组件的显示，添加text属性
       * @return
       */
      public String getText() {
      	return this.getName();
  	}
      /**
       * tree组件用于显示文件夹还是文件，closd：文件夹，open：文件
       * @return
       */
      public String getState(){
      	return this.getIsParent() ? "closed" : "open";
      }
      public Long getId() {
          return id;
      }
  
      public void setId(Long id) {
          this.id = id;
      }
  
      public Long getParentId() {
          return parentId;
      }
  
      public void setParentId(Long parentId) {
          this.parentId = parentId;
      }
  
      public String getName() {
          return name;
      }
  
      public void setName(String name) {
          this.name = name;
      }
  
      public Integer getStatus() {
          return status;
      }
  
      public void setStatus(Integer status) {
          this.status = status;
      }
  
      public Integer getSortOrder() {
          return sortOrder;
      }
  
      public void setSortOrder(Integer sortOrder) {
          this.sortOrder = sortOrder;
      }
  
      public Boolean getIsParent() {
          return isParent;
      }
  
      public void setIsParent(Boolean isParent) {
          this.isParent = isParent;
      }
  
  }
  