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