using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using SqlSugar; namespace XingTang.Sdk { /// /// 坐席操作记录 /// [SugarTable("call_cti_seatingoperation")] public class XingtangSeatOperation { [SugarColumn(IsPrimaryKey = true)] public int Id { get; set; } /// /// 工号 /// public string? UserCode { get; set; } /// /// 分机号 /// public string? Ext { get; set; } /// /// 执行状态 /// 0:签入 1:接听 2:置忙 3:置闲 16:签出 17:呼出 30:挂机 /// public int? ExecutionState { get; set; } public string? GetExecutionStateText() { if(!ExecutionState.HasValue) return string.Empty; return OperationDictionary.TryGetValue(ExecutionState.Value, out var text) ? text : "未知"; } /// /// 操作时间 /// public DateTime? ExecutionTime { get; set; } /// /// 通道号 /// public int? Channel { get; set; } /// /// 公司号 /// public string? CompanyId { get; set; } /// /// 备注 /// public string? Remark { get; set; } //弃用 public DateTime? EndTime { get; set; } public string? UserData { get; set; } #region 自建 public bool IsSync { get; set; } public int Tries { get; set; } [SugarColumn(IsEnableUpdateVersionValidation = true)] public string Ver { get; set; } #endregion public static Dictionary OperationDictionary = new() { { 0, "签入" }, { 1, "接听" }, { 2, "置忙" }, { 3, "置闲" }, { 16, "签出" }, { 17, "呼出" }, { 30, "挂机" }, }; } }