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

namespace Hotline.Orders
{
    /// <summary>
    /// 观察件
    /// </summary>
    [Description("观察件")]
    public class ObservationPiece : CreationEntity
    {
        /// <summary>
        /// 工单编号（冗余）
        /// </summary>
        public string No { get; set; }

        /// <summary>
        /// 工单ID
        /// </summary>
        public string OrderId { get; set; }

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

        /// <summary>
        /// 观察单位
        /// </summary>
        public string? ObserveOrgId { get; set; }

        /// <summary>
        /// 审批状态
        /// </summary>
        public EDelayState State { get; set; }

        /// <summary>
        /// 审批时间
        /// </summary>
        public string? AuditUserId { get; set; }
        public string? AuditUserName { get; set; }

        /// <summary>
        /// 审批部门
        /// </summary>
        public string? AuditOrgId { get; set; }
        public string? AuditOrgName { get; set; }

        /// <summary>
        /// 审批时间
        /// </summary>
        public DateTime? AuditTime { get; set; }

        /// <summary>
        /// 审批内容
        /// </summary>
        public string? AuditContent { get; set; }

        /// <summary>
        /// 回复内容
        /// </summary>
        public string? ReplyContent { get; set; }

        /// <summary>
        /// 回复时间
        /// </summary>
        public DateTime? ReplyTime { get; set; }

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

        /// <summary>
        /// 是否回复
        /// </summary>
        public bool IsReply { get; set; }

        /// <summary>
        /// 回复人
        /// </summary>
        public string? ReplyUserId { get; set; }
        public string? ReplyUserName { get; set; }

        /// <summary>
        /// 回复部门
        /// </summary>
        public string? ReplyOrgId { get; set; }
        public string? ReplyOrgName { get; set; }

    }
}
