using Hotline.FlowEngine.Workflows;
using Hotline.Share.Enums.Order;
using Hotline.Users;
using SqlSugar;
using XF.Domain.Repository;

namespace Hotline.Orders
{

    public class OrderVisitApply: CreationEntity
    {
        public string OrderNo { get; set; }

        public string OrderId { get; set; }

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

        public string EmployeeId { get; set; }

        [Navigate(NavigateType.OneToOne, nameof(EmployeeId))]
        public User Employee { get; set; }

        public string VisitReason { get; set; }

        /// <summary>
        /// 源单号
        /// </summary>
        public string OrderVisitId { get; set; }

        [Navigate(NavigateType.OneToOne,nameof(OrderVisitId))]
        public OrderVisit OrderVisit { get; set; }

        public EVisitApplyState VisitApplyState { get; set; }

        /// <summary>
        /// 审核意见
        /// </summary>
        public string? ExaminOpinion { get; set; }

        /// <summary>
        /// 审核人
        /// </summary>
        public string? ExaminManId { get; set; }

        /// <summary>
        /// 审核人
        /// </summary>
        [Navigate(NavigateType.OneToOne,nameof(ExaminManId))]
        public User? ExaminMan { get; set; }

        /// <summary>
        /// 审核时间
        /// </summary>
        public DateTime? ExaminTime { get; set; }
    }
}
