WXModel.cs 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  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
  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. }
  28. public class WXCount
  29. {
  30. public int Count { get; set; }
  31. }
  32. public class WXMsgGroup
  33. {
  34. [Column("StrTalker")]
  35. public string UserName { get; set; } = "";
  36. [Column("MsgCount")]
  37. public int MsgCount { get; set; }
  38. public string NickName { get; set; } = "";
  39. }
  40. [Table("ContactHeadImg1")]
  41. public class ContactHeadImg
  42. {
  43. public string usrName { get; set; } = "";
  44. public int createTime { get; set; }
  45. public byte[]? smallHeadBuf { get; set; }
  46. }
  47. public class WXUserInfo
  48. {
  49. public string UserName { get; set; } = "";
  50. public string Alias { get; set; } = "";
  51. public int DelFlag { get; set; }
  52. public int Flag { get; set; }
  53. public string NickName { get; set; } = "";
  54. public string LabelIDList { get; set; } = "";
  55. }
  56. public class WXUserImgUrl
  57. {
  58. [Column("usrName")]
  59. public string UserName { get; set; } = "";
  60. [Column("bigHeadImgUrl")]
  61. public string Img { get; set; } = "";
  62. }
  63. [Table("Session")]
  64. public class WXSession
  65. {
  66. [Column("strUsrName")]
  67. public string UserName { get; set; } = "";
  68. [Column("nOrder")]
  69. public long Order { get; set; }
  70. [Column("strNickName")]
  71. public string NickName { get; set; } = "";
  72. [Column("strContent")]
  73. public string Content { get; set; } = "";
  74. [Column("nTime")]
  75. public int LastTime { get; set; }
  76. public int ReadCount { get; set; }
  77. public int LastMsgId { get; set; }
  78. }
  79. [Table("SessionAttachInfo")]
  80. public class WXSessionAttachInfo
  81. {
  82. [Column("attachId")]
  83. public int AtcId { get; set; }
  84. [Column("msgType")]
  85. public int MsgType { get; set; }
  86. [Column("msgId")]
  87. public string msgId { get; set; } = "";
  88. [Column("msgTime")]
  89. public long msgTime { get; set; }
  90. [Column("attachPath")]
  91. public string attachPath { get; set; } = "";
  92. [Column("attachSize")]
  93. public int attachSize { get; set; }
  94. }
  95. [Table("Media")]
  96. public class WXMedia
  97. {
  98. public string Key { get; set; } = "";
  99. public string Reserved0 { get; set; } = "";
  100. public byte[]? Buf { get; set; }
  101. }
  102. [Table("MSG")]
  103. public class WXMsg
  104. {
  105. [Column("localId")]
  106. public int LocalId { get; set; }
  107. [Column("MsgSequence")]
  108. public int MsgSequence { get; set; }
  109. [Column("Type")]
  110. public int Type { get; set; }
  111. [Column("SubType")]
  112. public int SubType { get; set; }
  113. [Column("CreateTime")]
  114. public long CreateTime { get; set; }
  115. [Column("IsSender")]
  116. public bool IsSender { get; set; }
  117. [Column("MsgSvrID")]
  118. public string MsgSvrID { get; set; } = "";
  119. [Column("StrTalker")]
  120. public string StrTalker { get; set; } = "";
  121. [Column("StrContent")]
  122. public string StrContent { get; set; } = "";
  123. public string DisplayContent { 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. public class WXContactHT
  150. {
  151. public string UserName { get; set; } = "";
  152. public string NickName { get; set; } = "";
  153. public string LastMsg { get; set; } = "";
  154. public int FileCount { get; set; } = 1;
  155. public string AvatarString { get; set; } = "";
  156. public bool Hidden { get; set; } = false;
  157. }
  158. [Table("Contact")]
  159. public class WXContact
  160. {
  161. [Column("UserName")]
  162. public string UserName { get; set; } = "";
  163. [Column("Alias")]
  164. public string Alias { get; set; } = "";
  165. [Column("NickName")]
  166. public string NickName { get; set; } = "";
  167. [Column("strContent")]
  168. public string LastMsg { get; set; } = "";
  169. [Column("ExtraBuf")]
  170. public byte[]? ExtraBuf { get; set; }
  171. public BitmapImage? Avatar { get; set; }
  172. [Column("Remark")]
  173. public string Remark { get; set; } = "";
  174. }
  175. [Table("ContactHeadImgUrl")]
  176. public class WXUserImg {
  177. [Column("usrName")]
  178. public string UserName { get; set; } = "";
  179. [Column("smallHeadImgUrl")]
  180. public string SmallImg { get; set; } = "";
  181. [Column("bigHeadImgUrl")]
  182. public string BigImg { get; set; } = "";
  183. }
  184. }