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

namespace Hotline.Orders
{
    [Description("催办")]
    public class OrderUrge : FullStateEntity
    {
        /// <summary>
        /// 工单ID
        /// </summary>
        [SugarColumn(ColumnDescription = "工单ID")]
        public string OrderId { get; set; }

        /// <summary>
        /// 被催办部门ID
        /// </summary>
        [SugarColumn(ColumnDescription = "被催办部门ID")]
        public string OrgId { get; set; }

        /// <summary>
        /// 被催办角色
        /// </summary>
        [SugarColumn(ColumnDescription = "被催办角色")]
        public string? RoleId { get; set; }

        /// <summary>
        /// 实际办理步骤ID
        /// </summary>
        [SugarColumn(ColumnDescription = "实际办理步骤ID")]
        public string? ActualHandleStepId { get; set; }

        /// <summary>
        /// 被催办部门名称
        /// </summary>
        [SugarColumn(ColumnDescription = "被催办部门名称")]
        public string OrgName { get; set; }

        /// <summary>
        /// 创建部门名称
        /// </summary>
        [SugarColumn(ColumnDescription = "创建部门名称")]
        public string? CreatorOrgName { get; set; }

        /// <summary>
        /// 催办状态
        /// </summary>
        [SugarColumn(ColumnDescription = "催办状态   0 待回复  1 已回复  2 签收")]
        public int State { get; set; }

        /// <summary>
        /// 催办签收时间
        /// </summary>
        [SugarColumn(ColumnDescription = "催办签收时间")]
        public DateTime? SignTime { get; set; }

        /// <summary>
        /// 催办回复时间
        /// </summary>
        [SugarColumn(ColumnDescription = "催办回复时间")]
        public DateTime? ReplyTime { get; set; }

        /// <summary>
        /// 催办回复时限
        /// </summary>
        [SugarColumn(ColumnDescription = "催办回复时限")]
        public DateTime? ReplyLimitTime { get; set; }

        /// <summary>
        /// 催办申请内容
        /// </summary>
        [SugarColumn(ColumnDescription = "催办申请内容", ColumnDataType = "text")]
        public string? ApplyContent { get; set; }

        /// <summary>
        /// 催办回复内容
        /// </summary>
        [SugarColumn(ColumnDescription = "催办回复内容", ColumnDataType = "text")]
        public string? ReplyContent { get; set; }

        /// <summary>
        /// 回复人
        /// </summary>
        [SugarColumn(ColumnDescription = "回复人")]
        public string? ReplyId { get; set; }

        /// <summary>
        /// 省平台业务编号
        /// </summary>
        public string? DsBisId { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [Navigate(NavigateType.OneToOne, nameof(OrderId))]
        public Order Order { get; set; }

        [SugarColumn(ColumnDescription = "回复人")]
        public string? ReUser { get; set; }

        [SugarColumn(ColumnDescription = "申请人")]
        public string? CrUser { get; set; }

        /// <summary>
        /// 省催办时间
        /// </summary>
        public DateTime? RemindTime { get; set; }

        /// <summary>
        /// 是否省催单
        /// </summary>
        [SugarColumn(DefaultValue = "f")]
        public bool IsProRemind { get; set; }

        [SugarColumn(ColumnDescription = "签收人")]
        public string? SignUser { get; set; }

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

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

