using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Text;
using System.Text.Json.Serialization;

namespace ReportService.Models
{
    public class ReportListModel
    {
        [JsonPropertyName("s")]
        public List<ReportItem> Sub { get; set; } = new List<ReportItem>();
    }
    /// <summary>
    /// 报表项
    /// </summary>
    public class ReportItem
    {
        /// <summary>
        /// 项类型
        /// </summary>
        [JsonPropertyName("t")]
        public ItemType Type{ get; set; }
        /// <summary>
        /// 项名称
        /// </summary>
        [JsonPropertyName("n")]
        public string Name { get; set; }
        /// <summary>
        /// 项路径
        /// </summary>
        [JsonPropertyName("p")]
        public string Path { get; set; }

        [JsonPropertyName("s")]
        public List<ReportItem> Sub { get; set; } = new List<ReportItem>();
    }
    /// <summary>
    /// 项目类型
    /// </summary>
    public enum ItemType
    {
        /// <summary>
        /// 一个报表分组
        /// </summary>
        group = 1,
        /// <summary>
        /// 报表文件
        /// </summary>
        file = 2,
    }
}
