WXModel.cs 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. using System;
  2. using System.Collections.Generic;
  3. using SQLite;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using System.ComponentModel;
  8. namespace WechatPCMsgBakTool.Model
  9. {
  10. public class UserBakConfig : INotifyPropertyChanged
  11. {
  12. public string UserResPath { get; set; } = "";
  13. public string UserWorkspacePath { get; set; } = "";
  14. public bool Decrypt { get; set; } = false;
  15. public string Hash { get; set; } = "";
  16. public string NickName { get; set; } = "";
  17. public string UserName { get; set; } = "";
  18. public event PropertyChangedEventHandler? PropertyChanged;
  19. private void OnPropertyChanged(string propertyName)
  20. {
  21. PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
  22. }
  23. }
  24. public class WXMsgGroup
  25. {
  26. [Column("StrTalker")]
  27. public string UserName { get; set; } = "";
  28. [Column("MsgCount")]
  29. public int MsgCount { get; set; }
  30. public string NickName { get; set; } = "";
  31. }
  32. public class WXUserInfo
  33. {
  34. public string UserName { get; set; } = "";
  35. public string Alias { get; set; } = "";
  36. public int DelFlag { get; set; }
  37. public int Flag { get; set; }
  38. public string NickName { get; set; } = "";
  39. public string LabelIDList { get; set; } = "";
  40. }
  41. public class WXUserImgUrl
  42. {
  43. [Column("usrName")]
  44. public string UserName { get; set; } = "";
  45. [Column("bigHeadImgUrl")]
  46. public string Img { get; set; } = "";
  47. }
  48. [Table("Session")]
  49. public class WXSession
  50. {
  51. [Column("strUsrName")]
  52. public string UserName { get; set; } = "";
  53. [Column("nOrder")]
  54. public long Order { get; set; }
  55. [Column("strNickName")]
  56. public string NickName { get; set; } = "";
  57. [Column("strContent")]
  58. public string Content { get; set; } = "";
  59. [Column("nTime")]
  60. public int LastTime { get; set; }
  61. public int ReadCount { get; set; }
  62. public int LastMsgId { get; set; }
  63. }
  64. [Table("SessionAttachInfo")]
  65. public class WXSessionAttachInfo
  66. {
  67. [Column("attachId")]
  68. public int AtcId { get; set; }
  69. [Column("msgType")]
  70. public int MsgType { get; set; }
  71. [Column("msgId")]
  72. public string msgId { get; set; } = "";
  73. [Column("msgTime")]
  74. public long msgTime { get; set; }
  75. [Column("attachPath")]
  76. public string attachPath { get; set; } = "";
  77. [Column("attachSize")]
  78. public int attachSize { get; set; }
  79. }
  80. [Table("Media")]
  81. public class WXMedia
  82. {
  83. public string Key { get; set; } = "";
  84. public string Reserved0 { get; set; } = "";
  85. public byte[]? Buf { get; set; }
  86. }
  87. [Table("MSG")]
  88. public class WXMsg
  89. {
  90. [Column("localId")]
  91. public int LocalId { get; set; }
  92. [Column("Type")]
  93. public int Type { get; set; }
  94. [Column("CreateTime")]
  95. public long CreateTime { get; set; }
  96. [Column("IsSender")]
  97. public bool IsSender { get; set; }
  98. [Column("MsgSvrID")]
  99. public string MsgSvrID { get; set; } = "";
  100. [Column("StrTalker")]
  101. public string StrTalker { get; set; } = "";
  102. [Column("StrContent")]
  103. public string StrContent { get; set; } = "";
  104. }
  105. [Table("Media")]
  106. public class WXMediaMsg
  107. {
  108. public int Key { get; set; }
  109. public byte[]? Buf { get; set; }
  110. public string Reserved0 { get; set; } = "";
  111. }
  112. [Table("Contact")]
  113. public class WXContact
  114. {
  115. [Column("UserName")]
  116. public string UserName { get; set; } = "";
  117. [Column("Alias")]
  118. public string Alias { get; set; } = "";
  119. [Column("NickName")]
  120. public string NickName { get; set; } = "";
  121. }
  122. }