UserDate.cs 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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. public string subscriberType { get; set; }
  23. public string subscribed { get; set; }
  24. public string digestPassword { get; set; }
  25. public string phone { get; set; }
  26. public string industry { get; set; }
  27. public string lastPopularizeAt { get; set; }
  28. public string lastPresentedCouponAt { get; set; }
  29. public string mailable { get; set; }
  30. public string resetToken { get; set; }
  31. public string role { get; set; }
  32. public string job { get; set; }
  33. public string area { get; set; }
  34. public string platformType { get; set; }
  35. public string accountType { get; set; }
  36. public string accountSource { get; set; }
  37. public string createdAt { get; set; }
  38. public string updatedAt { get; set; }
  39. public string remark { get; set; }
  40. public string validFlag { get; set; }
  41. public List<string> subscriptionInfoList { get; set; }
  42. public string subscriptionendDate { get; set; }
  43. public string freeDate { get; set; } = "2023-06-01 08:00:00";
  44. public bool isInFreeUseTime { get; set; } = false;
  45. public void CheckRegisterStatus()
  46. {
  47. DateTime currentTime = DateTime.Now;
  48. DateTime thresholdTime = DateTime.Parse(TodayRegisterTime).Date.AddDays(1);
  49. if (currentTime > thresholdTime)
  50. {
  51. TodayRegister = false;
  52. }
  53. else
  54. {
  55. TodayRegister = true;
  56. }
  57. }
  58. }
  59. }