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

namespace Hotline.Share.Dtos.ExportWord
{
    /// <summary>
    /// 报表实体
    /// </summary>
    public class ReportDto: BaseReportDto
    {
        public TitleDto Title { get; set; }

        public List<SubTitleDto> SubTitleDtos { get; set; }

        public ContentDto ContentDto { get; set; }

        public List<AttachmentDto> AttachmentDtos { get; set; }

        public List<BaseReportDto> BottomDtos { get; set; }
    }

    /// <summary>
    /// 标题实体
    /// </summary>
    public class TitleDto: BaseReportDto
    {
        
    }

    /// <summary>
    /// 内容实体
    /// </summary>
    public class ContentDto : BaseReportDto
    {
        public TitleDto TitleDto { get; set; }
        public List<ParagraphDto> ParagraphDtos { get; set; }
    }

    /// <summary>
    /// 段落实体
    /// </summary>
    public class ParagraphDto : BaseReportDto
    {
        /// <summary>
        /// 标题
        /// </summary>
        public TitleDto titleDto { get; set; }
    }

    /// <summary>
    /// 子标题
    /// </summary>
    public class SubTitleDto: BaseReportDto
    {
        /// <summary>
        /// 子元素
        /// </summary>
        public new List<SubTitleDto> Children { get; set; }
    }

    /// <summary>
    /// 附件
    /// </summary>
    public class AttachmentDto : BaseReportDto
    {
        public TitleDto Title { get; set; }

        public List<SubTitleDto> SubTitleDtos { get; set; }

        public List<TableDto> TableDtos { get; set; }
    }

    public class TableDto : BaseReportDto
    {
       public TableDto()
        {
            HeadDto = new HeadDto();
            BodyDto = new TBodyDto();
        }
        public HeadDto HeadDto { get; set; }

        public TBodyDto BodyDto { get; set; }
    }

    public class HeadDto : BaseReportDto
    {
        public HeadDto()
        {
            RowDtos = new List<RowDto>();
        }
        public List<RowDto> RowDtos { get; set; }
    }

    public class TBodyDto : BaseReportDto
    {
        public TBodyDto()
        {
            RowDtos = new List<RowDto>();
        }
        public List<RowDto> RowDtos { get; set; }
    }

    public class RowDto : BaseReportDto
    {
        public RowDto()
        {
            ColumnDtos = new List<ColumnDto>();
        }

        public List<ColumnDto> ColumnDtos;
    }

    public class ColumnDto : BaseReportDto
    {

    }

    public class BaseReportDto
    {
        public BaseReportDto()
        {
            Children = new List<BaseReportDto>();
        }

        public string Content { get; set; }

        public string CssStyle { get; set; }

        public int SortIndex { get; set; }

        public List<BaseReportDto> Children { get; set; }
    }
}
