WXModel.cs 6.0 KB

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