WXModel.cs 3.6 KB

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