UserDto.cs 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. #nullable disable
  2. using System;
  3. using MediaBrowser.Model.Configuration;
  4. using MediaBrowser.Model.Users;
  5. namespace MediaBrowser.Model.Dto
  6. {
  7. /// <summary>
  8. /// Class UserDto.
  9. /// </summary>
  10. public class UserDto : IItemDto, IHasServerId
  11. {
  12. /// <summary>
  13. /// Gets or sets the name.
  14. /// </summary>
  15. /// <value>The name.</value>
  16. public string Name { get; set; }
  17. /// <summary>
  18. /// Gets or sets the server identifier.
  19. /// </summary>
  20. /// <value>The server identifier.</value>
  21. public string ServerId { get; set; }
  22. /// <summary>
  23. /// Gets or sets the name of the server.
  24. /// This is not used by the server and is for client-side usage only.
  25. /// </summary>
  26. /// <value>The name of the server.</value>
  27. public string ServerName { get; set; }
  28. /// <summary>
  29. /// Gets or sets the id.
  30. /// </summary>
  31. /// <value>The id.</value>
  32. public Guid Id { get; set; }
  33. /// <summary>
  34. /// Gets or sets the primary image tag.
  35. /// </summary>
  36. /// <value>The primary image tag.</value>
  37. public string PrimaryImageTag { get; set; }
  38. /// <summary>
  39. /// Gets or sets a value indicating whether this instance has password.
  40. /// </summary>
  41. /// <value><c>true</c> if this instance has password; otherwise, <c>false</c>.</value>
  42. public bool HasPassword { get; set; }
  43. /// <summary>
  44. /// Gets or sets a value indicating whether this instance has configured password.
  45. /// </summary>
  46. /// <value><c>true</c> if this instance has configured password; otherwise, <c>false</c>.</value>
  47. public bool HasConfiguredPassword { get; set; }
  48. /// <summary>
  49. /// Gets or sets a value indicating whether this instance has configured easy password.
  50. /// </summary>
  51. /// <value><c>true</c> if this instance has configured easy password; otherwise, <c>false</c>.</value>
  52. public bool HasConfiguredEasyPassword { get; set; }
  53. /// <summary>
  54. /// Gets or sets whether async login is enabled or not.
  55. /// </summary>
  56. public bool? EnableAutoLogin { get; set; }
  57. /// <summary>
  58. /// Gets or sets the last login date.
  59. /// </summary>
  60. /// <value>The last login date.</value>
  61. public DateTime? LastLoginDate { get; set; }
  62. /// <summary>
  63. /// Gets or sets the last activity date.
  64. /// </summary>
  65. /// <value>The last activity date.</value>
  66. public DateTime? LastActivityDate { get; set; }
  67. /// <summary>
  68. /// Gets or sets the configuration.
  69. /// </summary>
  70. /// <value>The configuration.</value>
  71. public UserConfiguration Configuration { get; set; }
  72. /// <summary>
  73. /// Gets or sets the policy.
  74. /// </summary>
  75. /// <value>The policy.</value>
  76. public UserPolicy Policy { get; set; }
  77. /// <summary>
  78. /// Gets or sets the primary image aspect ratio.
  79. /// </summary>
  80. /// <value>The primary image aspect ratio.</value>
  81. public double? PrimaryImageAspectRatio { get; set; }
  82. /// <summary>
  83. /// Initializes a new instance of the <see cref="UserDto"/> class.
  84. /// </summary>
  85. public UserDto()
  86. {
  87. Configuration = new UserConfiguration();
  88. Policy = new UserPolicy();
  89. }
  90. /// <inheritdoc />
  91. public override string ToString()
  92. {
  93. return Name ?? base.ToString();
  94. }
  95. }
  96. }