UserDate.cs 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Globalization;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace PDFSettings
  8. {
  9. /// <summary>
  10. /// 获取的用户信息
  11. /// </summary>
  12. public class UserDate
  13. {
  14. public bool TodayRegister { get; set; } = false;
  15. public string TodayRegisterTime { get; set; } = "2023-06-01 08:00:00";
  16. public bool IsLoginoff { get; set; } = false;
  17. public string id { get; set; }
  18. public string companyId { get; set; }
  19. public string appId { get; set; }
  20. public string Email { get; set; } = "";
  21. public string fullName { get; set; }
  22. //订阅部分
  23. public string subscribeid { get; set; }
  24. public string subscribeuserid { get; set; }
  25. public string subscribeType { get; set; }
  26. public int subscribeplatform { get; set; }
  27. /// <summary>
  28. /// 0已注册1订阅中2订阅过期3试用中4试用过期
  29. /// </summary>
  30. public int subscribestatus{ get; set; }
  31. public string subscribeendDate { get; set; }
  32. public int subscribepayType { get; set; }
  33. public string subscribed { get; set; }
  34. public string digestPassword { get; set; }
  35. public string phone { get; set; }
  36. public string industry { get; set; }
  37. public string lastPopularizeAt { get; set; }
  38. public string lastPresentedCouponAt { get; set; }
  39. public string mailable { get; set; }
  40. public string resetToken { get; set; }
  41. public string role { get; set; }
  42. public string job { get; set; }
  43. public string area { get; set; }
  44. public string platformType { get; set; }
  45. public string accountType { get; set; }
  46. public string accountSource { get; set; }
  47. public string createdAt { get; set; }
  48. public string updatedAt { get; set; }
  49. public string remark { get; set; }
  50. public string validFlag { get; set; }
  51. public List<string> subscriptionInfoList { get; set; }
  52. public string freeDate { get; set; } = "2023-06-01 08:00:00";
  53. public bool isInFreeUseTime { get; set; } = false;
  54. public void CheckRegisterStatus()
  55. {
  56. DateTime currentTime = DateTime.Now;
  57. DateTime thresholdTime = DateTime.Parse(TodayRegisterTime).Date.AddDays(1);
  58. if (currentTime > thresholdTime)
  59. {
  60. TodayRegister = false;
  61. }
  62. else
  63. {
  64. TodayRegister = true;
  65. }
  66. }
  67. }
  68. }