using SqlSugar;
using System.ComponentModel;
using XF.Domain.Repository;

namespace DataSharing.RawData
{
    /// <summary>
    /// 上传的通话记录数据
    /// </summary>
    [Description("上传的通话记录数据")]
    public class DsTelCall : CreationEntity
    {
        /// <summary>
        /// 通话记录ID
        /// </summary>
        [SugarColumn(ColumnDescription = " 通话记录ID", IsNullable = true)]
        public string? CallId { get; set; }

        /// <summary>
        /// 主叫
        /// </summary>
        [SugarColumn(ColumnDescription = "主叫", IsNullable = true)]
        public string? CPN { get; set; }

        /// <summary>
        /// 被叫
        /// </summary>
        [SugarColumn(ColumnDescription = "被叫", IsNullable = true)]
        public string? CDPN { get; set; }

        /// <summary>
        /// 呼叫方向 0：呼入；1：呼出
        /// </summary>
        [SugarColumn(ColumnDescription = "呼叫方向", IsNullable = true)]
        public string? CallDirection { get; set; }

        /// <summary>
        /// 分机号
        /// </summary>
        [SugarColumn(ColumnDescription = "分机号", IsNullable = true)]
        public string? TelNo { get; set; }

        /// <summary>
        /// 用户ID
        /// </summary>
        [SugarColumn(ColumnDescription = "用户ID", IsNullable = true)]
        public string? UserId { get; set; }

        /// <summary>
        /// 用户名
        /// </summary>
        [SugarColumn(ColumnDescription = "用户名", IsNullable = true)]
        public string? UserName { get; set; }

        /// <summary>
        /// IVR开始时间
        /// </summary>
        [SugarColumn(ColumnDescription = "IVR开始时间", IsNullable = true)]
        public DateTime? BeginIvrTime { get; set; }

        /// <summary>
        /// IVR结束时间
        /// </summary>
        [SugarColumn(ColumnDescription = "IVR结束时间", IsNullable = true)]
        public DateTime? EndIvrTime { get; set; }

        /// <summary>
        /// 开始等待时间
        /// </summary>
        [SugarColumn(ColumnDescription = "开始等待时间", IsNullable = true)]
        public DateTime? BeginQueueTime { get; set; }

        /// <summary>
        /// 结束等待时间
        /// </summary>
        [SugarColumn(ColumnDescription = "结束等待时间", IsNullable = true)]
        public DateTime? EndQueueTime { get; set; }

        /// <summary>
        /// 开始振铃时间
        /// </summary>
        [SugarColumn(ColumnDescription = "开始振铃时间", IsNullable = true)]
        public DateTime? BeginRingTime { get; set; }

        /// <summary>
        /// 结束振铃时间
        /// </summary>
        [SugarColumn(ColumnDescription = "结束振铃时间", IsNullable = true)]
        public DateTime? EndRingTimg { get; set; }

        /// <summary>
        /// 接通时间
        /// </summary>
        [SugarColumn(ColumnDescription = "接通时间", IsNullable = true)]
        public DateTime? AnsweredTime { get; set; }

        /// <summary>
        /// 挂机时间
        /// </summary>
        [SugarColumn(ColumnDescription = "挂机时间", IsNullable = true)]
        public DateTime? OverTime { get; set; }

        /// <summary>
        /// 通话时长（挂机时间-接通时间）
        /// </summary>
        [SugarColumn(ColumnDescription = "通话时长（挂机时间-接通时间）", IsNullable = true)]
        public int Duration { get; set; }

        /// <summary>
        /// 振铃时长（振铃结束时间-振铃开始时间）
        /// </summary>
        [SugarColumn(ColumnDescription = "振铃时长（振铃结束时间-振铃开始时间）", IsNullable = true)]
        public int RingTimes { get; set; }

        /// <summary>
        ///  排队时长（排队结束时间-排队开始时间）
        /// </summary>
        [SugarColumn(ColumnDescription = "排队时长（排队结束时间-排队开始时间）", IsNullable = true)]
        public int QueueTims { get; set; }

        /// <summary>
        /// 通话状态 1：接通；2：未接通
        /// </summary>
        [SugarColumn(ColumnDescription = "通话状态 1：接通；2：未接通", IsNullable = true)]
        public string? OnState { get; set; }

        /// <summary>
        /// 可直接访问的通话录音地址
        /// </summary>
        [SugarColumn(ColumnDescription = "可直接访问的通话录音地址", IsNullable = true)]
        public string? RecordingFileUrl { get; set; }

        /// <summary>
        /// 上传省工单编号
        /// </summary>
        [SugarColumn(ColumnDescription = "上传省工单编号", ColumnDataType = "varchar(50)", IsNullable = true)]
        public string? ProvinceNo { get; set; }

        /// <summary>
        /// 第一次上传省上的时间
        /// </summary>
        [SugarColumn(ColumnDescription = "第一次上传省上的时间", IsNullable = true)]
        public DateTime? FirstSendProvinceTime { get; set; }

        /// <summary>
        /// 最近一次推送时间
        /// </summary>
        [SugarColumn(ColumnDescription = "最近一次推送时间", IsNullable = true)]
        public DateTime? LastSendProvinceTime { get; set; }

        /// <summary>
        /// 任务Id
        /// </summary>
        [SugarColumn(ColumnDescription = "任务Id", IsNullable = true)]
        public string? TaskId { get; set; }

    }
}
