using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Siger.ApiIMS.Result
{
    public class ToolCategoryTree
    {
        public int id { get; set; }

        public string code { get; set; }

        public string name { get; set; }

        public int pid { get; set; }

        public bool open { get; set; } = true;

        public int toolid { get; set; } = 0;

        public string title { get; set; }

        public bool expand { get; set; } = false;

        public List<ToolCategoryTree> children { get; set; }

        public void AddChilrden(ToolCategoryTree node)
        {
            if (children == null)
            {
                children = new List<ToolCategoryTree>();
            }
            children.Add(node);
        }

        public ToolCategoryTree()
        {
            children = new List<ToolCategoryTree>();
        }
    }
}
