package com.ruoyi.interfaces.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.interfaces.domain.vo.MdModelInfoVo;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

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

/**
 * 树状目录对象 pt_tree_cate
 * 
 * @author 朱得糠
 * @date 2025-07-29
 */
public class PtTreeCate extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private String treeId;

    /** 树类型 */
    @Excel(name = "树类型")
    private String treeType;

    /** 父节点序号 */
    @Excel(name = "父节点序号")
    private String treePid;
    private PtService service;

    /** 名称 */
    @Excel(name = "名称")
    private String itemName;

    /** 排序 */
    @Excel(name = "排序")
    private Long itemNo;

    /** 备注 */
    @Excel(name = "备注")
    private String itemNotes;

    /** 编辑时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "编辑时间")
    private Date modifyby;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "创建时间")
    private Date createby;

    private String nodeType;

    private List<PtTreeCate> children = new ArrayList<PtTreeCate>();

    public PtTreeCate(String mdid, String cateid, String name, String model,PtService service) {
        this.treeId=mdid;
        this.treePid=cateid;
        this.itemName=name;
        this.nodeType=model;
        this.service=service;
    }
    public PtTreeCate(String mdid, String cateid, String name, String model) {
        this.treeId=mdid;
        this.treePid=cateid;
        this.itemName=name;
        this.nodeType=model;
    }


    public PtService getService() {
        return service;
    }

    public void setService(PtService service) {
        this.service = service;
    }

    public String getNodeType() {
        return nodeType;
    }

    public void setNodeType(String nodeType) {
        this.nodeType = nodeType;
    }

    public List<PtTreeCate> getChildren() {
        return children;
    }

    public void setChildren(List<PtTreeCate> children) {
        this.children = children;
    }

    public Date getCreateby() {
        return createby;
    }

    public void setCreateby(Date createby) {
        this.createby = createby;
    }

    public void setTreeId(String treeId)
    {
        this.treeId = treeId;
    }

    public String getTreeId() 
    {
        return treeId;
    }
    public void setTreeType(String treeType) 
    {
        this.treeType = treeType;
    }

    public String getTreeType() 
    {
        return treeType;
    }
    public void setTreePid(String treePid) 
    {
        this.treePid = treePid;
    }

    public String getTreePid() 
    {
        return treePid;
    }
    public void setItemName(String itemName) 
    {
        this.itemName = itemName;
    }

    public String getItemName() 
    {
        return itemName;
    }
    public void setItemNo(Long itemNo) 
    {
        this.itemNo = itemNo;
    }

    public Long getItemNo() 
    {
        return itemNo;
    }
    public void setItemNotes(String itemNotes) 
    {
        this.itemNotes = itemNotes;
    }

    public String getItemNotes() 
    {
        return itemNotes;
    }
    public void setModifyby(Date modifyby)
    {
        this.modifyby = modifyby;
    }

    public Date getModifyby()
    {
        return modifyby;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("treeId", getTreeId())
            .append("treeType", getTreeType())
            .append("treePid", getTreePid())
            .append("itemName", getItemName())
            .append("itemNo", getItemNo())
            .append("itemNotes", getItemNotes())
            .append("createby", getCreateby())
            .append("modifyby", getModifyby())
            .toString();
    }

    public PtTreeCate(String treeId, String treeType, String treePid, String itemName, Long itemNo, String itemNotes, Date modifyby, Date createby, String nodeType, List<PtTreeCate> children) {
        this.treeId = treeId;
        this.treeType = treeType;
        this.treePid = treePid;
        this.itemName = itemName;
        this.itemNo = itemNo;
        this.itemNotes = itemNotes;
        this.modifyby = modifyby;
        this.createby = createby;
        this.nodeType = nodeType;
        this.children = children;
    }

    public PtTreeCate() {
    }
}
