WXModel.cs 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  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 DecryptStatus
  16. {
  17. get { return Decrypt ? "已解密" : "未解密"; }
  18. }
  19. public string Hash { get; set; } = "";
  20. public string NickName { get; set; } = "";
  21. public string UserName { get; set; } = "";
  22. public string Account { get; set; } = "";
  23. public string Friends_Number { get; set; } = "-";
  24. public string Msg_Number { get; set; } = "-";
  25. public event PropertyChangedEventHandler? PropertyChanged;
  26. private void OnPropertyChanged(string propertyName)
  27. {
  28. PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
  29. }
  30. }
  31. public class WXMsgGroup
  32. {
  33. [Column("StrTalker")]
  34. public string UserName { get; set; } = "";
  35. [Column("MsgCount")]
  36. public int MsgCount { get; set; }
  37. public string NickName { get; set; } = "";
  38. }
  39. public class WXUserInfo
  40. {
  41. public string UserName { get; set; } = "";
  42. public string Alias { get; set; } = "";
  43. public int DelFlag { get; set; }
  44. public int Flag { get; set; }
  45. public string NickName { get; set; } = "";
  46. public string LabelIDList { get; set; } = "";
  47. }
  48. public class WXUserImgUrl
  49. {
  50. [Column("usrName")]
  51. public string UserName { get; set; } = "";
  52. [Column("bigHeadImgUrl")]
  53. public string Img { get; set; } = "";
  54. }
  55. [Table("Session")]
  56. public class WXSession
  57. {
  58. [Column("strUsrName")]
  59. public string UserName { get; set; } = "";
  60. [Column("nOrder")]
  61. public long Order { get; set; }
  62. [Column("strNickName")]
  63. public string NickName { get; set; } = "";
  64. [Column("strContent")]
  65. public string Content { get; set; } = "";
  66. [Column("nTime")]
  67. public int LastTime { get; set; }
  68. public int ReadCount { get; set; }
  69. public int LastMsgId { get; set; }
  70. }
  71. [Table("SessionAttachInfo")]
  72. public class WXSessionAttachInfo
  73. {
  74. [Column("attachId")]
  75. public int AtcId { get; set; }
  76. [Column("msgType")]
  77. public int MsgType { get; set; }
  78. [Column("msgId")]
  79. public string msgId { get; set; } = "";
  80. [Column("msgTime")]
  81. public long msgTime { get; set; }
  82. [Column("attachPath")]
  83. public string attachPath { get; set; } = "";
  84. [Column("attachSize")]
  85. public int attachSize { get; set; }
  86. }
  87. [Table("Media")]
  88. public class WXMedia
  89. {
  90. public string Key { get; set; } = "";
  91. public string Reserved0 { get; set; } = "";
  92. public byte[]? Buf { get; set; }
  93. }
  94. [Table("MSG")]
  95. public class WXMsg
  96. {
  97. [Column("localId")]
  98. public int LocalId { get; set; }
  99. [Column("Type")]
  100. public int Type { get; set; }
  101. [Column("CreateTime")]
  102. public long CreateTime { get; set; }
  103. [Column("IsSender")]
  104. public bool IsSender { get; set; }
  105. [Column("MsgSvrID")]
  106. public string MsgSvrID { get; set; } = "";
  107. [Column("StrTalker")]
  108. public string StrTalker { get; set; } = "";
  109. [Column("StrContent")]
  110. public string StrContent { get; set; } = "";
  111. [Column("CompressContent")]
  112. public byte[]? CompressContent { get; set; }
  113. [Column("BytesExtra")]
  114. public byte[]? BytesExtra { get; set; }
  115. }
  116. [Table("ChatRoom")]
  117. public class WXChatRoom
  118. {
  119. [Column("ChatRoomName")]
  120. public string ChatRoomName { get; set; } = "";
  121. [Column("UserNameList")]
  122. public string UserNameList { get; set; } = "";
  123. [Column("DisplayNameList")]
  124. public string DisplayNameList { get; set; } = "";
  125. [Column("RoomData")]
  126. public byte[]? RoomData { get; set; }
  127. }
  128. [Table("Media")]
  129. public class WXMediaMsg
  130. {
  131. public int Key { get; set; }
  132. public byte[]? Buf { get; set; }
  133. public string Reserved0 { get; set; } = "";
  134. }
  135. [Table("Contact")]
  136. public class WXContact
  137. {
  138. [Column("UserName")]
  139. public string UserName { get; set; } = "";
  140. [Column("Alias")]
  141. public string Alias { get; set; } = "";
  142. [Column("NickName")]
  143. public string NickName { get; set; } = "";
  144. [Column("strContent")]
  145. public string LastMsg { get; set; } = "";
  146. [Column("ExtraBuf")]
  147. public byte[]? ExtraBuf { get; set; }
  148. [Column("smallHeadImgUrl")]
  149. public string Avatar { get; set; } = "";
  150. }
  151. [Table("ContactHeadImgUrl")]
  152. public class WXUserImg {
  153. [Column("usrName")]
  154. public string UserName { get; set; } = "";
  155. [Column("smallHeadImgUrl")]
  156. public string SmallImg { get; set; } = "";
  157. [Column("bigHeadImgUrl")]
  158. public string BigImg { get; set; } = "";
  159. }
  160. }