 package org.sky.scientific.pojo.vo;

 import com.fasterxml.jackson.annotation.JsonInclude;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import org.sky.core.tool.node.INode;
 import org.sky.scientific.pojo.entity.Subject;

 import java.io.Serial;
 import java.util.ArrayList;
 import java.util.List;

 /**
  * 视图实体类
  *
   */
 @Data
 @EqualsAndHashCode(callSuper = true)
 @Schema(description = "Subject对象")
 public class SubjectVO extends Subject implements INode<SubjectVO> {
     @Serial
     private static final long serialVersionUID = 1L;

	 @JsonInclude(JsonInclude.Include.NON_EMPTY)
	 private Boolean hasChildren;

     @JsonInclude(JsonInclude.Include.NON_EMPTY)
     private List<SubjectVO> children;

     @Override
     public List<SubjectVO> getChildren() {
         if (this.children == null) {
             this.children = new ArrayList<>();
         }
         return this.children;
     }
//
     private String parentName;

//	 @Schema(description = "上级科目列表")
//	 private List<SubjectVO> parentSubjects = new ArrayList<>();
 }
