using Hotline.Share.Enums.Order;
using SqlSugar;
using System.ComponentModel;
using XF.Domain.Repository;

namespace Hotline.WebPortal
{
    /// <summary>
    /// 旧系统已发布公开数据
    /// </summary>
    [Description("旧系统已发布公开数据")]
    public class OldPublicData : CreationEntity
    {
        /// <summary>
        /// 工单id
        /// </summary>
        [SugarColumn(ColumnDescription = "工单id")]
        public string OrderId { get; set; }

        /// <summary>
        /// 来电/信人姓名
        /// </summary>
        [SugarColumn(ColumnDescription = "来电姓名")]
        public string? FromName { get; set; }

        /// <summary>
        /// 联系电话
        /// </summary>
        [SugarColumn(ColumnDescription = "联系电话")]
        public string? Contact { get; set; }

        /// <summary>
        /// 来电/信人身份
        /// </summary>
        [SugarColumn(ColumnDescription = "来电身份")]
        public EIdentityType? IdentityType { get; set; }

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

        /// <summary>
        /// 工单密码
        /// </summary>
        [SugarColumn(ColumnDescription = "工单密码")]
        public string OrderPwd { get; set; }

        /// <summary>
        /// 工单标题
        /// </summary>
        [SugarColumn(ColumnDescription = "工单标题")]
        public string Title { get; set; }

        /// <summary>
        /// 来源渠道（电话、网站、APP等）
        /// </summary>
        [SugarColumn(ColumnDescription = "来源渠道（电话、网站、APP等）")]
        public string? SourceChannel { get; set; }

        [SugarColumn(ColumnDescription = "来源渠道代码")]
        public string? SourceChannelCode { get; set; }

        /// <summary>
        /// 受理类型(咨询、投诉等)
        /// </summary>
        [SugarColumn(ColumnDescription = "受理类型受理类型(咨询、投诉等)")]
        public string? AcceptType { get; set; }

        /// <summary>
        /// 受理类型代码
        /// </summary>
        [SugarColumn(ColumnDescription = "受理类型代码")]
        public string? AcceptTypeCode { get; set; }

        /// <summary>
        /// 热点
        /// </summary>
        [SugarColumn(ColumnDescription = "热点ID")]
        public string? HotspotId { get; set; }

        /// <summary>
        /// 热点名称
        /// </summary>
        [SugarColumn(ColumnDescription = "热点名称")]
        public string? HotspotName { get; set; }

        /// <summary>
        /// 诉求内容
        /// </summary>
        [SugarColumn(ColumnDataType = "varchar(8000)", ColumnDescription = "诉求内容")]
        public string Content { get; set; }

        /// <summary>
        /// 工单状态 0：办理中；1办理完成
        /// </summary>
        public string State { get; set; }

        /// <summary>
        /// 实际办理部门名称
        /// </summary>
        [SugarColumn(ColumnDescription = "实际办理部门名称")]
        public string? ActualHandleOrgName { get; set; }

        /// <summary>
        /// 实际办理意见（办理中...or 最终办理意见）
        /// </summary>
        [SugarColumn(Length = 8000, ColumnDescription = "实际办理意见")]
        public string ActualOpinion { get; set; } = "办理中...";

        /// <summary>
        /// 工单创建时间
        /// </summary>
        public DateTime? AcceptTime { get; set; }

        /// <summary>
        /// 发布时间
        /// </summary>
        public DateTime? PubDate { get; set; }

        /// <summary>
        /// 归档时间
        /// </summary>
        [SugarColumn(ColumnDescription = "归档时间")]
        public DateTime? FiledTime { get; set; }
    }
}

