using SqlSugar;
using System.ComponentModel;
using XF.Domain.Repository;

namespace DataSharing.RawData
{
    /// <summary>
    /// 工单统计数据
    /// </summary>
    [Description("工单统计数据")]
    public class DsOrderSend : CreationEntity
    {
        /// <summary>
        /// 工单id
        /// </summary>
        [SugarColumn(ColumnDescription = "工单ID", ColumnDataType = "varchar(50)")]
        public string OrderId { get; set; }

        /// <summary>
        /// 工单编号
        /// </summary>
        [SugarColumn(ColumnDescription = "工单编号", ColumnDataType = "varchar(50)")]
        public string OrderNo { get; set; }

        /// <summary>
        /// 工单标题
        /// </summary>
        [SugarColumn(ColumnDescription = "工单标题", ColumnDataType = "varchar(500)", IsNullable = true)]
        public string? Title { get; set; }

        /// <summary>
        /// 上传省工单编号
        /// </summary>
        [SugarColumn(ColumnDescription = "上传省工单编号", ColumnDataType = "varchar(50)")]
        public string? ProvinceNo { get; set; }

        /// <summary>
        /// 受理时间
        /// </summary>
        [SugarColumn(ColumnDescription = "受理时间", IsNullable = true)]
        public DateTime? CaseDate { get; set; }

        /// <summary>
        /// 流程开启时间
        /// </summary>
        [SugarColumn(ColumnDescription = "流程开启时间", IsNullable = true)]
        public DateTime? StartTime { get; set; }

        /// <summary>
        /// 通话记录ID(来源为电话的有值)
        /// </summary>
        [SugarColumn(ColumnDescription = " 通话记录ID(来源为电话的有值)", IsNullable = true)]
        public string? CallId { get; set; }

        /// <summary>
        /// 第一次上传省上的时间
        /// </summary>
        [SugarColumn(ColumnDescription = "第一次上传省上的时间", IsNullable = true)]
        public DateTime? FirstSendProvinceTime { get; set; }

        /// <summary>
        /// 最近一次推送时间
        /// </summary>
        [SugarColumn(ColumnDescription = "最近一次推送时间", IsNullable = true)]
        public DateTime? LastSendProvinceTime { get; set; }

        /// <summary>
        ///   来源，区分省平台或110等其他平台同步过来的工单
        /// </summary>
        public string? Source { get; set; }

        /// <summary>
        /// 同步诉求渠道
        /// </summary>
        [SugarColumn(ColumnDescription = "同步诉求渠道")]
        public string? CaseSource { get; set; }

        /// <summary>
        /// 同步诉求渠道编码
        /// </summary>
        [SugarColumn(ColumnDescription = "同步诉求渠道编码")]
        public string? CaseSourceCode { get; set; }

        /// <summary>
        /// 办理状态--默认办理中，归档的时候更新为办理完成
        /// </summary>
        [SugarColumn(ColumnDescription = "办理状态--默认办理中，归档的时候更新为办理完成", IsNullable = true)]
        public string? HandleState { get; set; } = "办理中";

        /// <summary>
        /// 最新应办结时间
        /// </summary>
        [SugarColumn(ColumnDescription = "最新应办结时间", IsNullable = true)]
        public DateTime? ExpiredTime { get; set; }

        /// <summary>
        /// 实际办理时间
        /// </summary>
        [SugarColumn(ColumnDescription = "实际办理时间", IsNullable = true)]
        public DateTime? ActualHandleTime { get; set; }

        /// <summary>
        /// 归档时间（暂为流程结束时间，因流程结束自动归档）
        /// </summary>
        public DateTime? FiledTime { get; set; }
    }
}
