package org.jeecg.modules.industry.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.jeecg.modules.industry.entity.Industry;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

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

@Data
public class IndustryTree {
    /**主键ID*/
    private String id;
    private String key;
    private String title;
    private String label;
    private String value;
    /**父ID*/
    private String parentId;
    /**行业名称*/
    private String name;
    /**创建人*/
    private String createBy;
    /**创建时间*/
    private Date createTime;
    /**修改人*/
    private String updateBy;
    /**修改时间*/
    private Date updateTime;

    private List<IndustryTree> children;

    public IndustryTree(Industry industry){
        this.id=industry.getId();
        this.key=industry.getId();
        this.value=industry.getId();
        this.label=industry.getName();
        this.title=industry.getName();
        this.createBy=industry.getCreateBy();
        this.createTime=industry.getCreateTime();
        this.name=industry.getName();
        this.parentId=industry.getParentId();
        this.updateBy=industry.getUpdateBy();
        this.updateTime=industry.getUpdateTime();
    }
}
