using Hotline.Orders;
using Hotline.Share.Enums.CallCenter;
using SqlSugar;
using XF.Domain.Repository;
namespace Hotline.CallCenter.Calls
{
[SugarIndex("index_call_callid", nameof(TrCallRecord.OtherAccept), OrderByType.Asc)]
public class TrCallRecord : CreationEntity
{
///
/// IPPBX用户名
///
public string User { get; set; }
///
/// 可直接访问的通话录音地址
///
public string? RecordingFileUrl { get; set; }
public string? RecordingBaseAddress { get; set; }
public string? RecordingAbsolutePath { get; set; }
///
/// 呼叫方向
///
public ECallDirection CallDirection { get; set; }
///
/// 挂断方
///
public EEndBy? EndBy { get; set; }
///
/// 转接分机号
///
public string? AgentTransferNumber { get; set; }
///
/// 坐席侧通话流水,无坐席参与则为手机侧通话流水
///
public string CallAccept { get; set; }
///
/// 主叫
///
public string CPN { get; set; }
///
/// 主叫名称
///
public string CPNName { get; set; }
///
/// 被叫
///
public string CDPN { get; set; }
///
/// 分机号
///
public string? TelNo { get; set; }
public string? UserId { get; set; }
public string? UserName { get; set; }
public string? StaffNo { get; set; }
///
/// 通话录音绝对路径
///
public string? RecordingFileName { get; set; }
///
/// 通话创建时间
///
public DateTime CreatedTime { get; set; }
///
/// 接通时间
///
public DateTime? AnsweredTime { get; set; }
///
/// 挂机时间
///
public DateTime OverTime { get; set; }
///
/// 线路号
///
public string Gateway { get; set; }
///
/// 呼出时自定义的内容
///
public string? OtherStr { get; set; }
///
/// 手机侧通话流水,无坐席参与则为空
///
public string? OtherAccept { get; set; }
///
/// 状态码,语音信箱:999/其他:16
///
public string? Status { get; set; }
///
/// IVR开始时间
///
public DateTime? BeginIvrTime { get; set; }
///
/// IVR结束时间
///
public DateTime? EndIvrTime { get; set; }
///
/// 开始等待时间
///
public DateTime? BeginQueueTime { get; set; }
///
/// 结束等待时间
///
public DateTime? EndQueueTime { get; set; }
///
/// 开始振铃时间
///
public DateTime? BeginRingTime { get; set; }
///
/// 结束振铃时间
///
public DateTime? EndRingTimg { get; set; }
///
/// 队列ID
///
public string? OlaQueue { get; set; }
///
/// 批量外呼流水
///
public string? BatchAccept { get; set; }
///
/// IVR按键信息
///
public string? IvrDtmf { get; set; }
///
/// IVR按键对应动作,需解码
///
public string? DtmfType { get; set; }
///
/// 通话状态
///
public EOnState OnState { get; set; }
#region 自定义字段
///
/// 通话时长(挂机时间-接通时间)
///
[SugarColumn(DefaultValue = "0")]
public int Duration { get; set; }
///
/// 振铃时长(振铃结束时间-振铃开始时间)
///
[SugarColumn(DefaultValue = "0")]
public int RingTimes { get; set; }
///
/// 排队时长(排队结束时间-排队开始时间)
///
[SugarColumn(DefaultValue = "0")]
public int QueueTims { get; set; }
public ECallOrderType? CallOrderType { get; set; }
///
/// 外部ID
///
public string? ExternalId { get; set; }
///
/// 工单
///
[Navigate(NavigateType.OneToOne, nameof(ExternalId))]
public Order? Order { get; set; }
///
/// 呼入号码类型
///
public EPhoneTypes? PhoneTypes { get; set; }
///
/// 归属地
///
public string? MobileAreaName { get; set; }
///
/// 运营商
///
public string? OFlag { get; set; }
///
/// 卡类型
///
public string? OperatorName { get; set; }
#endregion
}
}