WXModel.cs 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  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 Hash { get; set; } = "";
  16. public string NickName { get; set; } = "";
  17. public string UserName { get; set; } = "";
  18. public string Account { get; set; } = "";
  19. public event PropertyChangedEventHandler? PropertyChanged;
  20. private void OnPropertyChanged(string propertyName)
  21. {
  22. PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
  23. }
  24. }
  25. public class WXMsgGroup
  26. {
  27. [Column("StrTalker")]
  28. public string UserName { get; set; } = "";
  29. [Column("MsgCount")]
  30. public int MsgCount { get; set; }
  31. public string NickName { get; set; } = "";
  32. }
  33. public class WXUserInfo
  34. {
  35. public string UserName { get; set; } = "";
  36. public string Alias { get; set; } = "";
  37. public int DelFlag { get; set; }
  38. public int Flag { get; set; }
  39. public string NickName { get; set; } = "";
  40. public string LabelIDList { get; set; } = "";
  41. }
  42. public class WXUserImgUrl
  43. {
  44. [Column("usrName")]
  45. public string UserName { get; set; } = "";
  46. [Column("bigHeadImgUrl")]
  47. public string Img { get; set; } = "";
  48. }
  49. [Table("Session")]
  50. public class WXSession
  51. {
  52. [Column("strUsrName")]
  53. public string UserName { get; set; } = "";
  54. [Column("nOrder")]
  55. public long Order { get; set; }
  56. [Column("strNickName")]
  57. public string NickName { get; set; } = "";
  58. [Column("strContent")]
  59. public string Content { get; set; } = "";
  60. [Column("nTime")]
  61. public int LastTime { get; set; }
  62. public int ReadCount { get; set; }
  63. public int LastMsgId { get; set; }
  64. }
  65. [Table("SessionAttachInfo")]
  66. public class WXSessionAttachInfo
  67. {
  68. [Column("attachId")]
  69. public int AtcId { get; set; }
  70. [Column("msgType")]
  71. public int MsgType { get; set; }
  72. [Column("msgId")]
  73. public string msgId { get; set; } = "";
  74. [Column("msgTime")]
  75. public long msgTime { get; set; }
  76. [Column("attachPath")]
  77. public string attachPath { get; set; } = "";
  78. [Column("attachSize")]
  79. public int attachSize { get; set; }
  80. }
  81. [Table("Media")]
  82. public class WXMedia
  83. {
  84. public string Key { get; set; } = "";
  85. public string Reserved0 { get; set; } = "";
  86. public byte[]? Buf { get; set; }
  87. }
  88. [Table("MSG")]
  89. public class WXMsg
  90. {
  91. [Column("localId")]
  92. public int LocalId { get; set; }
  93. [Column("Type")]
  94. public int Type { get; set; }
  95. [Column("CreateTime")]
  96. public long CreateTime { get; set; }
  97. [Column("IsSender")]
  98. public bool IsSender { get; set; }
  99. [Column("MsgSvrID")]
  100. public string MsgSvrID { get; set; } = "";
  101. [Column("StrTalker")]
  102. public string StrTalker { get; set; } = "";
  103. [Column("StrContent")]
  104. public string StrContent { get; set; } = "";
  105. [Column("CompressContent")]
  106. public byte[]? CompressContent { get; set; }
  107. }
  108. [Table("Media")]
  109. public class WXMediaMsg
  110. {
  111. public int Key { get; set; }
  112. public byte[]? Buf { get; set; }
  113. public string Reserved0 { get; set; } = "";
  114. }
  115. [Table("Contact")]
  116. public class WXContact
  117. {
  118. [Column("UserName")]
  119. public string UserName { get; set; } = "";
  120. [Column("Alias")]
  121. public string Alias { get; set; } = "";
  122. [Column("NickName")]
  123. public string NickName { get; set; } = "";
  124. }
  125. }