using DataSharing.Share.Dtos;
using Hotline.Share.Dtos.File;
using SqlSugar;
using System.ComponentModel;
using XF.Domain.Repository;

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

        /// <summary>
        /// 流程ID
        /// </summary>
        [SugarColumn(ColumnDescription = "流程ID", ColumnDataType = "varchar(50)")]
        public string WorkflowId { get; set; }

        #region 接办

        /// <summary>
        /// 接办人ID
        /// </summary>
        public string? AcceptorId { get; set; }

        /// <summary>
        /// 接办人
        /// </summary>
        public string? AcceptorName { get; set; }

        /// <summary>
        /// 接办人部门code
        /// </summary>
        public string? AcceptorOrgId { get; set; }

        /// <summary>
        /// 接办人部门名称
        /// </summary>
        public string? AcceptorOrgName { get; set; }

        /// <summary>
        /// 接办人部门行政区划代码
        /// </summary>
        public string? AcceptorOrgAreaCode { get; set; }

        /// <summary>
        /// 接办人部门行政区划名称
        /// </summary>
        public string? AcceptorOrgAreaName { get; set; }

        /// <summary>
        /// 接办时间
        /// </summary>
        public DateTime? AcceptTime { get; set; }

        #endregion

        #region 办理信息
        /// <summary>
        /// 办理人ID
        /// </summary>
        public string? HandlerId { get; set; }

        /// <summary>
        /// 办理人名称
        /// </summary>
        public string? HandlerName { get; set; }

        /// <summary>
        /// 办理人部门code
        /// </summary>
        public string? HandlerOrgId { get; set; }

        /// <summary>
        /// 办理人部门名称
        /// </summary>
        public string? HandlerOrgName { get; set; }

        /// <summary>
        /// 办理人部门行政区划代码
        /// </summary>
        public string? HandlerOrgAreaCode { get; set; }

        /// <summary>
        /// 办理人部门行政区划名称
        /// </summary>
        public string? HandlerOrgAreaName { get; set; }

        /// <summary>
        /// 办理完成时间
        /// </summary>
        public DateTime? HandleTime { get; set; }

        /// <summary>
        /// 办理意见
        /// </summary>
        [SugarColumn(ColumnDataType = "text", ColumnDescription = "办理意见")]
        public string? Opinion { get; set; }

        /// <summary>
        /// 附件
        /// </summary>

        [SugarColumn(ColumnDataType = "json", IsJson = true, IsNullable = true)]
        public List<FileJson>? FileJson { get; set; }

        /// <summary>
        /// 节点期满时间
        /// </summary>
        public DateTime? StepExpiredTime { get; set; }
        #endregion
    }
}
