using Hotline.Share.Enums.Early;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using XF.Domain.Repository;

namespace Hotline.Early
{
    public class EarlyWarningPush:CreationEntity
    {
        /// <summary>
        /// 推送报告名称
        /// </summary>
        public string EarlyWarningPushName { get; set; }

        /// <summary>
        /// 推送部门
        /// </summary>
        [SugarColumn(ColumnDataType = "json", IsJson = true, IsNullable = true, ColumnDescription = "推送部门")]
        public List<PushOrg> PushOrgs { get; set; }

        /// <summary>
        /// 报告状态
        /// </summary>
        public EEarlyPushStatus EarlyPushStatus { get; set; }

        /// <summary>
        /// 办理中数量（推送后）
        /// </summary>
        public int? ProcessingCount { get; set; }

        /// <summary>
        /// 办理完成数量（推送后）
        /// </summary>
        public int? FiledCount { get; set; }

        /// <summary>
        /// 推送时间
        /// </summary>
        public DateTime? PushTime { get; set; }

        /// <summary>
        /// 推送报告下载地址
        /// </summary>
        public string? PushReportUrl { get; set; }

        /// <summary>
        /// 明细
        /// </summary>
        [Navigate(NavigateType.OneToMany, nameof(EarlyWarningPushDetail.EarlyWarningPushId))]
        public List<EarlyWarningPushDetail> EarlyWarningPushDetails { get; set; }
    }

    public class PushOrg
    {
        public string OrgCode { get; set; }

        public string OrgName { get; set; }
    }
}
