using MadRunFabric.Common;
using MongoDB.Bson.Serialization.Attributes;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace MadRunFabric.Model
{
    /// <summary>
    /// 分机呼入
    /// </summary>
    public class MW_Ext_Callin_Record : IBaseModel<string>
    {
        /// <summary>
        /// id
        /// </summary>
        [Key]
        [BsonRepresentation(MongoDB.Bson.BsonType.ObjectId)]
        public string id { get; set; }

        /// <summary>
        /// 通话唯一ID
        /// </summary>
        public string unique_id { get; set; }

        /// <summary>
        /// 被呼叫的号码
        /// </summary>
        public string callee { get; set; }

        /// <summary>
        /// 呼叫号码
        /// </summary>
        public string caller { get; set; }

        /// <summary>
        /// 呼叫电话的坐席ID
        /// </summary>
        public int caller_agent_id { get; set; }

        /// <summary>
        /// 被呼入的坐席ID
        /// </summary>
        public int callee_agent_id { get; set; }

        /// <summary>
        /// 振铃时间时间戳
        /// </summary>
        public Int64 time_alerting { get; set; } 

        /// <summary>
        /// 振铃时长
        /// </summary>
        public int period_alerting { get; set; } = 0;

        /// <summary>
        /// 是否应答
        /// </summary>
        public int is_answer { get; set; } = 0;

        /// <summary>
        /// 应答时间
        /// </summary>
        public long time_answer { get; set; }

        /// <summary>
        /// 通话时长
        /// </summary>
        public int period_talking { get; set; } = 0;

        /// <summary>
        /// 挂断时间 时间戳
        /// </summary>
        public Int64 time_hang_up { get; set; }

        /// <summary>
        /// 通话类型 直通0 转移1 三方2
        /// </summary>
        public int call_type { get; set; } = 0;

        /// <summary>
        /// 是否是分机 0,1
        /// </summary>
        public int peer_line_type { get; set; } = 0;


        /// <summary>
        /// 录音路径 
        /// </summary>
        public string record_path { get; set; }
    }
}
