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_Agent_State_Record : IBaseModel<string>
    {
        /// <summary>
        /// id
        /// </summary>
        [Key]
        [BsonRepresentation(MongoDB.Bson.BsonType.ObjectId)]
        public string id { get; set; }

        /// <summary>
        /// 坐席ID
        /// </summary>
        public int agent_id { get; set; }

        /// <summary>
        /// 分机号
        /// </summary>
        public int extid { get; set; }

        /// <summary>
        /// ip地址
        /// </summary>
        public string agent_ip { get; set; }

        /// <summary>
        /// 坐席组
        /// </summary>
        public string group_id { get; set; }

        /// <summary>
        /// agent_type 班长 普通
        /// </summary>
        public int agent_type { get; set; } = 1;

        /// <summary>
        /// 签入时间时间戳
        /// </summary>
        public Int64   time_login
        { get; set; } 

        /// <summary>
        /// 签出时间时间戳
        /// </summary>
        public Int64 time_logout
        { get; set; }

        /// <summary>
        /// 签出时间 时间戳
        /// </summary>
        //public Int64 time_logout;// { get; set; } 
        //public DateTime _time_logout
        //{
        //    get
        //    {
        //        return DateTimeConvert.GetTime(time_logout.ToString());//LongDateTimeToDateTimeString(_time_connected);
        //    }
        //    set
        //    {
        //        ;
        //    }

        //}

        //2018-7-17
        //private Int64 _time_logout;
        ///// <summary>
        ///// 通话建立时间 时间戳 转三方时间
        ///// </summary>
        //public DateTime   time_logout
        //{
        //    get
        //    {
        //        return DateTimeConvert.GetTime(_time_logout.ToString());//LongDateTimeToDateTimeString(_time_connected);
        //    }
        //    set
        //    {
        //        ;
        //    }

        //}

        /// <summary>
        /// 签出的主控坐席ID 比如坐席班长强制某坐席签出
        /// </summary>
        public int logout_host { get; set; }

        /// <summary>
        /// 签入时长
        /// </summary>
        public int login_times { get; set; }

        /// <summary>
        /// 空闲时长
        /// </summary>
        public int free_times { get; set; }

        /// <summary>
        /// 休息时长
        /// </summary>
        public int repose_times { get; set; }

        /// <summary>
        /// 通话时长
        /// </summary>
        public int talk_times { get; set; }

        /// <summary>
        /// 休息次数
        /// </summary>
        public int repose_num { get; set; }

        /// <summary>
        /// 应答次数
        /// </summary>
        public int answer_num { get; set; }

        /// <summary>
        /// 应主动签出0/被签出 1
        /// </summary>
        public int logout_type { get; set; }
    }
}
