2
0

WXModel.cs 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  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 WXMsgGroup
  34. {
  35. [Column("StrTalker")]
  36. public string UserName { get; set; } = "";
  37. [Column("MsgCount")]
  38. public int MsgCount { get; set; }
  39. public string NickName { get; set; } = "";
  40. }
  41. [Table("ContactHeadImg1")]
  42. public class ContactHeadImg
  43. {
  44. public string usrName { get; set; } = "";
  45. public int createTime { get; set; }
  46. public byte[]? smallHeadBuf { get; set; }
  47. }
  48. public class WXUserInfo
  49. {
  50. public string UserName { get; set; } = "";
  51. public string Alias { get; set; } = "";
  52. public int DelFlag { get; set; }
  53. public int Flag { get; set; }
  54. public string NickName { get; set; } = "";
  55. public string LabelIDList { get; set; } = "";
  56. }
  57. public class WXUserImgUrl
  58. {
  59. [Column("usrName")]
  60. public string UserName { get; set; } = "";
  61. [Column("bigHeadImgUrl")]
  62. public string Img { get; set; } = "";
  63. }
  64. [Table("Session")]
  65. public class WXSession
  66. {
  67. [Column("strUsrName")]
  68. public string UserName { get; set; } = "";
  69. [Column("nOrder")]
  70. public long Order { get; set; }
  71. [Column("strNickName")]
  72. public string NickName { get; set; } = "";
  73. [Column("strContent")]
  74. public string Content { get; set; } = "";
  75. [Column("nTime")]
  76. public int LastTime { get; set; }
  77. public int ReadCount { get; set; }
  78. public int LastMsgId { get; set; }
  79. }
  80. [Table("SessionAttachInfo")]
  81. public class WXSessionAttachInfo
  82. {
  83. [Column("attachId")]
  84. public int AtcId { get; set; }
  85. [Column("msgType")]
  86. public int MsgType { get; set; }
  87. [Column("msgId")]
  88. public string msgId { get; set; } = "";
  89. [Column("msgTime")]
  90. public long msgTime { get; set; }
  91. [Column("attachPath")]
  92. public string attachPath { get; set; } = "";
  93. [Column("attachSize")]
  94. public int attachSize { get; set; }
  95. }
  96. [Table("Media")]
  97. public class WXMedia
  98. {
  99. public string Key { get; set; } = "";
  100. public string Reserved0 { get; set; } = "";
  101. public byte[]? Buf { get; set; }
  102. }
  103. [Table("MSG")]
  104. public class WXMsg
  105. {
  106. [Column("localId")]
  107. public int LocalId { get; set; }
  108. [Column("Type")]
  109. public int Type { get; set; }
  110. [Column("CreateTime")]
  111. public long CreateTime { get; set; }
  112. [Column("IsSender")]
  113. public bool IsSender { get; set; }
  114. [Column("MsgSvrID")]
  115. public string MsgSvrID { get; set; } = "";
  116. [Column("StrTalker")]
  117. public string StrTalker { get; set; } = "";
  118. [Column("StrContent")]
  119. public string StrContent { get; set; } = "";
  120. [Column("CompressContent")]
  121. public byte[]? CompressContent { get; set; }
  122. [Column("BytesExtra")]
  123. public byte[]? BytesExtra { get; set; }
  124. public string NickName { get; set; } = "";
  125. }
  126. [Table("ChatRoom")]
  127. public class WXChatRoom
  128. {
  129. [Column("ChatRoomName")]
  130. public string ChatRoomName { get; set; } = "";
  131. [Column("UserNameList")]
  132. public string UserNameList { get; set; } = "";
  133. [Column("DisplayNameList")]
  134. public string DisplayNameList { get; set; } = "";
  135. [Column("RoomData")]
  136. public byte[]? RoomData { get; set; }
  137. }
  138. [Table("Media")]
  139. public class WXMediaMsg
  140. {
  141. public int Key { get; set; }
  142. public byte[]? Buf { get; set; }
  143. public string Reserved0 { get; set; } = "";
  144. }
  145. [Table("Contact")]
  146. public class WXContact
  147. {
  148. [Column("UserName")]
  149. public string UserName { get; set; } = "";
  150. [Column("Alias")]
  151. public string Alias { get; set; } = "";
  152. [Column("NickName")]
  153. public string NickName { get; set; } = "";
  154. [Column("strContent")]
  155. public string LastMsg { get; set; } = "";
  156. [Column("ExtraBuf")]
  157. public byte[]? ExtraBuf { get; set; }
  158. public BitmapImage? Avatar { get; set; }
  159. [Column("Remark")]
  160. public string Remark { get; set; } = "";
  161. }
  162. [Table("ContactHeadImgUrl")]
  163. public class WXUserImg {
  164. [Column("usrName")]
  165. public string UserName { get; set; } = "";
  166. [Column("smallHeadImgUrl")]
  167. public string SmallImg { get; set; } = "";
  168. [Column("bigHeadImgUrl")]
  169. public string BigImg { get; set; } = "";
  170. }
  171. }