WXModel.cs 5.6 KB

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