UserDate.cs 2.1 KB

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