XingtangSeatOperation.cs 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using SqlSugar;
  7. namespace XingTang.Sdk
  8. {
  9. /// <summary>
  10. /// 坐席操作记录
  11. /// </summary>
  12. [SugarTable("call_cti_seatingoperation")]
  13. public class XingtangSeatOperation
  14. {
  15. [SugarColumn(IsPrimaryKey = true)]
  16. public int Id { get; set; }
  17. /// <summary>
  18. /// 工号
  19. /// </summary>
  20. public string? UserCode { get; set; }
  21. /// <summary>
  22. /// 分机号
  23. /// </summary>
  24. public string? Ext { get; set; }
  25. /// <summary>
  26. /// 执行状态
  27. /// 0:签入 1:接听 2:置忙 3:置闲 16:签出 17:呼出 30:挂机
  28. /// </summary>
  29. public int? ExecutionState { get; set; }
  30. public string? GetExecutionStateText()
  31. {
  32. if(!ExecutionState.HasValue) return string.Empty;
  33. return OperationDictionary.TryGetValue(ExecutionState.Value, out var text)
  34. ? text
  35. : "未知";
  36. }
  37. /// <summary>
  38. /// 操作时间
  39. /// </summary>
  40. public DateTime? ExecutionTime { get; set; }
  41. /// <summary>
  42. /// 通道号
  43. /// </summary>
  44. public int? Channel { get; set; }
  45. /// <summary>
  46. /// 公司号
  47. /// </summary>
  48. public string? CompanyId { get; set; }
  49. /// <summary>
  50. /// 备注
  51. /// </summary>
  52. public string? Remark { get; set; }
  53. //弃用
  54. public DateTime? EndTime { get; set; }
  55. public string? UserData { get; set; }
  56. #region 自建
  57. public bool IsSync { get; set; }
  58. public int Tries { get; set; }
  59. [SugarColumn(IsEnableUpdateVersionValidation = true)]
  60. public string Ver { get; set; }
  61. #endregion
  62. public static Dictionary<int, string> OperationDictionary = new()
  63. {
  64. { 0, "签入" },
  65. { 1, "接听" },
  66. { 2, "置忙" },
  67. { 3, "置闲" },
  68. { 16, "签出" },
  69. { 17, "呼出" },
  70. { 30, "挂机" },
  71. };
  72. }
  73. }