using DataTransmission.Enum; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DataTransmission.Entity { public class OrderVisit : CreationEntity { /// /// 工单编码(冗余) /// public string No { get; set; } /// /// 工单ID /// public string OrderId { get; set; } /// /// 工单 /// //[Navigate(NavigateType.OneToOne, nameof(OrderId))] //public Order Order { get; set; } /// /// 回访状态 /// public EVisitState VisitState { get; set; } /// /// 回访方式 /// //[SugarColumn(IsNullable = true)] public EVisitType? VisitType { get; set; } /// /// 发布时间 /// public DateTime PublishTime { get; set; } /// /// 回访人 /// //[SugarColumn(IsNullable = true)] public string? EmployeeId { get; set; } /// /// 回访人(对象) ///// //[Navigate(NavigateType.OneToOne, nameof(EmployeeId))] //public User? Employee { get; set; } /// /// 是否接通 /// //[SugarColumn(IsNullable = true)] public bool? IsPutThrough { get; set; } /// /// 重办状态 /// //[SugarColumn(IsNullable = true)] public EAgainState? AgainState { get; set; } /// /// 回访时间 /// //[SugarColumn(IsNullable = true)] public DateTime? VisitTime { get; set; } /// /// 回访明细 /// //[Navigate(NavigateType.OneToMany, nameof(OrderVisitDetail.VisitId))] //public List OrderVisitDetails { get; set; } /// /// 当前评价结果 /// //[SugarColumn(ColumnDataType = "json", IsJson = true, IsNullable = true)] public Kv? NowEvaluate { get; set; } /// /// 是否可以处理 /// public bool IsCanHandle { get; set; } /// /// 是否可以AI回访 /// public bool? IsCanAiVisit { get; set; } /// /// 渠道为电话时,此字段存在 /// public string? CallId { get; set; } /// /// 第一次电话回访拨打时间 /// public DateTime? FirstVisitTime { get; set; } /// /// 最后一次电话回访拨打时间 /// public DateTime? LastVisitTime { get; set; } /// /// 智能回访次数 /// //[SugarColumn(DefaultValue = "0")] public int AiVisitCount { get; set; } /// /// 智能回访录音地址 /// public string? RecordUrl { get; set; } /// /// 部门扭转 /// public bool? OrgJudge { get; set; } /// /// 坐席扭转 /// public bool? SeatJudge { get; set; } /// /// 评判状态 /// public EJudgeState? JudgeState { get; set; } /// /// 评判意见 /// public string? JudgeContent { get; set; } /// /// 评判人Id /// public string? JudgeUserId { get; set; } /// /// 评判人名称 /// public string? JudgeUserName { get; set; } /// /// 评判时间 /// public DateTime? JudgeTime { get; set; } /// /// 是否有效智能回访 /// public bool? IsEffectiveAiVisit { get; set; } /// /// 是否批量回访 /// public bool? IsBatchVisit { get; set; } public void AiVisitTime() { LastVisitTime = DateTime.Now; if (FirstVisitTime is null) { FirstVisitTime = LastVisitTime; } } } }